Chunk Overlap
Chunk overlap is the number of characters or tokens shared between adjacent chunks, ensuring that semantically related content split across a boundary is not lost during retrieval.
What is Chunk Overlap?
Chunk overlap is the number of characters or tokens shared between adjacent chunks, ensuring that semantically related content split across a boundary is not lost during retrieval.
Chunk overlap is the number of characters or tokens shared between adjacent chunks, ensuring that semantically related content split across a boundary is not lost during retrieval.
Where is it used?
LangChain's default overlap is 10-20% of chunk size; LlamaIndex and Haystack set overlap to preserve context around split points; too much overlap wastes storage, too little loses context.
How to build it
Use `RecursiveCharacterTextSplitter(chunk_size=500, chunk_overlap=100)` and verify chunks 0 and 1 share the last 100 chars of chunk 0; sweep overlap 0-200 and measure retrieval recall.