← Back to Leaderboard
FRUC-NLPIR

RUC-NLPIR/FlashRAG

A modular Python RAG SDK for reproducing benchmarks and testing retrieval pipelines

Engineering Health (Methodology)
A+ · 93/100
Maintenance Activity
● Updated 7d ago
Latest Release
v0.4.1
Commercial License Check
MIT · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption18/25
Release Cadence20/20
License Clarity20/20
GPU
Total Stars
★ 3,625
24h Growth
+0
7d Growth
+2
Forks
335

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

RUC-NLPIR/FlashRAG Star History (2024-03-12 - 2026-12-04) ALL-TIME STAR HISTORY (2024-03 – 2026-12) +3.6k in 997d · avg +4/day 3.8k 1.9k 0 2024-03-12: ★ 12024-05-18: ★ 42024-07-20: ★ 8902024-09-21: ★ 1,0762024-11-23: ★ 1,3022025-01-25: ★ 1,6202025-03-29: ★ 1,9892025-05-31: ★ 2,2792025-08-02: ★ 2,5082025-10-04: ★ 2,9432025-12-06: ★ 3,1202026-02-07: ★ 3,2472026-04-11: ★ 3,3912026-06-13: ★ 3,4632026-08-15: ★ 3,5162026-10-17: ★ 3,5832026-12-04: ★ 3,625 ★ 3.6k 2024-03 2025-07 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

FlashRAG is a configuration-driven Python SDK that composes retrievers, rerankers, compressors, and generators into RAG pipelines. Config accepts YAML plus explicit overrides. get_dataset loads dataset splits, and a ready-made pipeline such as SequentialPipeline initializes components from configuration. A PromptTemplate can customize how retrieved references and the question are presented to the generator.

The pipeline abstraction covers sequential execution, conditional routing via a judger, branching and merging, and iterative retrieval and generation. For a new execution flow, subclass BasicPipeline, use factories such as get_retriever and get_generator as needed, and implement run. The manifest lists torch, transformers>=4.40.0, fschat, and openai; Faiss is installed separately for dense indexing, and vLLM is an optional inference backend.

Key Capabilities & Differentiators

FlashRAG includes 36 preprocessed benchmark datasets and 23 implemented methods, seven of which combine reasoning with retrieval. The implementations differ in how they use evidence: REPLUG combines generation probabilities across branches, FLARE retrieves dynamically during generation, and IRCoT interleaves retrieval with reasoning. Running pipeline.run(..., do_eval=True) returns intermediate outputs and per-item metric scores for failure analysis, while the Web UI exposes configuration and evaluation runs.

The flashrag.retriever.index_builder CLI accepts JSONL records with id and contents. It supports dense Faiss indexes, BM25 through BM25s or Pyserini, and SPLADE through Seismic. Dense indexing exposes controls for precision, sequence length, batch size, pooling, and Faiss index type. The toolkit also supports CLIP-style multimodal retrieval, LLaVA, Qwen, and InternVL generators, and web search through a Serper API key.

Trade-offs & Limitations

FlashRAG is most useful when the pipeline itself is the experiment: keep the corpus, model, and evaluation settings fixed while changing how retrieval and generation interact. For one fixed path, wiring Faiss or BM25s directly to a generator can be simpler. FlashRAG saves benchmark and orchestration work, but a production team should still budget separately for serving, observability, and index refresh rather than assuming the research UI covers those needs.

Backend choice affects both evaluation validity and operating cost. An embedding model's pooling and query instructions must match how the index was built; FlashRAG supplies instructions for E5 and BGE, but other models may need explicit settings. Iterative and branching methods can add retrieval or generation calls, so compare quality gains against latency or API spend on your workload. The SDK's MIT license does not determine the terms for model weights, corpora, or hosted services.

Hardware & Deployment Guide

