All jobs / AI engineer / RAG — Retrieval-Augmented Generation
AI engineer interview question · 0–1 years
Why do we split documents into chunks before embedding them, instead of making one vector per document?
The strongest answer
One vector for a long document blurs many topics, so specific questions match it poorly, and what we retrieve has to fit the prompt and be citable. Too small, though, and a chunk loses its meaning
Why it works
Exactly — a chunk should be about one thing: small enough to retrieve precisely, large enough to stand on its own. That tension is the whole craft.
What a good answer covers
- One chunk, one idea.
- Whole-document vectors blur topics.
- Small enough to retrieve and cite.
- Large enough to stand alone.
Answers that fall short
- Close, but not the strongest: Because embedding models have an input limit, so long documents have to be cut to fit
True, and the smaller reason. Even with no limit, one vector for fifty pages would match nothing well. - Weak: To make indexing faster — smaller pieces are quicker to embed and to store
Speed is a side effect. Chunking exists for retrieval precision and for what fits in the prompt. - Red flag: It does not matter how; I cut every thousand characters wherever that falls and the model works it out
A cut through the middle of a table or a sentence produces chunks that mean nothing alone. Boundaries are a quality decision, and you check them.
Who gets asked this
More RAG — Retrieval-Augmented Generation questions
- What is chunk overlap for, and what does too much of it cost?
- Users paste the error code “E-4012” into the support assistant. It returns passages about errors in general…
- A policy document was updated yesterday and the assistant still quotes the old text, with a citation. Where…
- Why does that happen, and what do you do about it?
- The assistant gave a wrong answer to a question the documentation clearly covers. How do you find out which…
- The right chunk is nearly always in your top 50 results but rarely in the 5 you send to the model. What do…
- You own the RAG system. What do you ask for before this merges?
- Leadership wants one assistant over all internal documents — HR, legal, finance, engineering — for every…