Skip to content

Choosing a chunking strategy based on model and retrieval evaluation results

Chunking strategy directly shapes retrieval quality and generation accuracy in RAG applications, so it must be chosen based on document structure, embedding model context limits, and retrieval evaluation results rather than a fixed default. Engineers should test multiple chunk sizes/overlaps and measure their effect on retrieval relevance and downstream LLM answer quality before finalizing a strategy.

1 · Learn the must-know

  • Chunk size must respect the embedding model's maximum input token/context length, since text exceeding it gets truncated and loses information.
  • Smaller chunks improve retrieval precision (less irrelevant content per chunk) but can lose surrounding context needed for the LLM to generate a complete answer.
  • Larger chunks preserve more context but risk diluting the embedding's relevance to a specific query and consuming more of the LLM's context window during generation.
  • Overlapping chunks (a sliding window with some shared text between consecutive chunks) help preserve continuity of ideas that span chunk boundaries.
  • Document structure should inform chunking: splitting by semantic units like paragraphs, sections, or headers often outperforms naive fixed-length character/token splitting.
  • The best chunking strategy should be selected empirically by evaluating retrieval metrics (e.g., relevance/recall of retrieved chunks) and end-to-end answer quality, not chosen a priori.

2 · Check your understanding

Check this objectiveFree · always available

A Generative AI Engineer is building a retrieval-augmented generation application over a collection of technical PDF manuals. The embedding model selected for the Vector Search index, bge-large-en-v1.5, has a maximum input length of 512 tokens. The current chunking script splits documents into chunks of 1500 tokens each, and monitoring shows embeddings are being silently truncated. Which change should the engineer make to the chunking strategy?

Your objective map0 tried · 0 answered correctly · 56 untouched

What you have tried across Databricks GenAI Engineer's objectives, not a readiness score.

Design Applications10.71% of the exam*0 of 6 tried
Data Preparation14.29% of the exam*0 of 8 tried
Application Development23.21% of the exam*0 of 13 tried
Assembling and Deploying Applications26.79% of the exam*0 of 15 tried
Governance7.14% of the exam*0 of 4 tried
Evaluation and Monitoring17.86% of the exam*0 of 10 tried

* Our estimate. Databricks publishes no section weights.

3 · Keep going