Skip to main content

A RAG Framework for Information Retrieval and Generation.

Project description

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

[ English | 中文 ]

FlexRAG is a highly reproducible, easy-to-use, and high-performance RAG framework designed for both research and application scenarios. It supports text, multimodal, and web-based RAG, providing a complete RAG pipeline and evaluation process. With built-in asynchronous processing and persistent caching, it ensures efficiency and scalability. Easily load retrievers from Hugging Face and quickly build powerful RAG solutions out of the box.

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

📖 Table of Contents

✨ Key Features

  • 🎯 High Reproducibility: FlexRAG comes with a companion repository, flexrag_examples, providing comprehensive reproduction cases for various RAG algorithms. Additionally, unified retrievers available on the HuggingFace Hub ensure easy replication of experimental results under the same environment.
  • Low Learning Curve: Download and load retrievers from the HuggingFace Hub with a single command, eliminating complex setup processes. Moreover, FlexRAG offers carefully optimized default configurations, allowing you to achieve excellent performance right out of the box and streamlining the development process.
  • 🌍 Diverse Application Scenarios: FlexRAG supports not only text-based RAG but also multimodal and network-based RAG, enabling broad applications across different data types.
  • 🧪 Research-Oriented: Provides a unified evaluation process for various RAG tasks, making it easy to test across different datasets. Official benchmark tests are also available for convenient comparison and reference.
  • Superior Performance: Leverages persistent caching and asynchronous functions to enhance high-performance RAG development.
  • 🔄 End-to-End Support: From document information extraction and segmentation to retrieval, generation, and evaluation of output quality, FlexRAG fully supports every stage of the RAG lifecycle.
  • 🛠️ Modular & Flexible Design: With a lightweight modular architecture, FlexRAG accommodates multiple development modes, helping you quickly build customized RAG solutions.

📢 News

  • 2025-03-24: The Chinese documentation is now available! Please visit the documentation for more details.
  • 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.2.0-pp311-pypy311_pp73-win_amd64.whl (403.3 kB view details)

Uploaded PyPyWindows x86-64

