Skip to main content
A Chunk in R2R represents a processed segment of content derived from a parent Document. Chunks are the core unit of retrieval within the system, serving as the foundation for semantic search, knowledge graph construction, and Retrieval-Augmented Generation (RAG) workflows. Each chunk includes the following components:
  • Text content — the extracted or generated portion of the source document.
  • Metadata — contextual information such as source, timestamp, or author.
  • Optional vector embeddings — numerical representations used for similarity search and reasoning.
Chunks are automatically generated during document ingestion and are optimized for:
  • Semantic search and retrieval
  • Knowledge graph relationship extraction
  • Vector similarity comparison
  • Metadata-based filtering and organization

API Endpoints

MethodEndpointDescription
GET/chunksList chunks with pagination and filtering.
POST/chunks/searchPerform semantic search with advanced filters.
GET/chunks/Retrieve a chunk by its ID.
POST/chunks/Update chunk content or metadata.
DELETE/chunks/Delete a specific chunk.