https://github.com/SciPhi-AI/R2R Skip to content Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} SciPhi-AI / R2R Public * Notifications * Fork 9 * Star 253 * A framework for rapid development and deployment of production-ready RAG systems docs.sciphi.ai License MIT license 253 stars 9 forks Branches Tags Activity Star Notifications * Code * Issues 2 * Pull requests 1 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights SciPhi-AI/R2R This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main BranchesTags Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 153 Commits .github/workflows .github/workflows docs docs examples examples r2r r2r web web .env.example .env.example .flake8 .flake8 .gitignore .gitignore .isort.cfg .isort.cfg CODE_OF_CONDUCT.md CODE_OF_CONDUCT.md CONTRIBUTOR.md CONTRIBUTOR.md LICENSE.md LICENSE.md MANIFEST.md MANIFEST.md README.md README.md config.json config.json pyproject.toml pyproject.toml setup_config.sh setup_config.sh View all files Repository files navigation * README * Code of conduct * MIT license R2R: Production-ready RAG systems. Docs Discord Github Stars Commits-per-week License: MIT A semi-opinionanted RAG framework. Sciphi Framework R2R was conceived to bridge the gap between experimental RAG models and robust, production-ready systems. Our semi-opinionated framework cuts through the complexity, offering a straightforward path to deploy, adapt, and maintain RAG pipelines in production. We prioritize simplicity and practicality, aiming to set a new industry benchmark for ease of use and effectiveness. Quick Install: Install R2R directly using pip: # use the `'r2r[all]'` to download all required deps pip install 'r2r[parsing]' Links Join the Discord server Read our Docs Basic Examples The project includes several basic examples that demonstrate application deployment and interaction: 1. app.py: This example runs the main application, which includes the ingestion, embedding, and RAG pipelines served via FastAPI. poetry run uvicorn examples.basic.app:app 2. run_client.py: This example should be run after starting the main application. It demonstrates uploading text entries as well as a PDF to the local server with the python client. Further, it shows document and user-level vector management with built-in features. poetry run python -m examples.basic.run_client 3. run_pdf_chat.py: An example demonstrating upload and chat with a more realistic pdf. # Ingest pdf poetry run python -m examples.pdf_chat.run_demo ingest # Ask a question poetry run python -m examples.pdf_chat.run_demo search "What are the key themes of Meditations?" 4. web: A web application which is meant to accompany the framework to provide visual intelligence. cd web && pnpm install # Serve the web app pnpm dev 60s demo of the examples slim_demo.mp4 Full Install: Follow these steps to ensure a smooth setup: 1. Install Poetry: + Before installing the project, make sure you have Poetry on your system. If not, visit the official Poetry website for installation instructions. 2. Clone and Install Dependencies: + Clone the project repository and navigate to the project directory: git clone git@github.com:SciPhi-AI/r2r.git cd r2r + Install the project dependencies with Poetry: # See pyproject.toml for available extras # use "all" to include every optional dependency poetry install --extras "parsing" 3. Configure Environment Variables: + You need to set up cloud provider secrets in your .env. At a minimum, you will need an OpenAI key. + The framework currently supports PostgreSQL (locally), pgvector and Qdrant with plans to extend coverage. + If starting from the example, copy .env.example to .env to apply your configurations: cp .env.example .env Key Features * Rapid Deployment: Facilitates a smooth setup and development of production-ready RAG systems. * [?][?] Flexible Standarization: Ingestion, Embedding, and RAG with proper Observability. * Easy to modify: Provides a structure that can be extended to deploy your own custom pipelines. * Versioning: Ensures your work remains reproducible and traceable through version control. * Extensibility: Enables a quick and robust integration with various VectorDBs, LLMs and Embeddings Models. * OSS Driven: Built for and by the OSS community, to help startups and enterprises to quickly build with RAG. * Deployment Support: Available to help you build and deploy your RAG systems end-to-end. Core Abstractions The framework primarily revolves around three core abstractions: * The Ingestion Pipeline: Facilitates the preparation of embeddable 'Documents' from various data formats (json, txt, pdf, html, etc.). The abstraction can be found in ingestion.py. * The Embedding Pipeline: Manages the transformation of text into stored vector embeddings, interacting with embedding and vector database providers through a series of steps (e.g., extract_text, transform_text, chunk_text, embed_chunks, etc.). The abstraction can be found in embedding.py. * The RAG Pipeline: Works similarly to the embedding pipeline but incorporates an LLM provider to produce text completions. The abstraction can be found in rag.py. Each pipeline incorporates a logging database for operation tracking and observability. About A framework for rapid development and deployment of production-ready RAG systems docs.sciphi.ai Topics search retrieval artificial-intelligence large-language-models retrieval-augmented-generation Resources Readme License MIT license Code of conduct Code of conduct Activity Custom properties Stars 253 stars Watchers 2 watching Forks 9 forks Report repository Releases 3 v0.1.1 (beta) Latest Feb 26, 2024 + 2 releases Packages 0 No packages published Contributors 4 * * * * Languages * Python 63.7% * TypeScript 24.6% * SCSS 6.2% * Shell 3.7% * Other 1.8% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.