Chunking playground
Paste a document, choose a chunk size and overlap, and see which pieces a question retrieves, and why.
Note
Everything runs in your browser. Nothing you paste or upload leaves your device. This tool only retrieves chunks; it doesn't write answers.
Document
Paste text, or upload a PDF, DOCX, ODT, TXT or Markdown file. Files are read in your browser and are never uploaded.
Characters per chunk, from 50 to 2,000.
How long each chunk is. Small chunks are precise, but they cut ideas into fragments and lose context. Large chunks keep context, but one chunk then mixes several topics, which blurs matching. The embedding model used here also ignores everything past roughly 1,000 characters of a chunk, so very large chunks are partly invisible to it.
Characters shared between neighbouring chunks.
How much text each chunk repeats from the end of the previous one. Without overlap, a sentence that straddles a boundary is split in two and neither half makes full sense. With overlap, it appears whole in at least one chunk. The cost: more chunks, and near-duplicate results. Overlap can't reach the chunk size.
- Chunks
- 0
- Average size
- 0characters
Chunk map
This is your document, cut up. Chunks alternate between two shades so you can see where one ends and the next begins. Where two chunks share text (the overlap), that text gets a third, stronger shade. After you search, retrieved chunks get an outline. Chunks are cut at an exact character count, so a cut can land mid-word. That is how simple fixed-size chunking behaves.
Even chunk Odd chunk Overlap Retrieved
Ask a question
Your question is compared against every chunk in two different ways, and each way returns its 3 best chunks. Change the sliders after searching and the results update, so you can see how chunking changes what is found.
The sample questions only fit the sample document. Ask your own question about your text.
Keyword search
Keyword search matches exact words: it finds chunks containing the same words as your question, and has no idea that different words can mean the same thing.
Score: BM25 adds up points for each question word found in a
chunk. Rare words earn more than common ones, repeats help with diminishing
returns, and shorter chunks get a small boost. There's no maximum, so only
compare scores within one search; the bar is relative to the top result.
Highlighted words are the exact matches that earned the score.
Words like "the" and "of" are ignored, and "bee" does not match "bees" because
there is no word-stem handling. No highlights means no match.
Meaning search
Embeddings match meaning: your question and every chunk become lists of numbers, and the closest ones win, even when they share no words at all.
Score: cosine similarity between the question's numbers and the
chunk's numbers, from about 0 (unrelated) to 1 (same meaning). The bar shows the
score on that scale. Exact values matter less than the ranking.
No highlighted words, because the match isn't about words. It
may pick a chunk that shares none of your words, which keyword search can never
do. It can also pick something merely on the same topic, so check the text.