R2R (RAG to Riches) is an open-source AI retrieval system from SciPhi — a production-oriented engine for retrieval-augmented generation that runs behind a RESTful API. You point it at your own documents, and it handles ingestion, chunking, embedding, hybrid search and answer generation with citations, so an application can query a private knowledge base without you assembling a vector database, an embedder, a reranker and a prompt layer by hand. It is meant to be self-hosted: a light mode installs from pip, a full mode runs as a Docker Compose stack with Postgres and pgvector.
r2r) and JavaScript/TypeScript clients wrap the same API, and the service ships an application UI for browsing documents, collections, chats, users and ingestion logs.Open source — MIT licence, so it can be used commercially and modified freely. Running the full stack needs an OPENAI_API_KEY (or another supported provider) for embeddings and generation, which is a separate cost from the software itself.
Teams building internal search, support assistants or research tools over a private document set, who want retrieval as a service they host rather than a managed vendor. It is heavier than a single-purpose search library — expect to run Postgres and a model provider alongside it.
Note, October 2026: the project’s hosted documentation site (r2r-docs.sciphi.ai) is currently offline, so the GitHub repository is the canonical source for installation and API reference.