Skip to main content

A RAG Framework for Information Retrieval and Generation.

Project description

Language Code Style Imports: isort github license Read the Docs PyPI - Version DOI

[ English | 中文 ]

FlexRAG is a flexible and high-performance framework designed for Retrieval-Augmented Generation (RAG) tasks, offering support for multimodal data, seamless configuration management, and out-of-the-box performance for both research and prototyping.

https://github.com/user-attachments/assets/4dfc0ec9-686b-40e2-b1f0-daa2b918e093

📖 Table of Contents

✨ Key Features

  • Multimodal RAG Support: FlexRAG isn't limited to just text-based Retrieval-Augmented Generation (RAG). It also supports multimodal RAG, opening up a wide range of application possibilities across different media types.
  • Diverse Data Types: FlexRAG enables seamless integration of multiple data formats, including text (e.g., CSV, JSONL), images, documents, web snapshots, and more, giving you flexibility in working with varied data sources.
  • Unified Configuration Management: Leveraging python dataclass and hydra-core, FlexRAG simplifies configuration management, making it easier to handle complex setups and customize your workflow.
  • Out-of-the-Box: With carefully optimized default configurations, FlexRAG delivers solid performance without the need for extensive parameter tuning.
  • High Performance: Built with persistent cache system and asynchronous methods to significantly improve speed and reduce latency in RAG workflows.
  • Research & Development Friendly: Supports multiple development modes and includes a companion repository, flexrag_examples, to help you reproduce various RAG algorithms with ease.
  • Lightweight: Designed with minimal overhead, FlexRAG is efficient and easy to integrate into your project.

📢 News

  • 2025-2-25: FlexRAG's LocalRetriever now supports loading from the HuggingFace Hub.
  • 2025-01-22: A new entrypoint run_retriever and four new information retrieval metrics (e.g., RetrievalMAP) are now available. Check out the documentation for more details.
  • 2025-01-08: We provide Windows wheels for FlexRAG. You can install FlexRAG via pip on Windows now.
  • 2025-01-08: The benchmark of FlexRAG on Single-hop QA tasks is now available. Check out the benchmarks for more details.
  • 2025-01-05: Documentation for FlexRAG is now available. Check out the documentation for more details.

🚀 Getting Started

To install FlexRAG via pip:

pip install flexrag

Visit our documentation to learn more.

🏗️ Architecture

FlexRAG is designed with a modular architecture, allowing you to easily customize and extend the framework to meet your specific needs. The following diagram illustrates the architecture of FlexRAG:

📊 Benchmarks

We have conducted extensive benchmarks using the FlexRAG framework. For more details, please refer to the benchmarks page.

🏷️ License

This repository is licensed under the MIT License. See the LICENSE file for details.

❤️ Acknowledgements

This project benefits from the following open-source projects:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

flexrag-0.1.9-cp313-cp313-win_amd64.whl (210.4 kB view details)

Uploaded CPython 3.13Windows x86-64

flexrag-0.1.9-cp313-cp313-win32.whl (205.6 kB view details)

Uploaded CPython 3.13Windows x86

flexrag-0.1.9-cp313-cp313-musllinux_1_2_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

