All jobs / AI engineer / RAG — Retrieval-Augmented Generation
AI engineer interview question · 1–3 years
What is chunk overlap for, and what does too much of it cost?
The strongest answer
It keeps an idea that straddles a boundary whole in at least one chunk. Too much inflates the index and fills the top results with near-duplicates; splitting on headings and paragraphs first reduces the need
Why it works
Right — overlap is insurance against bad boundaries, and it has a premium: storage, embedding cost and duplicate hits that waste the context budget.
What a good answer covers
- Overlap protects ideas at boundaries.
- Too much means duplicates and cost.
- Split on structure before size.
- Test settings on your own documents.
Answers that fall short
- Close, but not the strongest: It repeats some text between neighbouring chunks so context is not lost — more overlap is the safer choice
Right purpose, but “more is safer” ignores the cost: the same passage retrieved three times pushes other evidence out. - Weak: It lets the embedding model link neighbouring chunks together, so the index knows their order
Each chunk is embedded on its own; overlap creates no links. Order and neighbours are something you store as metadata. - Red flag: I keep the numbers from the tutorial; chunk settings make no real difference to the answers
Chunk settings can change retrieval a great deal, and the only way to know is to test on your own documents.
Who gets asked this
More RAG — Retrieval-Augmented Generation questions
- 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…
- Since you added “answer only from the retrieved context, otherwise say you don’t know”, the assistant refuses…