
R2R
R2R (Reason to Retrieve) is an advanced AI retrieval system that provides production-ready Retrieval-Augmented Generation (RAG) capabilities with multimodal content ingestion, hybrid search, knowledge graphs, and comprehensive document management through a RESTful API.
https://github.com/SciPhi-AI/R2R?ref=aipure

Product Information
Updated:Apr 9, 2025
What is R2R
R2R is a powerful library and platform designed to enhance AI-powered document understanding and retrieval. It combines document processing, AI-powered search and generation, and analytics tools to help organizations implement efficient and scalable RAG systems. The platform includes both a RESTful API and SDKs for Python and JavaScript, making it accessible for developers while offering enterprise-grade features like user authentication, access control, and comprehensive document management.
Key Features of R2R
R2R (Reason to Retrieve) is an advanced AI retrieval system that combines Retrieval-Augmented Generation (RAG) with production-ready features built around a RESTful API. It offers comprehensive capabilities including multimodal content ingestion for various file formats, hybrid search combining semantic and keyword approaches, knowledge graph generation, agentic reasoning, and robust user/document management. The system includes a Deep Research API that enables multi-step reasoning by fetching relevant data from both internal knowledge bases and external sources.
Multimodal Content Ingestion: Supports parsing of multiple file formats including .txt, .pdf, .json, .png, .mp3, enabling diverse content integration into the knowledge base
Hybrid Search Architecture: Combines semantic and keyword search with reciprocal rank fusion to provide more accurate and contextually relevant search results
Agentic RAG System: Integrates reasoning agents with retrieval capabilities, allowing for more sophisticated query processing and context-aware responses
Knowledge Graph Generation: Automatically extracts entities and relationships from content to create interconnected knowledge graphs for better information understanding
Use Cases of R2R
Enterprise Document Management: Organizations can use R2R to manage, search, and extract insights from large collections of internal documents and knowledge bases
Research and Analysis: Researchers can leverage the Deep Research API to synthesize information from multiple sources and generate comprehensive analysis
Customer Support Enhancement: Support teams can utilize R2R to quickly retrieve relevant information and generate accurate responses to customer queries
Knowledge Discovery: Teams can uncover hidden connections and insights within their data through the knowledge graph and hybrid search capabilities
Pros
Comprehensive feature set with production-ready capabilities
Flexible deployment options (cloud-based or self-hosted)
Strong integration capabilities through RESTful API
Cons
Requires API key and potentially significant setup for self-hosted version
May require substantial computational resources for full functionality
How to Use R2R
Install R2R SDK: Install the SDK using pip for Python (pip install r2r) or npm for JavaScript (npm i r2r-js)
Set up API Key: Get an API key from SciPhi Cloud dashboard and set it as environment variable: export R2R_API_KEY=pk_..sk_...
Initialize Client: Create R2R client instance - Python: from r2r import R2RClient; client = R2RClient() or JavaScript: const { r2rClient } = require('r2r-js'); const client = new r2rClient()
Ingest Documents: Upload documents using client.documents.create(file_path='/path/to/file') or use sample documents with client.documents.create_sample(hi_res=True)
List Documents: View uploaded documents using client.documents.list()
Basic Search: Perform basic search with: results = client.retrieval.search(query='Your search query here')
RAG with Citations: Get responses with citations using: response = client.retrieval.rag(query='Your question here')
Agentic Reasoning: Use advanced reasoning with: response = client.retrieval.agent(message={'role':'user', 'content': 'Your complex query'}, rag_generation_config={configuration parameters})
Monitor Status: Check document processing status and manage documents through the dashboard or API endpoints
Access Additional Features: Explore hybrid search, knowledge graphs, and multimodal content ingestion through the provided API endpoints and documentation at r2r-docs.sciphi.ai
R2R FAQs
R2R (Reason to Retrieve) is an advanced AI retrieval system that supports Retrieval-Augmented Generation (RAG) with production-ready features. It's built around a RESTful API and offers multimodal content ingestion, hybrid search, knowledge graphs, and comprehensive document management.
R2R Video
Popular Articles

VideoIdeas.ai: The Ultimate Guide to Creating Viral YouTube Videos in Your Unique Style (2025)
Apr 11, 2025

GPT-4o Full Review: Best AI Image Generator for Everyone 2025
Apr 8, 2025

Reve 1.0: The Revolutionary AI Image Generator and How to Use
Mar 31, 2025

How to Install Hunyuan Image-to-Video in ComfyUI 2025: Complete Step-by-Step Guide
Mar 24, 2025