flexrag-0.1.9-cp313-cp313-musllinux_1_2_i686.whl (2.0 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ i686

flexrag-0.1.9-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (966.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

flexrag-0.1.9-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl (959.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ i686

flexrag-0.1.9-cp312-cp312-win_amd64.whl (210.3 kB view details)

Uploaded CPython 3.12Windows x86-64

flexrag-0.1.9-cp312-cp312-win32.whl (205.5 kB view details)

Uploaded CPython 3.12Windows x86

flexrag-0.1.9-cp312-cp312-musllinux_1_2_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

flexrag-0.1.9-cp312-cp312-musllinux_1_2_i686.whl (2.0 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ i686

flexrag-0.1.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (966.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

flexrag-0.1.9-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl (960.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ i686

flexrag-0.1.9-cp311-cp311-win_amd64.whl (210.0 kB view details)

Uploaded CPython 3.11Windows x86-64

flexrag-0.1.9-cp311-cp311-win32.whl (205.2 kB view details)

Uploaded CPython 3.11Windows x86

flexrag-0.1.9-cp311-cp311-musllinux_1_2_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

flexrag-0.1.9-cp311-cp311-musllinux_1_2_i686.whl (2.0 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ i686

flexrag-0.1.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (967.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

flexrag-0.1.9-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl (961.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ i686

File details

Details for the file flexrag-0.1.9-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: flexrag-0.1.9-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 210.4 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for flexrag-0.1.9-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c01083abd6ea46f7e473b66fb065e32502f6223a18d2f85b8fd7b84f432c494a
MD5 70e0641e8bc4ef3043ac214871ab0d9d
BLAKE2b-256 76ffdf3771f79d9344e089932a04a4ed84c71ec15039de386090aa165c80f359

See more details on using hashes here.

File details

Details for the file flexrag-0.1.9-cp313-cp313-win32.whl.

File metadata

  • Download URL: flexrag-0.1.9-cp313-cp313-win32.whl
  • Upload date:
  • Size: 205.6 kB
  • Tags: CPython 3.13, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for flexrag-0.1.9-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 7687978039bdefd3721c8b1f383b77498ff2948024773437bf9ae275fd6a67ba
MD5 81095271a77772b218e793eb24198ea2
BLAKE2b-256 d998bf61b966de656896818cda555de577b8eed4271ce5429c0844d3de10e93b

See more details on using hashes here.

File details

Details for the file flexrag-0.1.9-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for flexrag-0.1.9-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 fb67a4806b67faf0951a30befc398229716cb7640ceb90b6efaace9d265bdb95
MD5 c1a4a42d416c2de042c85387baa29e35
BLAKE2b-256 db27085ea99148352b85d2a21eb9aef19b638ec5197898fb395b8190a48c2535

See more details on using hashes here.

File details

Details for the file flexrag-0.1.9-cp313-cp313-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for flexrag-0.1.9-cp313-cp313-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 0c2d034854b8ed827e6d98454ef76438d0dc20256fbf375156f29737dd5ce3e8
MD5 c1d2e8cfdc059b5d3a8ec914561ad390
BLAKE2b-256 655df3f719c97a0950824469d8c4761691b11c882c8cb4b21bfcbba75592f99e

See more details on using hashes here.

File details

Details for the file flexrag-0.1.9-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flexrag-0.1.9-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1611b4ec29302837d6aeed73bfeaedd9249d4b88367b39e00302600af7ad23bc
MD5 a4e08e3f105622f2041e35144efb6270
BLAKE2b-256 9da7a06942eea4c2506610a05acc1c18a970096bfba790ba402dec6dec932ab1

See more details on using hashes here.

File details

Details for the file flexrag-0.1.9-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for flexrag-0.1.9-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 be60f214f87fcdb2088ecf4843e4505de17cdcc36125250e72286b925e03e6d1
MD5 91e3d757693f2d3c76bafbf706d0cdfc
BLAKE2b-256 ebba368ee0f484a0d3ba347469414977c4a74c5b17778974fa72fa1fbb007a8a

See more details on using hashes here.

File details

Details for the file flexrag-0.1.9-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: flexrag-0.1.9-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 210.3 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for flexrag-0.1.9-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a56957403b3cf8d2142aeffa783b39e0d02b6237f1aa6ba1a531ee79874e8cc3
MD5 6df9f082829782b15cfb087e77bd0f8f
BLAKE2b-256 08d1be54f2ec2449ca8b0d399a8860a6ebbad51d73e18e6fff0306d66e1f5141

See more details on using hashes here.

File details

Details for the file flexrag-0.1.9-cp312-cp312-win32.whl.

File metadata

  • Download URL: flexrag-0.1.9-cp312-cp312-win32.whl
  • Upload date:
  • Size: 205.5 kB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for flexrag-0.1.9-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 f620198b013d4030fd3ada4559f3acbbafd3e81c28e12d8109a408485c681884
MD5 2c610fb0ed0a6aab4a1d94e9a4778bb7
BLAKE2b-256 8592a84abde3d38c1ede923ee7adf9a1a1cbb85e0f3db00b097fac2f49492b42

See more details on using hashes here.

File details

Details for the file flexrag-0.1.9-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for flexrag-0.1.9-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 259cda3a608e9f81758759a88715f9e59b0b7e833cb7b93147a463023b07a351
MD5 0473f2ae441e0785504560da6ded6f48
BLAKE2b-256 8f4312c6e80cad617cd2b14f49b61adaaeed28954f22b5bace59c45530ff7c15

See more details on using hashes here.

File details

Details for the file flexrag-0.1.9-cp312-cp312-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for flexrag-0.1.9-cp312-cp312-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 14beced1a31c7f35908149f37c21f241ad873511ba58927acce4261b3329f81f
MD5 cc4a9cd93437cc2f11e32b1a1c0623c6
BLAKE2b-256 85d259c7d71d928caa35b0190057137cbf2f0625fcd659a6e7c596098b772d5c

See more details on using hashes here.

File details

Details for the file flexrag-0.1.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flexrag-0.1.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8a1c8737076ee3efe3bb91612c498c05445e0059026023726ec01891c4e1fe61
MD5 9c4a10238b8e8b40df21aeec385f086e
BLAKE2b-256 03fb71b45f1bc8440f495c311af245914272ab45626c378727479ef1158f3869

See more details on using hashes here.

File details

Details for the file flexrag-0.1.9-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for flexrag-0.1.9-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 8423cd656816e71fb682e7bc164094d6097f8bf57167c28e81ecbad25a6b3797
MD5 4124c0d9bec8182cf545571957521097
BLAKE2b-256 79c1db936b8c49a2474e0261e3e82f69b39204eccf145442c2362c0a93ecc310

See more details on using hashes here.

File details

Details for the file flexrag-0.1.9-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: flexrag-0.1.9-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 210.0 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for flexrag-0.1.9-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 44b18a38b3e55de71ceadf0df580be39991e73906e25c417c2f4848d43fe55ed
MD5 5d0e15815c88407dda41fe538fb358cc
BLAKE2b-256 c9de580c4047e988f54e45df9a032bab07d9753f024c9307c54c14b79e7ca8af

See more details on using hashes here.

File details

Details for the file flexrag-0.1.9-cp311-cp311-win32.whl.

File metadata

  • Download URL: flexrag-0.1.9-cp311-cp311-win32.whl
  • Upload date:
  • Size: 205.2 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for flexrag-0.1.9-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 fddd3cfd1a22f604fa7faef18b9a03b7e37e170c54ac70baa6bdc450c1d54a2e
MD5 52c63cda88468009dec6029b6670ee63
BLAKE2b-256 c2b3c59a6121f70387e0deb293154e858b4723bdfad511bb7cb2f96f3fceae41

See more details on using hashes here.

File details

Details for the file flexrag-0.1.9-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for flexrag-0.1.9-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a845566fb6579b8e14a636402334c413897de6070af47fba88ea9b8d1abfa2cd
MD5 db15ea4ddbe16d4706135321100bfa01
BLAKE2b-256 1d48d44ba9570ab2efd243e976f8c7765f3148f0e23ec79367a1b4aa7f4c1a06

See more details on using hashes here.

File details

Details for the file flexrag-0.1.9-cp311-cp311-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for flexrag-0.1.9-cp311-cp311-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 c13df0fb65bcc7f91e4ae509e28175d5cf03c29a40fc1ffc13ae2994b630722f
MD5 2825c242ba09eab81c9902ceaa0ef937
BLAKE2b-256 4e404952021354936ecbedfa233a014b4fe69ec4e0dcfba1e7e78a9c9adf158c

See more details on using hashes here.

File details

Details for the file flexrag-0.1.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flexrag-0.1.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 aedac6228e8b5781ff02cb20d84e4515c0038a36225d792ef1c5139463233a80
MD5 3c4f822d21bdd1279c00147469b13e71
BLAKE2b-256 5078999b84c2ee904516c3ed3c30eb586886c4c573b5fa5d4470a7e8c7856523

See more details on using hashes here.

File details

Details for the file flexrag-0.1.9-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for flexrag-0.1.9-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 f41ab855f12347585cd721510ec3a5bb8ce221d7f05ab729c481920b1bf9ad28
MD5 5b03139a6d243aac4e10024bb9bb8831
BLAKE2b-256 ead4ea8296160c8e3135a8e143eefc960fb20b9c456a4154ec2bc505d2b422a7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page