freshcrate
Skin:/
Home > Frameworks > FlexRAG

FlexRAG

FlexRAG: A RAG Framework for Information Retrieval and Generation.

Why this rank:Strong adoptionHealthy release cadence

Description

FlexRAG: A RAG Framework for Information Retrieval and Generation.

README

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

| Introduction Video | README (chinese) | Documentation | Retrievers | Examples |

FlexRAG is an innovative open-source framework designed to streamline the rapid reproduction, development, and evaluation of Retrieval-Augmented Generation (RAG) systems. It provides comprehensive support for various RAG scenarios, including text-based, multimodal, and web-accessible applications. With an end-to-end pipeline covering everything from data preparation to system evaluation, FlexRAG empowers researchers to efficiently share their work with the community and swiftly develop demonstrative prototypes based on their algorithms.


📖 Table of Contents

✨ Key Features

📢 News

  • 2025-06-17: Our publication FlexRAG: A Flexible and Comprehensive Framework for Retrieval-Augmented Generation is now available!
  • 2025-03-24: The Chinese documentation is now available! Please visit the documentation for more details.
  • 2025-02-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.

🖋️ Citation

If you use FlexRAG in your research, please cite our project:

@software{Zhang_FlexRAG_2025,
author = {Zhang, Zhuocheng and Feng, Yang and Zhang, Min},
doi = {10.5281/zenodo.14593327},
month = jan,
title = {{FlexRAG}},
url = {https://github.com/ictnlp/FlexRAG},
year = {2025}
}
@misc{zhang2025flexragflexiblecomprehensiveframework,
      title={FlexRAG: A Flexible and Comprehensive Framework for Retrieval-Augmented Generation}, 
      author={Zhuocheng Zhang and Yang Feng and Min Zhang},
      year={2025},
      eprint={2506.12494},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2506.12494}, 
}

❤️ Acknowledgements

This project benefits from the following open-source projects:

Release History

