Skip to content
anythingai.space
Retrieval & RAGintermediate12 min · 9 steps

Adaptive Chunking & Tuning

Stop guessing one chunk size for everything: adapt chunking per domain and per query, keep several granularities, and tune with offline sweeps, chunk-quality scores and live A/B tests.

answer found68%
context2,500tok
HR policiesAPI docsContractsChunker500 tok for everythingFAQ answer + noiseHalf a functionClause cut mid-way
errordatarequestsignal
metrics are illustrative
1 / 9
ProblemStep 1 of 9

One chunk size fails every domain differently

An enterprise index mixes HR policies, API docs and contracts. A single 500-token setting cuts contract clauses in half, buries short FAQ answers in noise, and splits functions mid-body.

Queries vary too: “what's the notice period?” needs one sentence; “summarise our leave policy” needs the whole section. A static chunk can't be right for both.

Lesson 20 of 37 in Retrieval & RAG