Skip to content
RAG Explained Better

R2R for RAG

A production-oriented RAG framework with ingestion and orchestration — batteries included, opinions included.

R2R (RAG to Riches) is an open-source agentic retrieval system from SciPhi-AI built around a RESTful API — multimodal ingestion, hybrid search, knowledge graphs, and a Deep Research agent in one server. As of July 2026, PyPI lists r2r at 3.6.6 (released 17 August 2025, MIT license, Python 3.10–3.12), and the live GitHub capture shows about 7,900 stars. This page states what R2R gives a RAG build and where its production breadth becomes operational cost.

What is R2R, and what part of a RAG system does it own?

R2R owns the retrieval service layer — ingest, index, search, graph extraction, and cited generation exposed over HTTP — not the application UI wrapped around it (SciPhi-AI GitHub README, 2026; AI/TLDR tool summary, 2026). You talk to it through a REST API and Python or JavaScript SDK clients, so document management and retrieval logic live in one service instead of scattered across your app code.

That split matters because R2R standardizes how documents become searchable context and how answers cite chunks. It does not remove the need for good parsing, chunking, embedding choices, or backend store configuration. Those stages still set what retrieval can find. The broader author-layer context for these tools sits at RAG frameworks.

What does R2R give you for ingestion, search, and agentic retrieval?

R2R ships multimodal ingestion, hybrid retrieval, graph extraction, cited RAG, access control, and an agentic research loop in one server (GitHub README, 2026). The live README lists ingestion for .txt, .pdf, .json, .png, and .mp3; hybrid search that fuses semantic and keyword retrieval with reciprocal rank fusion; automatic knowledge-graph entity and relationship extraction; and a Deep Research API that runs multi-step reasoning over your knowledge base and the web.

Unstructured’s September 2024 integration post adds another concrete ingestion path: R2R can use the Unstructured open-source library by default for local builds, or the Unstructured Serverless API for production, covering 64+ file types including complex PDFs with tables and embedded graphics. That pairing matters for retrieval quality because a RAG server is only as good as the text its parser extracts.

R2R for RAG — what each major capability buys you, and what it still does not solve
CapabilityWhat you getWhat it still does not solve
Multimodal ingestionOne API path for text, PDF, JSON, images, and audioExtraction quality still depends on your parsing provider and document messiness
Hybrid searchSemantic plus keyword retrieval with reciprocal rank fusion in one queryYou still tune limits, filters, and when hybrid beats pure vector for your corpus
Knowledge graphsAutomatic entity and relationship extraction for GraphRAG-style retrievalGraph build and enrichment jobs add orchestration work beyond a simple vector index
Cited RAGAnswers grounded in retrieved chunks with citation metadataCitations do not fix wrong chunks — retrieval quality still sets the ceiling
Deep Research agentMulti-step reasoning that can search, summarize, and refine before answeringAgent loops add latency and complexity versus single-turn retrieve-then-generate
User and collection managementAuthentication and collection scoping for multi-tenant appsYou configure identity, permissions, and operational policy yourself

For the agent pattern itself — when multi-step retrieval beats one-shot RAG — see agentic RAG. For how GraphRAG changes retrieval mechanics, see graph RAG; this profile only names that R2R exposes graph build commands, not the fusion math behind them.

How does R2R deploy in light mode, full mode, and managed cloud?

R2R’s quickest path is light mode: install the Python package, set an OpenAI API key, and run python -m r2r.serve to bring up the API on http://localhost:7272 (GitHub README, 2026; PyPI project page, 2026). That mode is meant for experimentation without standing up the full dependency stack.

Full mode uses Docker Compose with Postgres and pgvector via compose.full.yaml — the path Bright Coding’s July 2025 walkthrough and Unstructured’s September 2024 post both describe for production-shaped deployments. Unstructured’s post also documents r2r serve –docker and optional config that points parsing and chunking at the Unstructured API. The official docs link a managed SciPhi Cloud option; this page does not quote Cloud pricing because public list prices were not verified in the July 2026 teardown.

The honest limit is operational: once you leave light mode, you are running Postgres, workers, configuration, and upgrades — not a single-file demo. Full command-by-command setup belongs on building a RAG pipeline; broader deployment trade-offs sit at RAG deployment.

What are R2R’s capabilities and limits, side by side?

