█

AI/TLDR

Buy me a coffee
Buy me a coffee

FlashRAG

A Python toolkit for reproducible RAG research with 23 built-in algorithms and 36 benchmark datasets

RAG Frameworks & PlatformsOpen source
Language
Python
License
MIT
$pip install flashrag-dev --pre
IN SHORT

What is FlashRAG?

FlashRAG is a Python toolkit for reproducing and developing Retrieval-Augmented Generation (RAG) research. It sits in the RAG Frameworks & Platforms category of the Retrieval & Knowledge (RAG) tools and is open-source, written in Python and licensed MIT. To get started: install FlashRAG.

Overview

FlashRAG is a Python toolkit for reproducing and developing Retrieval-Augmented Generation (RAG) research. It bundles 36 pre-processed benchmark datasets and 23 published RAG algorithms behind one consistent interface, so you can re-run reported results or build your own pipeline without re-implementing each method from scratch.

It is aimed at researchers and engineers who compare RAG methods and need numbers they can trust. Because every method shares the same components for retrieval, reranking, generation, and compression, results across algorithms stay comparable and experiments are easier to reproduce.

As a RAG framework, FlashRAG focuses on the experiment loop rather than production serving. It includes preprocessing scripts for corpus handling and index building, and it uses tools like Faiss for vector search and vLLM for faster LLM inference.

What it does

  • 23 pre-implemented RAG algorithms with reported results, including 7 reasoning-based methods for multi-hop tasks
  • 36 pre-processed benchmark RAG datasets for testing and validating model performance
  • Modular components for RAG pipelines: retrievers, rerankers, generators, and compressors
  • Preprocessing scripts for corpus processing, retrieval index building, and document pre-retrieval
  • Faster execution with vLLM and FastChat for LLM inference and Faiss for vector index management
  • A built-in UI to configure RAG baselines and run evaluation scripts visually

Getting started

Install the package, then assemble a RAG pipeline from FlashRAG's config and pipeline classes.

Install FlashRAG

Install the pre-release package from PyPI. You can also clone the repo and install from source.

bashbash
pip install flashrag-dev --pre

Add optional acceleration

For vLLM-accelerated inference and vector indexing, install the full extras and Faiss.

bashbash
pip install flashrag-dev[full]
pip install vllm>=0.4.1
conda install -c pytorch faiss-cpu=1.8.0

Run a sequential pipeline

Load a config and dataset, then run a SequentialPipeline with evaluation enabled.

pythonpython
from flashrag.config import Config
from flashrag.utils import get_dataset
from flashrag.pipeline import SequentialPipeline

config_dict = {'data_dir': 'dataset/'}
my_config = Config(
    config_file_path='my_config.yaml',
    config_dict=config_dict
)

all_split = get_dataset(my_config)
test_data = all_split['test']

pipeline = SequentialPipeline(my_config)
output_dataset = pipeline.run(test_data, do_eval=True)

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Reproduce reported results for published RAG methods using the same datasets and settings
  • Benchmark several retrieval and generation strategies side by side on standard datasets
  • Prototype a custom RAG pipeline by mixing retrievers, rerankers, generators, and compressors
  • Study reasoning-based RAG methods on complex multi-hop question answering tasks

How FlashRAG compares

FlashRAG alongside other open-source rag frameworks & platforms tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Dify★ 162kAn open-source platform with a visual workflow builder for creating LLM and RAG applications without writing much code.
graphify★ 155kTurns a folder of code, docs, PDFs and images into a local knowledge graph with tree-sitter AST parsing and Leiden communities — queryable by agents over MCP, no vector store.
RAGFlow★ 95kA RAG engine built around deep document understanding that turns complex files into a grounded, citation-backed question-answering layer.
Context7★ 65.7kContext7 pulls current, version-specific documentation and code examples for any library and feeds them into your LLM, available as a CLI skill or an MCP server.
Pathway★ 61.9kA Python framework with a Rust streaming engine that keeps ETL, real-time analytics and RAG pipelines continuously up to date as source data changes.
LightRAG★ 41kA graph-based RAG system that builds an entity-and-relationship knowledge graph for fast retrieval and easy incremental updates.
PageIndex★ 40.8kPageIndex turns long PDFs into a table-of-contents tree and uses LLM reasoning to retrieve relevant sections, with no vector database and no chunking.
FlashRAG★ 3.6kA Python toolkit for reproducible RAG research with 23 built-in algorithms and 36 benchmark datasets