What Is Semantic Chunking?
Semantic chunking divides documents into chunks based on meaning rather than fixed character or token lengths. Instead of cutting text at arbitrary boundaries, it groups related sentences and ideas together so each chunk represents a coherent unit of meaning. This improves retrieval quality because retrieved chunks carry complete context rather than fragments split across arbitrary boundaries.
Semantic chunking vs fixed-size chunking
Fixed-size chunking splits documents every N characters or tokens, often cutting through the middle of an idea and splitting related information across chunks. Semantic chunking finds natural boundaries in meaning, keeping related content together so retrieval returns more complete context.
Why chunking affects RAG quality
The chunk is the unit of retrieval. If a concept is fragmented across several chunks, a query may retrieve only part of it, producing incomplete answers. Better chunking directly improves the quality of context passed to the language model.