RAG & Retrieval · Ground answers in evidence

What is HyDE and when does it help?

Hardhydequery expansionretrievalUpdated Oct 2026
Quiz this track

Short answer

HyDE asks a model to draft a hypothetical answer, then embeds that answer for retrieval. It helps when questions and documents use different language, but adds latency and can retrieve plausible fiction.

Hypothetical Document Embeddings generate a fake answer and search with its embedding. The intuition is that an answer looks more like the source documents than a question does, closing the vocabulary gap. It is a query-expansion technique with real failure modes.

  • Useful when users ask short questions against long explanatory documents.
  • Costs an extra generation call before retrieval, increasing latency.
  • A wrong hypothetical answer can pull retrieval toward the wrong topic.
  • Combine with the original query rather than replacing it outright.
Evaluate HyDE against plain retrieval on your own data. The benefit is corpus-specific and not guaranteed.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1What happens if the hypothetical answer is confidently wrong?
  2. 2Would you use HyDE for exact identifier searches?
  3. 3How would you combine HyDE with hybrid retrieval?

Say it in the interview

HyDE generates a hypothetical answer and embeds that instead of the raw question, because answers often look more like the source documents. It can help when the vocabulary gap is large, but it adds a generation call and a failure mode: a wrong draft steers retrieval to the wrong topic. I would run it alongside the original query and only keep it if it improves recall on my own eval set.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live RAG & Retrieval mock interview and get scored feedback on depth, clarity and confidence.