跳到主要内容Skip to main content
RAG 与知识库RAG & Knowledge Bases生产可用Production

R2R

SciPhi-AI / R2R

生产化 RAG 服务:文档摄入、混合检索、知识图谱、agentic RAG、用户与租户管理,带 REST API 和 Web UI。A production-oriented RAG service: document ingestion, hybrid retrieval, knowledge graphs, agentic RAG, users and tenants, with a REST API and web UI.

8.1k stars 654 forks Python 语言Language MIT 许可License 最近推送Last push 2025-11-07

为什么选Why choose it

  • 想快速搭一个可登录、可管理文档和用户的自托管 RAG 服务,它比从零拼 FastAPI + 向量库完整。Ingestion through serving is one service.
  • 混合检索、图谱和 agentic 检索都有现成实现,适合做企业知识库原型。Hybrid retrieval and graph features are included.
  • API 边界清楚,方便替换前端或接入现有业务系统。Tenant and user management are built in.

不适合Not for

只需要一个脚本查 PDF,或不想维护 Postgres/pgvector 与后台服务。You need a lightweight library.
对延迟和成本极敏感的简单 FAQ,直接向量检索更轻。You cannot operate a service with a database and API.

最小上手Minimum setup

  1. 按 docker compose 起 Postgres/pgvector 与 R2R 服务。Ingest a small corpus and run a hybrid query.
  2. 上传 5–10 份自己的文档,跑一次检索和一次 RAG 问答。Create two tenants and test isolation.
  3. 开用户/租户与权限,检查文档隔离和引用返回。Compare agentic and plain RAG on the same question.

依赖与成本Dependencies and cost

Docker;Postgres + pgvector;模型 API 或本地 embedding/LLM 端点。Check runtime, model weights and external service dependencies in the README.

许可与使用边界License and usage boundaries

代码 MIT;模型与数据另计。Code is MIT; model weights, training data and generated content may have separate terms — check each before commercial use.

开源不等于可商用:GPL / AGPL 有传染性;代码许可、模型许可、生成内容许可要分开看。上线前读仓库 LICENSE 与模型卡,必要时让法务确认。Open source is not automatically commercial-use friendly: GPL / AGPL are copyleft; code, model and output licenses are separate. Read the LICENSE and model card before launch, and involve legal when needed.

替代与相邻Alternatives and neighbors

  • RAGFlow — 先试这个Start here,带文档解析、切分、检索与引用的 RAG 平台,适合把一套知识库跑起来。A RAG platform with document parsing, chunking, retrieval and citations, built to get a knowledge base running.
  • Dify — 先试这个Start here,把 prompt、RAG、agent、工作流和模型接入做成可视化平台。A visual platform for prompts, RAG, agents, workflows and model connections.
  • GraphRAG — 规模 / 性能Scale / performance,微软的 GraphRAG 实现:从文本抽实体和关系建图,生成社区摘要,支持 global/local 等查询模式。Microsoft’s GraphRAG implementation: extract entities and relations from text, build communities, generate summaries and support global and local queries.

下一步Next steps

  • 打开 GitHub,先读 README、LICENSE、最近 release 与 issue。Open GitHub and read the README, LICENSE, latest release and issues first.
  • 按“部署依赖 / 显存 / 数据 / 网络 / 权限”列一张上手清单。Make an onboarding checklist for deployment dependencies, VRAM, data, network and permissions.
  • 用一个小样本跑通,再决定是否进生产;不要直接上生产数据。Run a small sample first, then decide on production; never start with production data.

GitHub 仓库 ↗GitHub repository ↗ 文档 ↗Docs ↗ 加入对比Add to compare

快照口径:stars / forks / language / license / pushed_at 来自 GitHub API 2026-11-20 快照;之后的变化没有回写。标签与“适合 / 不适合”是编辑判断,不是 GitHub 元数据。Snapshot: stars / forks / language / license / pushed_at come from the GitHub API snapshot on 2026-11-20; later changes are not written back. Tags and “fit / not fit” are editorial judgments, not GitHub metadata.
不背书:本站只做索引与风险提示,不审计代码、不保证安全、不替你做许可判断。仓库脚本与模型权重请自行审查。No endorsement: this site only indexes and flags risks; it does not audit code, guarantee security or make license decisions for you. Review repository scripts and model weights yourself.