Search and RAG
Search and retrieve information using vectors, text, and RAG
R2R provides powerful search and retrieval capabilities through vector search, full-text search, and Retrieval-Augmented Generation (RAG). The system supports multiple search modes and extensive runtime configuration to help you find and contextualize information effectively.
Refer to the retrieval API and SDK reference for detailed retrieval examples.
Search Capabilities
R2R offers three search modes:
-
Basic Mode: Simple semantic search using vector embeddings. Ideal for finding contextually similar content.
-
Advanced Mode: Combines semantic and full-text search for comprehensive results. Automatically balances between exact matches and semantic similarity.
-
Custom Mode: Complete control over search configuration including weights, limits, and search types.
Basic Search Example
Advanced Search Example
RAG Integration
R2R’s RAG system enhances search results by using them as context for AI-generated responses. You can configure both the search behavior and generation parameters at runtime.
Basic RAG Example
Advanced RAG Configuration
Custom Prompting
You can override default prompts to customize how RAG generates responses:
Conclusion
R2R’s search and RAG capabilities provide flexible tools for finding and contextualizing information. Whether you need simple semantic search or complex hybrid retrieval with custom RAG generation, the system can be configured to meet your specific needs.