Introduction
Retrieval in R2R is a sophisticated system that leverages ingested data to provide powerful search and Retrieval-Augmented Generation (RAG) capabilities. It combines vector-based semantic search, knowledge graph querying, and language model generation to deliver accurate and contextually relevant results.Key Configuration Areas
To configure the retrieval system in R2R, you’ll need to focus on several areas in yourr2r.toml
file:
- The
[database]
section configures the vector database used for semantic search and document management. - The
[embedding]
section defines the model and parameters for converting text into vector embeddings. - The
[kg]
section, when configured, enables knowledge graph-based retrieval. - The
[completion]
section sets up the language model used for generating responses in the RAG pipeline.
Customization and Advanced Features
R2R’s retrieval system is highly customizable, allowing you to:- Implement hybrid search combining vector-based and knowledge graph queries
- Customize search filters, limits, and query generation
- Add custom pipes to the search and RAG pipelines
- Implement reranking for improved result relevance