r/learnmachinelearning • u/Flameonkey • 12h ago
Discussion Chunk Size in RAG: Too Big vs Too Small
A support assistant gets asked: “Can I still get a refund?” It answers, “Yes — within fourteen days.” Confident, polite, and incomplete: refunds only apply if no projects have been exported.
The model is not the only suspect. In RAG, documents are split into chunks before retrieval, and the split decides what the retriever can even find:
• Chunks too big — the refund rule sits in one chunk with billing, cancellations and FAQs. Similar is not the same as correct; retrieval drags in noise.
• Chunks too small — the deadline lands in one chunk, the export condition lands in another. All the pieces are there; the meaning is not.
What helps in practice: keep related information together (rule + condition + short explanation), use overlap at boundaries as a tool rather than a fix, and test like an engineer — collect real questions, run retrieval with different strategies, inspect what comes back, check whether answers are supported, refine.
Two clarifications that come up often: chunking is not the model's tokenizer (it is a separate splitting decision made during preparation), and there is no universal chunk size — it depends on your documents, your questions and your embedding model.
