Chunking — Interactive Visualizer

Explore how different chunk_size and chunk_overlap values change the chunks produced from a document.

Why chunk?

Embeddings and LLM context work on concise units. A 200-page PDF becomes many chunks. Bad chunking → poor retrieval → wrong answers.

Rule of thumb: 256–512 tokens or ~1–3 paragraphs with 10–20% overlap for general docs.

Interactive PDF chunk visualizer



Open chunking lab notebook

Strategies

  • Fixed-size (chars/tokens)
  • Paragraph / heading aware
  • Recursive split (LangChain's RecursiveCharacterTextSplitter)

Metadata

Attach `source`, `page`, and `section` to each chunk for accurate citations.