Your RAG chatbot retrieves 50 documents. How does it decide which 5 are actually relevant?

๐ Daily Dose of AI | AI Interview Question of the Day! ๐ง
The Answer: RERANKING!
Imagine searching for:
"Side effects of Drug X in elderly patients."
Vector Search: May rank a document about children highly because the topic is similar.
Reranker: Examines the question and retrieved documents more carefully, pushing irrelevant results down.
How It Works:
Retrieve 50 potentially relevant chunks.
Reranker scores each chunk against the question.
Send the best 5 chunks to the LLM.
Interview Answer:
"Retrieval finds candidates quickly. Reranking improves relevance by rescoring those candidates before sending them to the LLM."
Remember:
Retrieval = Find Fast
Reranking = Choose Carefully
QA Tip: Compare retrieval precision and response time with and without reranking!
Explore 30 practical AI interview questions in AI Unboxed.
https://lnkd.in/gTpHAN48


