All Questions
Rag And Retrieval hard

In a chat assistant, turn 1 asks 'compare our two enterprise plans' and turn 3 asks 'does the second one include SSO?'. Retrieval for turn 3 returns generic SSO docs unrelated to either plan. What should run before retrieval?

  1. A HyDE: generate a hypothetical answer to 'does the second one include SSO?' and embed it to bridge the vocabulary gap to the plan documents.
  2. B Embed the entire conversation history as one query vector, so the earlier mention of the enterprise plans is captured in the retrieval signal.
  3. C Raise k to 100 for follow-up turns, so plan-specific SSO documents are likely to appear among the candidates even if the query is ambiguous.
  4. D A rewrite step that uses chat history to produce a standalone query naming the specific plan, optionally fanned out into query variants.

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

Get the app

Related questions