R2R is strongest when you want a batteries-included retrieval server with graphs and agents, and weakest when you need the lightest possible FAQ bot with no service to operate. The trade-off is clearer side by side than in a feature bullet list.

R2R for RAG — each capability beside the limit that comes with it, as of July 2026
CapabilityWhat you getThe limit that rides along
REST server + SDKsOne service owns ingest, search, RAG, and graph operationsYou run, monitor, secure, and upgrade that service in production
Unstructured-backed parsing64+ file types and complex PDF/table extraction paths (Unstructured, 2024)OSS parsing suits prototyping; Serverless API is the production-oriented Unstructured path with its own cost model
Hybrid + GraphRAGSemantic, keyword, and relationship-aware retrieval in one stackGraph jobs use orchestration (Hatchet in Unstructured’s integration post) — more moving parts than vector-only RAG
Deep Research agentMulti-step cited answers for research-style questionsOverkill for simple single-turn Q&A where retrieve-then-generate is enough
Auth and collectionsMulti-tenant-ready document scopingIdentity, access policy, and audit requirements remain yours to design
Open source (MIT)About 7,900 GitHub stars in the live July 2026 captureFeature breadth creates a steeper learning curve than minimal RAG wrappers

The two limits practitioners hit first are self-hosting load and feature breadth. The first is the price of owning the retrieval server. The second is why teams building a thin FAQ wrapper often prefer a smaller framework or a direct vector-database SDK instead. How reciprocal rank fusion combines scores — named on the GitHub README — is a retrieval mechanism question at hybrid search, not repeated here.

When should you choose R2R over LangChain, LlamaIndex, or a bare retrieval API?

Choose R2R when you want a dedicated retrieval server with hybrid search, knowledge graphs, and agentic research already wired — especially for multimodal corpora and citation-heavy internal knowledge bases (AI/TLDR when-to-use list, 2026; practitioner fit notes in live comparison pages, 2026).

Against LangChain, R2R is the better fit when retrieval infrastructure — not general LLM-app orchestration — is the product. Against LlamaIndex, R2R is the better fit when you want an opinionated server with auth and graph features rather than a Python data-layer toolkit you compose yourself. Against a bare vector-database API plus your own retrieve-then-generate code, R2R earns its overhead when cited RAG, graphs, and Deep Research are requirements from day one — not when you only need top-k search over one embedding index.

Do not default to R2R when the app is a thin single-turn FAQ, when your team cannot operate a self-hosted retrieval service, or when the real bottleneck is chunking and index quality rather than missing server features. The scored verdict across LangChain, LlamaIndex, Haystack, and building it yourself belongs on choosing a RAG framework. Deeper sibling profiles live at LangChain for RAG and LlamaIndex for RAG.

What are the most common R2R questions?

These answers cover the recurring R2R questions from the July 2026 query harvest and ranking pages: what the system is, whether it is open source, which retrieval modes it supports, how to run it locally, and when to pick something simpler.

What is R2R?

R2R (RAG to Riches) is an open-source agentic retrieval system from SciPhi-AI built around a RESTful API. It handles multimodal document ingestion, hybrid search, knowledge-graph extraction, cited RAG, and a Deep Research agent for multi-step reasoning over your corpus and the web.

Is R2R open source?

Yes. The PyPI package r2r 3.6.6 is MIT-licensed as of the July 2026 capture, and the SciPhi-AI/R2R GitHub repository is public. SciPhi also links a managed SciPhi Cloud deployment path in the official docs; that is separate from the open-source server.

Does R2R support hybrid search and knowledge graphs?

Yes. The GitHub README lists hybrid search that fuses semantic and keyword retrieval with reciprocal rank fusion, plus automatic knowledge-graph entity and relationship extraction. Unstructured's 2024 integration post documents GraphRAG workflows with create-graph and enrich-graph commands after ingestion.

How do you run R2R locally?

Light mode is pip install r2r, export OPENAI_API_KEY, and run python -m r2r.serve to start the API on http://localhost:7272. Full mode uses Docker Compose with Postgres via compose.full.yaml; Unstructured's post also documents r2r serve --docker for containerized deployments.

When should you avoid R2R?

Skip R2R when you only need a thin single-turn FAQ bot, when your team cannot operate a self-hosted retrieval service, or when the real problem is chunking and index quality rather than missing server-side RAG features. Simpler frameworks or a direct vector-database SDK are often enough for retrieve-then-generate only.