HyDE lifts fully zero-shot dense retrieval from 44.5 to 61.3 nDCG@10 on TREC DL19 without training a single retriever weight or touching a relevance label. Luyu Gao, Xueguang Ma, Jimmy Lin, and Jamie Callan show that asking an instruction-following LLM to write a fake answer passage, then embedding that passage with an unsupervised document encoder, bridges the query-document gap well enough to rival supervised dense models like DPR and ANCE.
Unsupervised contrastive encoders such as Contriever learn document-to-document similarity easily, yet still lag BM25 when given short search queries because questions and answers occupy different phrasing distributions. HyDE turns query-to-document matching into document-to-document matching, letting standard MIPS or HNSW vector indexes serve cold-start search before any click logs or human labels exist.
- Web search gains without labels: On TREC DL19 and DL20, HyDE jumps from Contriever’s 44.5 and 42.1 nDCG@10 to 61.3 and 57.9, beating BM25 (50.6 and 48.0) and topping supervised DPR (36.5 vs. 41.8 MAP on DL19) and ANCE (37.1 MAP) on DL19 MAP and Recall@1k (88.0 vs. 76.9 and 75.5).
- Low-resource BEIR recovery: HyDE beats unsupervised Contriever on all six tested BEIR tasks and outperforms BM25 on five of six, rescuing TREC-COVID where Contriever collapsed to 27.3 nDCG@10 back up to 59.3 (nearly tying BM25 at 59.5).
- Multilingual lift on Mr.TyDi: Using multilingual
mContriever, HyDE improves MRR@100 overmContrieveron Swahili (41.7 vs. 38.3), Korean (30.6 vs. 22.3), Japanese (30.7 vs. 19.5), and Bengali (41.3 vs. 35.3). - Scales with generator strength: Swapping the LLM from FLAN-T5 11B to Cohere 52B to InstructGPT 175B pushes DL19 nDCG@10 from 48.9 to 53.8 to 61.3.
How It Works
HyDE decomposes dense retrieval into two frozen stages using off-the-shelf models:
- Hypothetical document generation: Given a query and a task-specific prompt (such as “Please write a passage to answer the question” or “Please write a counter argument for the passage” on ArguAna), an instruction-following LLM (
text-davinci-003at temperature 0.7) samplesNsynthetic passages. Those drafts capture the vocabulary, tone, and structure of a real answer even when specific facts are wrong. - Dense bottleneck encoding: An unsupervised contrastive encoder (
Contrieverfor English,mContrieverfor non-English) maps each generated passage and the raw query into vectors, averages them, and runs standard inner-product search against pre-indexed corpus embeddings.
The encoder’s dense bottleneck acts as a lossy filter: specific hallucinated details fall out while the topical neighborhood remains intact. In one Korean history example from the paper, GPT fabricates that humans first used fire “about 8 million years ago,” yet the averaged embedding still retrieves the real Wikipedia-style passage stating “1.42 million years ago.”
Key Findings
- Matches or beats transferred supervised retrievers: On BEIR’s low-resource tasks, zero-shot HyDE beats MS MARCO-tuned DPR and ANCE on SciFact (69.1 vs. 31.8 and 50.7), ArguAna (46.6 vs. 17.5 and 41.5), and TREC-NEWS (44.0 vs. 16.1 and 38.2), and edges out
ContrieverFTitself on SciFact, ArguAna, and TREC-NEWS. - Task instructions matter on specialized corpora: HyDE trails
ContrieverFTon FiQA (27.3 vs. 32.9) and DBPedia (36.8 vs. 41.3), which the authors attribute to generic, under-specified prompts failing to steer the LLM toward financial-forum or entity-card style. - Weak generators hurt fine-tuned retrievers, strong ones still add lift: When paired with supervised
ContrieverFTon TREC DL19, smaller generators slightly degrade quality (60.2 with FLAN-T5 11B and 61.4 with Cohere 52B versus 62.1 baseline), whereasInstructGPT 175Braises DL19 nDCG@10 from 62.1 to 67.4 (63.2 to 63.5 on DL20).
Caveats and Builder Takeaway
HyDE trades index-time training for query-time LLM latency and cost. Sampling multiple synthetic passages per search request adds hundreds of milliseconds to seconds before vector lookup even begins. The formulation also assumes a unimodal, unambiguous query: if a short query has two distinct meanings or hinges on exact error codes, internal identifiers, or post-cutoff events unknown to the LLM, a confident hallucinated passage can steer the embedding into the wrong neighborhood, where plain lexical grep or ColBERTv2 is safer.
In low-resource languages, both pieces weaken: small multilingual encoders saturate across languages while the LLM underperforms on lower-resource scripts. Even the authors recommend using HyDE as a cold-start system: ship it at launch when no relevance logs exist, collect user feedback to train a fast supervised retriever, and route only rare or tail queries through HyDE over time, optionally combining with lexical search via reciprocal rank fusion.