Source installation requires Python 3.10+ and supports pip install -e .; flashrag-dev is also available through a prerelease pip install. Prepare a corpus and a matching index before running a local retrieval pipeline. For dense retrieval, the listed Conda recipes use Faiss 1.8.0 with CPU or GPU packages. The listed GPU package targets Linux x86_64 and CUDA 11.4 or 12.1; verify compatibility with the target environment rather than assuming the same package works across platforms.

For offline operation, stage the corpus, indexes, and local model weights and avoid OpenAI and Serper paths. A CPU BM25 baseline can validate retrieval before you provision acceleration. Size local workloads against the chosen weights, sequence lengths, batches, corpus and index footprint, and concurrency; there is no universal VRAM figure. v0.4.0 added a RAG failure-mode debugging checklist, and v0.4.1 addressed empty predictions in ROUGE and BLEU scoring, empty retrieval results in precision scoring, and invalid Faiss neighbors in multimodal retrieval. Rebaseline evaluations that exercise those edge cases when upgrading.

Configuration: Explicit config_dict values override YAML, so experiment variants can share a base configuration.
Control flow: Sequential, conditional, branching, and loop pipelines cover both single-pass and iterative retrieval.
Retrieval: Faiss-backed dense search, BM25s or Pyserini for BM25, and Seismic for SPLADE neural sparse retrieval.
Benchmarking: 36 preprocessed datasets and 23 implemented methods, including seven reasoning-based methods.
Diagnostics: pipeline.run(..., do_eval=True) returns intermediate results and per-item metric scores.
Multimodality: CLIP-style retrievers pair with supported generator families including LLaVA, Qwen, and InternVL.
Best For

Research and applied RAG teams comparing retrieval and reasoning methods on shared benchmarks or validating a custom pipeline before production integration.

Skip If

You need a turnkey production service, or one fixed retrieve-and-generate path with minimal dependencies and no benchmark harness.

Reviewed on 2026-12-04 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

GPU
pip install flashrag-dev --pre

Comparison vs. Top RAG, Data & Memory Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
FlashRAG ★3.6k+2PythonMITA modular Python RAG SDK for reproducing benchmarks and testing retrieval pipeli
haystack27.2k+53PythonApache-2.0Component-based Python orchestration for RAG pipelines and tool-using agents
langextract39.5k+85PythonApache-2.0Python SDK for extracting structured data with traceable source spans
llmware14.8k+8PythonApache-2.0Local-first Python RAG SDK for document retrieval and small-model inference.

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/RUC-NLPIR/FlashRAG.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

RUC-NLPIR/FlashRAG Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about FlashRAG

How do I integrate a new retrieval or generation flow?

Use a ready-made pipeline if only the components or prompt need to change. Pass YAML and a config_dict to Config; dictionary values override the file. If the execution flow itself changes, subclass BasicPipeline, initialize the components you need, and implement run.

Do I need a GPU, and how should I size VRAM?

A BM25 baseline does not need an embedding model or GPU Faiss. For dense retrieval, CPU Faiss is an option, but corpus embedding and local generation still have separate compute requirements. Size VRAM against the actual models, context lengths, batch sizes, and concurrency. Hosted generation can remove the local generator from that budget, but it adds network latency and does not eliminate retrieval costs.

Can we self-host FlashRAG commercially under the MIT license?

Yes. FlashRAG's MIT license permits commercial self-hosting and modification; retain the required copyright and permission notices when redistributing it. Review model weights, datasets, corpora, and dependencies separately. If you use OpenAI or Serper, check the applicable service terms and what data leaves your environment.

When is FlashRAG a better choice than building directly on Faiss or BM25s?

Use FlashRAG when the task is to compare retrieval and reasoning strategies against shared benchmarks and inspect intermediate outputs. If the application needs only one fixed retrieval-and-generation path, a direct integration with Faiss or BM25s and your chosen generator can have fewer moving parts, but you will need to build your own evaluation workflow.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining RUC-NLPIR/FlashRAG? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature RUC-NLPIR/FlashRAG on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare