Chunking
Splitting long documents into smaller passages for retrieval and embedding, a key step in RAG quality.
In plain language
Chunks that are too large add noise; too small lose context. Common strategies include fixed length with overlap, heading/paragraph splits, semantic boundaries and parent-child chunks (retrieve small, return large). Chunk size should match the embedding model and question type: factual lookup suits small chunks, multi-hop reasoning suits larger context or graph structures. Preserve source, heading and page metadata for citation and filtering.
Example
Split a product manual by chapter and section, attach model number and page, then filter by model before semantic matching.
Recommended tools
Related terms
Embedding
Converting text, images or other content into vectors whose similarity can be computed.
Reranking
Re-scoring and reordering retrieved passages with a stronger model after initial retrieval.
Retrieval-Augmented Generation
Retrieve relevant passages from a knowledge base, then have the model answer from them.
Agent Memory
A mechanism for an agent to store and retrieve user preferences, past tasks and key facts across sessions.