Open Agent School · Public worked example
Chunking: meaning and example
Welcome! Take one idea with you today.
Chunking splits long documents into smaller passages before they are embedded and indexed for retrieval. Chunk size sets how many tokens each passage holds. Overlap repeats some tokens from the end of one chunk at the start of the next so that sentences near a boundary are not cut in half.
Picture it: An invented appliance company has a 1,200-token synthetic manual. The descaling warning sits at tokens 580 to 640. Customers ask about descaling, and the assistant retrieves three chunks per question. Choose a chunk size and overlap so the warning stays intact without wasting too much context.
What is easy to mix up?
Overlap protects boundary passages but adds duplicate index entries, near-identical retrieved chunks, and context cost. Pick it by measuring retrieval on labeled questions, and prefer structure-aware splits first.
Teaching example by Open Agent School. Source: Microsoft Learn - Chunk large documents for vector search solutions in Azure AI Search.