IT lexicon › AI & ML › HyDE

HyDE

AI & ML På svenska → Updated: 2026-07-30

Hypothetical Document Embeddings — a retrieval technique where you first have an LLM generate a made-up "ideal answer" to the question, and then search with the embedding of that answer instead of the question. The idea: a hypothetical answer resembles the real documents more than the question does.

Problem: a short question ("How does photosynthesis work?") and a detailed answer document look different in embedding space (a vocabulary and form gap) → the question's embedding doesn't always match well. HyDE lets the model generate a hypothetical answer (even if it contains errors — that matters less), embeds it, and uses that vector for the search. Since the hypothetical answer is phrased like a real document, it lands closer to the genuine answers in vector space → better hits, especially in zero-shot settings. Trade-off: an extra generation step (latency/cost) and it can mislead if the topic is entirely unknown to the model. One of several query-transformation techniques. Related to query expansion and embedding model.

← Back to the lexicon