All jobs / AI engineer / RAG — Retrieval-Augmented Generation

AI engineer interview question · 3–5 years

The right chunk is nearly always in your top 50 results but rarely in the 5 you send to the model. What do you add, and what does it cost?

The strongest answer

A reranker: retrieve wide and cheap, then score each query–passage pair with a model that reads both together — a cross-encoder, say — and keep the top few. It adds latency per candidate, so I cap the pool

Why it works

Right — recall is fine and precision at the top is the problem, which is exactly what a reranker is for. It is slower per pair than a vector comparison, hence two stages.

What a good answer covers

Answers that fall short

Who gets asked this

More RAG — Retrieval-Augmented Generation questions