How do you decide on chunking units for RAG?
I'm setting up RAG for internal document search, and I keep struggling with the chunking unit. If I cut at a fixed 500 characters, the context gets broken, and if I go by paragraph, the chunks get too long.
In practice, how much overlap do you usually use?
3 answers
Overlap is usually set at 10–20%, so for 500 characters that’s about 50–100 characters? But in practice, preserving paragraph boundaries feels more important than that.
Well, saying that a fixed 500 characters cuts off context is a bit abstract. Shouldn't we have cases showing which documents were incorrectly truncated for which queries before we can discuss this? Before asking about overlap numbers, I think building an evaluation set should come first.
I've had similar concerns, and I think fixed-length chunking itself is a dead-end approach. Since every document has a different structure, first split by header/section markers, and only then apply length limits within those sections—this drastically reduces the context-breaking problem. For internal docs, you'll likely be using a wiki or Confluence, so the heading structure should be intact; if you extract it with a parser and preserve the hierarchy, search quality will be very different. For overlap, 100–200 tokens for paragraph-type content; too much just increases duplicate search results and backfires. If you have time, split into two or three chunking approaches and compare retrieval hit rates on the same query set. You'll get answers much faster than deciding by gut feeling.