← Back to concept explainers

Concept Fable

Hypothetical document embeddings

Conclusion first:Hypothetical Document Embeddings, HyDE first has the model generate a hypothetical answer or hypothetical document, then embeds that hypothetical document and uses it for retrieval. It can expand short, vague, colloquial questions into semantic representations closer to the target documents, improving recall. The risk is that the hypothetical document may introduce false premises, so it can only be used for retrieval and should not serve as final evidence.

Hypothetical Document Embeddings, HyDE · Retrieval

Read the story first. There is no rush to give a definition here; let the question grow on its own first.

Fable

First write a possible reply letter

The archive's search clerk often received vague questions. Visitors would only say, "How was that extension clause handled last time?" yet no index card had any document with those words.

Early systems went straight to the source material with the original question. As a result, they often found notices containing the word "extension" but missed the truly relevant delivery changes, acceptance emails and supplementary agreements.

The retriever first tried adding synonyms. Delayed, postponed, put off and extended were all stuffed into the query; recall increased, and noise increased too. Readers had to search through a pile of marginal material.

An old archivist tried a different approach. He first wrote a possible standard reply based on the question, including delivery dates, contract terms, customer impact and handling recommendations, then took this hypothetical reply to search for similar documents.

Amazingly, although the hypothetical reply was not real evidence, it was closer to the semantic shape of the target answer. The system therefore found materials that did not use the original keywords but could indeed support the answer.

The head librarian immediately added a red stamp: hypothetical replies can only serve as retrieval hooks, not as factual sources. The final answer must return to real documents, real records, and citable evidence. The library later layered the hit materials: first look at similarity, then at source credibility, and finally at whether it can be cited. The hypothetical note pushes the door open, but what can truly stand in the answer must still be real archives.

After launch, HyDE is especially suited to short questions, colloquial questions, and knowledge bases with inconsistent terminology. It improves recall, but it also needs to prevent hypothetical content from leading retrieval astray. Later the manager wrote this experience into the daily rules: first look at the scenario, then look at the boundaries, and finally look at who can take over when it fails. Only when all of these are clear will a beautiful demo become deliverable work.

The archive finally kept two layers of paper: the first layer was hypothetical documents used to find the way, and the second layer was the real evidence used to answer. The old archivist also required hypothetical replies to be plain and not invent too many specific facts. It was only responsible for sketching the shape a question might lead to, and could not bring nonexistent dates, amounts or names into retrieval.

Reveal

This story is about: hypothetical document embeddings

Hypothetical Document Embeddings, HyDE first has the model generate a hypothetical answer or hypothetical document, then embeds that hypothetical document and uses it for retrieval. It can expand short, vague, colloquial questions into semantic representations closer to the target documents, improving recall. The risk is that the hypothetical document may introduce false premises, so it can only be used for retrieval and should not serve as final evidence.

What matters is that it is not just a term, but a structural problem that repeatedly appears in real AI / Agent systems. Understanding it lets you judge when to add a model, when to change a process, and when to add governance.

Metaphor mapping

  • Ambiguous question: the original user query
  • Hypothetical standard reply: an LLM-generated hypothetical document
  • Retrieve with a hypothetical reply: use a hypothetical document embedding to find similar materials
  • Red stamp: HyDE output cannot be taken directly as fact
  • Answering from real documents: the final answer still requires grounding and citations

Andy Ren Xu's judgment

The practical value of this concept is that it helps you break "AI features that look smart" into deliverable, verifiable, and governable units of work.

query rewritingdense retrieval
京ICP备2026014272号