Chunk size

Chunk size refers to the size (in number of tokens or characters) of the unit into which documents are split when stored in a vector store within a RAG pipeline. It is a critical parameter that directly affects retrieval accuracy and answer quality.
Why Splitting Is Necessary
LLMs have an upper limit on their context window. Since it is not possible to pass hundreds of pages of internal manuals as-is, documents must be split into appropriate granular units (chunking), vectorized, and only the sections relevant to a query retrieved. At this point, "how large to make each cut" becomes the question of chunk size.
Too Large or Too Small Both Cause Problems
If chunks are too small, a single chunk lacks sufficient context, meaning that even when retrieved, it may not contain the information the LLM needs to construct an answer. Conversely, if chunks are too large, irrelevant information enters as noise, degrading answer accuracy while also increasing token costs.
Generally, 256–1,024 tokens is considered a starting point, but the optimal value depends on the domain and the nature of the queries. For short Q&A content such as FAQs, a smaller size is appropriate; for documents where surrounding context is important, such as technical specifications, a larger size is the standard practical approach.
The Technique of Overlap
To mitigate the problem of context being cut off at chunk boundaries, "overlap"—partially duplicating adjacent chunks—is commonly used. For example, with a chunk size of 512 tokens and an overlap of 64 tokens, the last 64 tokens of the previous chunk are also included at the beginning of the next chunk. This contributes to improved accuracy in BM25 and vector search, though storage and index size increase as a result.
Articles covering this term
- 10 RAG Implementation Failure Patterns and How to Avoid Them — Preventing Production Issues Before They Happen10 common RAG failures before & after production: chunk design errors, retrieval accuracy drops, hallucination fixes & more. Learn key avoidance strategies before you build.
- What Is a Token Trap? Practical Token Consumption Management to Prevent Hidden Cost Explosions in AI AgentsLearn how "token traps" cause billing spikes in high-frequency agent loops, and how to prevent cost explosions with budget caps, throttling, and smart loop design.
- What is a Vector Database? A Complete Guide to How It Works, Top Product Comparisons, and RAG ApplicationsFrom basic vector database concepts to comparing top products like Pinecone, Weaviate, and pgvector, plus RAG system integration—a clear guide for AI implementation managers.
- What is Hybrid Search? How It Works and Implementation to Improve RAG Accuracy with Vector Search × Full-Text SearchExplains hybrid search using vector search, BM25, and RRF. Practical design patterns and implementation tips to improve RAG system retrieval accuracy.
Related Terms

RRF
RRF (Reciprocal Rank Fusion) is a scoring method that integrates ranking results returned by multipl

Agentic RAG
Agentic RAG is an architecture in which an LLM autonomously and iteratively generates search queries

Embedding
Embedding is a technique that transforms unstructured data such as text, images, and audio into fixe

GraphRAG
A next-generation RAG architecture that combines knowledge graphs and vector search, leveraging rela



