It offers multiple ways to interact with your data, enabling both direct retrieval and AI-augmented reasoning.
- Direct semantic search across documents and chunks
- Retrieval-Augmented Generation (RAG) for AI-powered answers
- Conversational RAG agents for complex queries
- Raw LLM completions for flexible text generation
Core Features
Vector Search
- Semantic similarity matching using document and chunk embeddings
- Hybrid retrieval combining vector and keyword search
- Complex filtering with Postgres-style operators
- Configurable search limits and similarity thresholds
Knowledge Graph Search
- Retrieval based on entities and relationships
- Multi-hop traversal for connected information discovery
- Local and global search strategies for context depth
- Community-aware graph navigation and clustering
RAG Generation
- Contextual responses grounded in retrieved content
- Customizable generation parameters (temperature, token limits, etc.)
- Source attribution and citation support
- Streaming responses for real-time output
- Optional web search integration for current information
Deep Research Agent
- Multi-turn conversational capabilities
- Complex query decomposition and reasoning
- Context retention across multiple interactions
- Branch management for conversation trees
- Integration with web search for external knowledge
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /retrieval/search | Perform semantic search with hybrid vector and knowledge graph capabilities. |
POST | /retrieval/rag | Generate contextual responses using retrieved information with optional web search integration. |
POST | /retrieval/agent | Engage with a conversational RAG agent capable of web-enhanced query resolution. |
POST | /retrieval/completion | Generate free-form text completions using language models. |
POST | /retrieval/embedding | Generate embeddings for documents or raw text for similarity search. |
Search Settings
Vector Search Example
Generation Configuration Example
Key Concepts
Search
The/retrieval/search endpoint provides direct access to R2R’s retrieval capabilities, enabling semantic and graph-based search across your content. It supports advanced filtering, sorting by relevance, and hybrid retrieval using both embeddings and keywords.
RAG
Retrieval-Augmented Generation (RAG) combines content retrieval with language model generation. It retrieves relevant context from your documents and optionally integrates live web search results to produce accurate, source-grounded responses.Agent
The/retrieval/agent endpoint provides a conversational interface for advanced retrieval. It maintains context, decomposes complex queries, and delivers responses with citations. The agent can also use web search to enhance context beyond internal data.
Completion
The/retrieval/completion endpoint gives direct access to language model generation without retrieval. It supports both single-turn and multi-turn interactions, making it ideal for creative generation, summarization, and reasoning tasks.
Filter Operations
Supported operators for content filtering include:eq: Equalsneq: Not equalsgt: Greater thangte: Greater than or equallt: Less thanlte: Less than or equallike: Pattern matchingilike: Case-insensitive pattern matchingin: In listnin: Not in list