A Chunk in R2R represents a processed segment of content derived from a parent Document. Chunks are the fundamental unit of retrieval and serve as the basis for semantic search, knowledge graph construction, and RAG operations. Each chunk contains text content, metadata, and optional vector embeddings.

Chunks are automatically generated during document ingestion and are optimized for:

  • Semantic search and retrieval
  • Knowledge graph relationship extraction
  • Vector similarity comparisons
  • Metadata filtering and organization

Available Endpoints

MethodEndpointDescription
GET/chunksList chunks with pagination and filtering options
POST/chunks/searchPerform semantic search across chunks with complex filtering
GET/chunks/{id}Retrieve a specific chunk by ID
POST/chunks/{id}Update an existing chunk’s content or metadata
DELETE/chunks/{id}Delete a specific chunk