flexrag-0.2.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (433.6 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

flexrag-0.2.0-pp311-pypy311_pp73-manylinux_2_17_i686.manylinux2014_i686.whl (439.7 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ i686

flexrag-0.2.0-cp313-cp313-win_amd64.whl (403.7 kB view details)

Uploaded CPython 3.13Windows x86-64

flexrag-0.2.0-cp313-cp313-win32.whl (398.8 kB view details)

Uploaded CPython 3.13Windows x86

flexrag-0.2.0-cp313-cp313-musllinux_1_2_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

flexrag-0.2.0-cp313-cp313-musllinux_1_2_i686.whl (2.3 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ i686

flexrag-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

flexrag-0.2.0-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl (1.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ i686

flexrag-0.2.0-cp312-cp312-win_amd64.whl (403.8 kB view details)

Uploaded CPython 3.12Windows x86-64

flexrag-0.2.0-cp312-cp312-win32.whl (398.8 kB view details)

Uploaded CPython 3.12Windows x86

flexrag-0.2.0-cp312-cp312-musllinux_1_2_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

flexrag-0.2.0-cp312-cp312-musllinux_1_2_i686.whl (2.3 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ i686

flexrag-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

flexrag-0.2.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl (1.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ i686

flexrag-0.2.0-cp311-cp311-win_amd64.whl (403.4 kB view details)

Uploaded CPython 3.11Windows x86-64

flexrag-0.2.0-cp311-cp311-win32.whl (398.3 kB view details)

Uploaded CPython 3.11Windows x86

flexrag-0.2.0-cp311-cp311-musllinux_1_2_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

flexrag-0.2.0-cp311-cp311-musllinux_1_2_i686.whl (2.3 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ i686

flexrag-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

flexrag-0.2.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl (1.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ i686

File details

Details for the file flexrag-0.2.0-pp311-pypy311_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for flexrag-0.2.0-pp311-pypy311_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 465cfcc4333ffc84f10b6b526dd713d177f73476cea7ddc9bf526f38e28d599c
MD5 5a3366a577e4d2bd009deeb812ce2168
BLAKE2b-256 774aa1689602f38a96dca9e5f04d45d378fd3923683921db7b6d8b6818fefafb

See more details on using hashes here.

File details

Details for the file flexrag-0.2.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flexrag-0.2.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1921ea43835ec12d166915015676a1032b010949d5001f4c4c41aa980762da00
MD5 983e1db1ecb5bb5053e1700abe5df5ca
BLAKE2b-256 07c1a704ba177aab3a904925f8273d9d5af1616e52fb82a3f58257f16521d011

See more details on using hashes here.

File details

Details for the file flexrag-0.2.0-pp311-pypy311_pp73-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for flexrag-0.2.0-pp311-pypy311_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 bcbe84360b2c1608597acc61ead8bbed40dc9943552b374883bd524fcd676c20
MD5 6ccc22346fa85da1e793798445c3379a
BLAKE2b-256 936344067663519ca882210baf6807228e60f4580bbd76ce269d70dd92fb0335

See more details on using hashes here.

File details

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

File metadata

  • Download URL: flexrag-0.2.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 403.7 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.2.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 2698257da1f43d8189f46775f92ed933091be859d775fec0e8f9bd5f76a23655
MD5 a949145446a1db8fbe4bc4d20974f06f
BLAKE2b-256 976665c58e89b25522a2d4a1188732164f900deb8df529c67334733498aca352

See more details on using hashes here.

File details

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

File metadata

  • Download URL: flexrag-0.2.0-cp313-cp313-win32.whl
  • Upload date:
  • Size: 398.8 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.2.0-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 9de6f81b6599cea8d8ac6d6e12cc20de11b9fb780f14ec018a4c4859caa077c9
MD5 04cdffdf499e3fb82d654f4d64c0cf7e
BLAKE2b-256 2158edb3f8e734a1f1d1d6fce318ff96480ab64c8f6c450ecc0083167f70ecb3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flexrag-0.2.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b39731785e487ad33ae210cb3ae40529e062a358e1005e7b7b35f9bffb45539e
MD5 2f18d88e984df0c13cb501d8dfc4aa6d
BLAKE2b-256 fc3e1565ae7ea7c862c4f81de568119ef946cb1f9fae7c01d4a0e4035f0ceeeb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flexrag-0.2.0-cp313-cp313-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 66c93dc3213ee00f11146dc09ae574cde6591b636bba799df276148515424143
MD5 28ca137fb324b18779ab9d69920f5f5b
BLAKE2b-256 8c8f0e4119f91a113aba98ad4e4e49655e6856792c27cfa1c8415c55454a750c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flexrag-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8ff52f7967419f310c3215028908847a59153e18280ddc40f6440abee1075bdc
MD5 0d44d5291853dbe4e146d39ee6f873f3
BLAKE2b-256 a6e4d9ee75801df145225292146f7f788107aebb5d99180f45a7166a81229b4b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flexrag-0.2.0-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 b69e77402e073ecfb0437798c8301c66ad3d2cdb2ed23479b3a04e689550351e
MD5 09247cbca880920852a85faac65f370a
BLAKE2b-256 ce1035cfbf732f55cfdfe8f72119242fe82618688230e8cadb9cf4bf5546efa5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: flexrag-0.2.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 403.8 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.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 475163314ec3174a69c7a62e8f56798d8767038a2d8a1dc0bbd39b0bb35d463e
MD5 d0861e3a8c756b2d99b8393f03dd212b
BLAKE2b-256 8e70286e9c06f5cdcda6b3b0b6193f671cc9dcf0ac94e62b565d65fb3316039c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: flexrag-0.2.0-cp312-cp312-win32.whl
  • Upload date:
  • Size: 398.8 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.2.0-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 0e8765afa0fadc44fcdfe05ee83a83b0d67dcbe0cdd84033e0a1fe4af3d97488
MD5 0046567506822ace4e3697c4eff8580e
BLAKE2b-256 ec041de42e5c7e9860567af01c45d6adb8e0663b38abde66620d0f96c82007c8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flexrag-0.2.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 977bb052739ff68b04a0081363a514a7b961d65d68a96be29671cd1f2dfaa1e3
MD5 b241b8d3af0f11c03ab3cf86fa31d48a
BLAKE2b-256 aa575e1fb73c049f060b24be36afea35bd91415d47e483612c1254928dc738d6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flexrag-0.2.0-cp312-cp312-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 0659869578262ce2a6ec20d372cf03611ffa29a703806284376549ff8385d4ac
MD5 e6bbedc14ae85a6aa690d993d81192da
BLAKE2b-256 400ce772cb8605405277eb84e1bad45fb9e21a3120a8b87e3f4a64979175a9dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flexrag-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 016f97e15d9b22fd12ac7292692a9e675a775f2cc6077d4511251b99ab722314
MD5 965fae86f67823b913c7447ae1c540c0
BLAKE2b-256 f4b8e6bc729142abcb40935d272788be3446da290399cfc88b04928564c81536

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flexrag-0.2.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 95aed0531bd405e28ad9fe431de2e20e3027a7208f33010e1a0f3afac4100dc7
MD5 0e644391fcedfc8327c07c583a734b4a
BLAKE2b-256 4e8098fd41b860932eeaa5f4c1e005d175dbc29c2470703eb899cb606177c920

See more details on using hashes here.

File details

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

File metadata

  • Download URL: flexrag-0.2.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 403.4 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.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2898d056aab03c981da014f09608d168cfc190f42c41f8e77fca133962f5ba98
MD5 169a89c72d326a5a0c5ffd37f237b241
BLAKE2b-256 375c19eab6aa4e2d7c2726f91018e80dd197fc5395dadf1b5c2dca44e9d264f9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: flexrag-0.2.0-cp311-cp311-win32.whl
  • Upload date:
  • Size: 398.3 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.2.0-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 9117c9fcac8cb19436df979508010cde5a2e4df9103cf2c2602c388cfc19a209
MD5 1eeaf354fe678e1a4bfd9e6f42cd17c6
BLAKE2b-256 bce24d2fa5eefb9754ccdc2202b8c0c3924b888859bceaed2cbff8648e4ded2c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flexrag-0.2.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0864f3f258c989baf86ba1f95694e40ce63cf42a0572e6f0c2ca2fa4032e1d62
MD5 054d552a4bca88885db07707c5d3361d
BLAKE2b-256 ddc636be5b2b10c9a737712ba382bce8e45651cfa9a5305d41dc81e6bb0b190e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flexrag-0.2.0-cp311-cp311-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 c36e1c235bf5edf792bde8b078a3c7c9eac1d79f94c7dcc7ef0444c5f7b08fd7
MD5 87e0c4846f99dd156a838c3ec5b37906
BLAKE2b-256 2cf605fa32522ebf69dd3371e61ca2cc3f59a07a96594190a1ebfb334c37fb64

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flexrag-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d7f0b39c053360463ec8bd6207dc427fad3977eb000c830bf6c0dce0a3cc6b0c
MD5 08596a5ce68887ebdc54cd91487907bf
BLAKE2b-256 e67bbecc4186e1d0654527c866112937cabbcdd5039db3fe6090c80b2dd13db0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flexrag-0.2.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 7a84dce394235bb98ab12d16ec4d2bb59337c575724bf85bd0701743213265b9
MD5 78cc0ead38bda48526a3bbe427bcad6a
BLAKE2b-256 aace549f6f115d10f92f51ce5276209dfb7fffe8f60009e7889d22421e52a192

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