All Questions
Rag And Retrieval hard

Your RAG system over 2M support articles measures recall@50 of 94% but precision@5 of 31% on a labeled set. Answers often draw on off-topic passages. The context budget fits about 6 chunks. What is the highest-leverage change?

  1. A Raise the top-k passed to the LLM from 6 to 30, so the relevant passages already in the candidate set reach the context window.
  2. B Swap to an embedding model with a larger dimension, since better first-stage vectors will push the relevant passages into the top 5 positions.
  3. C Add a cross-encoder reranker over the top 50 to 100 candidates and pass only the reranked top 5 or 6 to the generator.
  4. D Increase chunk size from 400 to 1,500 tokens, so each of the 6 slots carries more surrounding context and is more likely to hold the answer.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions