General Introduction
R2R (RAG to Riches) is a state-of-the-art AI retrieval system supporting Retrieval Augmented Generation (RAG) functionality with production-ready features. Built on a containerized RESTful API, the system provides multimodal content parsing, hybrid search capabilities, configurable GraphRAG, and comprehensive user and document management features.R2R is capable of parsing content in a variety of formats, such as text, PDF, JSON, images, and audio files, and combines semantic and keyword searches for higher relevance retrieval. In addition, R2R supports automatic extraction of entities and relationships to build knowledge graphs, which are clustered and summarized by GraphRAG to provide richer insights to users.
Function List
- Multimodal Content Analysis: Support for parsing text, PDF, JSON, images, audio and other formats.
- Hybrid Search: Combining semantic and keyword search to improve retrieval relevance through reciprocal ranking fusion.
- knowledge map: Automatically extract entities and relationships to build a knowledge graph.
- GraphRAG: Cluster and summarize the created graphs to provide richer insights.
- user management: Efficiently manage documents and user roles.
- observability: Monitor and analyze RAG engine performance.
- configuration management: Set up the application using an intuitive configuration file.
- instrument panels: An open source admin dashboard based on React and Next.js that interacts with R2R through a GUI.
📊 GraphRAG:
GraphRAG extends traditional RAG with the community detection and summarization capabilities of the Knowledge Graph.By understanding how information is aggregated and connected in a document, this approach provides richer contextual information and more comprehensive answers.
Using Help
Installation process
R2R can be quickly installed via Docker or pip. Here are the detailed installation steps:
Installation using pip
- Install the R2R core package:
pip install r2r
- Configure environment variables:
export OPENAI_API_KEY=sk-...
export POSTGRES...
- Install the complete R2R core and dependencies:
pip install 'r2r[core,ingestion-bundle]'
r2r --config-name=default serve
Installation with Docker
- Configure environment variables:
export OPENAI_API_KEY=sk-...
- Start R2R and its dependencies:
r2r serve --docker --full
Function Operation Guide
Multimodal Content Analysis
R2R supports parsing content in multiple formats, including text, PDF, JSON, images and audio files. Users can upload these files through the API and the system will automatically parse and extract useful information.
Hybrid Search
R2R combines semantic and keyword search to improve retrieval relevance through reciprocal ranking fusion. Users can submit queries through the API and the system will return the most relevant results.
knowledge map
R2R can automatically extract entities and relationships to build knowledge graphs. Users can view and manage these knowledge graphs through an API to gain deeper insights.
GraphRAG
The GraphRAG feature allows users to cluster and summarize created graphs, providing richer insights. Users can configure and utilize the GraphRAG feature through the API.
user management
R2R provides comprehensive user and document management capabilities. Users can manage documents and user roles via a dashboard or API to ensure efficient system operation.
observability
R2R provides tools to monitor and analyze the performance of the RAG engine. Users can view system performance metrics through the dashboard to identify and resolve issues in a timely manner.
configuration management
The R2R is set up using an intuitive configuration file. Users can modify the configuration file as needed to adjust various parameters of the system.
instrument panels
R2R provides an open source management dashboard based on React and Next.js that allows users to interact with R2R through a GUI to manage and monitor the system.