Calendar Module 2

Chunking Strategies

Embedding models have a maximum token limit. all-MiniLM-L6-v2 from Module 1 takes 256 tokens, larger models take 8,000 or more, and anything past the limit is dropped without an error. Check your model’s card for its limit.

Fitting isn’t the only reason to split. A chunk is the unit that gets retrieved, so one vector covering several topics averages them together and matches every query weakly, while a chunk that’s too small loses the context that made the result useful.

StrategyHow it worksTrade-off
Fixed-SizeSplit every N tokens regardless of content boundariesMay cut sentences mid-thought
SemanticNew chunk when topic or meaning shiftsSlower; needs a model to detect shifts
Sliding WindowChunks overlap to preserve context across the cutMore storage; duplicate content across results

Fixed-Size

Fixed-size chunking cuts text into five ten-word chunks, splitting sentences mid-thought.

Semantic

Semantic chunking cuts text into three chunks, one per topic.

Sliding Window

Sliding-window chunking cuts text into four chunks, each repeating the end of the one before.

On this page: