A detailed step-by-step cookbook of the core features provided by R2R.
r2r.toml
.config-path
argument to specify your custom configuration when launching R2R:
document_id
generation for each ingested fileuser_id
and collection_ids
Ingest Data
html
, pdf
, png
, mp3
, and txt
. The full list of supported filetypes is available here. The ingestion process parses, chunks, embeds, and stores documents efficiently with a fully asynchronous pipeline. To demonstrate this functionality:document_id
generation for each fileuser_id
and collection_ids
for document managementGet Documents Overview
Get Document Chunks
Delete Documents
Update Documents
update_documents
and update_files
. These endpoints allow for seamless updating of existing documents while maintaining version control.Key features of the update process:update_files
endpoint. The process involves:/update_files
. This endpoint accepts a R2RUpdateFilesRequest
, which includes:files
: List of UploadFile objects containing the new document contentdocument_ids
: UUIDs of the documents to updatemetadatas
: Optional updated metadata for each documentExpected Output
use_vector_search
: Enable or disable vector search.index_measure
: Choose between “cosine_distance”, “l2_distance”, or “max_inner_product”.search_limit
: Set the maximum number of results to return.include_values
: Include search score values in the results.include_metadatas
: Include element metadata in the results.probes
: Number of ivfflat index lists to query (higher increases accuracy but decreases speed).ef_search
: Size of the dynamic candidate list for HNSW index search (higher increases accuracy but decreases speed).use_kg_search
: Enable knowledge graph search.kg_search_type
: Choose between “global” or “local” search.kg_search_level
: Specify the level of community to search.entity_types
: List of entity types to include in the search.relationships
: List of relationship types to include in the search.max_community_description_length
: Maximum length of community descriptions.max_llm_queries_for_global_search
: Limit on the number of LLM queries for global search.local_search_limits
: Set limits for different types of local searches.Basic RAG
RAG w/ Hybrid Search
use_hybrid_search
flag to your search settings input:Streaming RAG
Customizing RAG
VectorSearchSettings
and KGSearchSettings
.
GenerationConfig
, including:
User Registration
Email Verification
User Login
Get Current User Info
User-Specific Search
Refresh Access Token
User Logout
YOUR_ACCESS_TOKEN
and YOUR_REFRESH_TOKEN
with actual tokens obtained during the login process.
Users Overview
Logging
logs
command:Analytics
analytics
command to retrieve various statistics:Custom Analytics
filters
and analysis_types
parameters in the analytics
command to suit your specific needs.