VersionChangesUrgencyDate
0.3.0## What's Changed * [FEAT] Add prepare corpus entrypoint by @ZhuochengZhang98 in https://github.com/ictnlp/FlexRAG/pull/29 * [REFACTOR] Configure optimize by @ZhuochengZhang98 in https://github.com/ictnlp/FlexRAG/pull/30 * [REFACTOR] Refactor retriever by @ZhuochengZhang98 in https://github.com/ictnlp/FlexRAG/pull/34 * [Fix] Remove python 3.14 in classifiers by @ZhuochengZhang98 in https://github.com/ictnlp/FlexRAG/pull/35 **Full Changelog**: https://github.com/ictnlp/FlexRAG/compare/0.Low6/10/2025
0.2.0## What's Changed * [REFACTOR] Optimize web retriever by @ZhuochengZhang98 in https://github.com/ictnlp/FlexRAG/pull/27 * [DOC] Add Chinese docs by @ZhuochengZhang98 in https://github.com/ictnlp/FlexRAG/pull/28 **Full Changelog**: https://github.com/ictnlp/FlexRAG/compare/0.1.12...0.2.0Low3/24/2025
0.1.12[FIX] Fix the `rebuild_index` entrypoint **Full Changelog**: https://github.com/ictnlp/flexrag/compare/0.1.11...0.1.12Low2/26/2025
0.1.11[FIX] Update setup.py to include assets. **Full Changelog**: https://github.com/ictnlp/flexrag/compare/0.1.10...0.1.11Low2/25/2025
0.1.10[FIX] change the assets paths for `run_interactive` entrypoints **Full Changelog**: https://github.com/ictnlp/flexrag/compare/0.1.9...0.1.10Low2/25/2025
0.1.9## What's Changed * [FEAT] Add huggingface intergration by @ZhuochengZhang98 in https://github.com/ictnlp/flexrag/pull/24 **Full Changelog**: https://github.com/ictnlp/flexrag/compare/0.1.8...0.1.9Low2/25/2025
0.1.8## What's Changed * [FIX] Update requirements by @ZhuochengZhang98 in https://github.com/ictnlp/flexrag/pull/18 * [FEAT] Optimize LoggerManager & RAGEvalDataset by @ZhuochengZhang98 in https://github.com/ictnlp/flexrag/pull/20 * [FEAT] Add chunking methods by @ZhuochengZhang98 in https://github.com/ictnlp/flexrag/pull/22 * [DOC] Optimize document by @ZhuochengZhang98 in https://github.com/ictnlp/flexrag/pull/23 **Full Changelog**: https://github.com/ictnlp/flexrag/compare/0.1.7...0.1.8Low2/13/2025
0.1.7## What's Changed * Fix bugs and add support for HugghingFace datasets by @ZhuochengZhang98 in https://github.com/ictnlp/flexrag/pull/17 **Full Changelog**: https://github.com/ictnlp/flexrag/compare/0.1.6...0.1.7Low2/5/2025
0.1.6Celebration For Chinese New Year 🎉🎉🎉 ## What's Changed * Optimize the documentation. by @ZhuochengZhang98 in https://github.com/ictnlp/flexrag/pull/12 and @ZhuochengZhang98 in https://github.com/ictnlp/flexrag/pull/13 * optimize the requirements by @ZhuochengZhang98 in https://github.com/ictnlp/flexrag/pull/14 * Add auto docstring for Register by @ZhuochengZhang98 in https://github.com/ictnlp/flexrag/pull/15 * Add run_retriever entrypoint and add some new retrieval metrics. by @ZhuocheLow1/27/2025
0.1.5## What's Changed * Add singlehop qa benchmark by @ZhuochengZhang98 in https://github.com/ictnlp/flexrag/pull/9 * Add wheels for Windows by @ZhuochengZhang98 in https://github.com/ictnlp/flexrag/pull/11 * Change document theme by @ZhuochengZhang98 in https://github.com/ictnlp/flexrag/pull/11 **Full Changelog**: https://github.com/ictnlp/flexrag/compare/0.1.4...0.1.5Low1/8/2025
0.1.4## What's Changed * [FIX] fix config item: corpus_path in example by @VincentXWD in https://github.com/ictnlp/flexrag/pull/3 * [FIX] fix bug in scann build_index by @ZhuochengZhang98 in https://github.com/ictnlp/flexrag/pull/6 * [FIX] fix bug in ElasticRetriever.__len__ when index is not initialized by @ZhuochengZhang98 in https://github.com/ictnlp/flexrag/pull/8 ## New Contributors * @VincentXWD made their first contribution in https://github.com/ictnlp/flexrag/pull/3 **Full ChangelogLow1/7/2025
0.1.3## What's Changed * Add document by @ZhuochengZhang98 in https://github.com/ictnlp/flexrag/pull/1 **Full Changelog**: https://github.com/ictnlp/flexrag/compare/0.1.2...0.1.3Low1/3/2025
0.1.21. Change project Name(Librarian -> FlexRAG); 2. fix several bugs: 2.1 Fix bug in cache; 2.2 Fix bug in stop_str options;Low12/31/2024
0.1.11. Fix bug in setup.py; 2. Add Github Actions. **Full Changelog**: https://github.com/ZhuochengZhang98/librarian/commits/0.1.1Low12/25/2024
0.1.0This is a test release.Low12/8/2024

Dependencies & License Audit

Loading dependencies...

Similar Packages

kg-ragThis project implements a comprehensive framework for Knowledge Graph Retrieval Augmented Generation (KG-RAG). It focuses on financial data from SEC 10-Q filings and explores how knowledge graphs can main@2026-06-03
fed-ragA framework for fine-tuning retrieval-augmented generation (RAG) systems.v0.0.27
monocleMonocle is a framework for tracing GenAI app code. This repo contains implementation of Monocle for GenAI apps written in Python. v0.8.3
transformersTransformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.v5.10.1
langgraphBuild resilient language agents as graphs.1.2.4

More in Frameworks

ctranslate2Fast inference engine for Transformer models
schemathesisProperty-based testing framework for Open API and GraphQL based apps
spec_driven_developSpec-Driven Develop is a platform-agnostic AI agent skill that automates the pre-development workflow for large-scale complex tasks. It is not a framework, not a runtime, not a package manager — it is
DrasilGenerate all the things (focusing on research software)