HyDE generates a hypothetical answer document from the query, uses its embedding for retrieval, and often retrieves more relevant content for abstract or ambiguous queries.
Instead of directly embedding the user’s query, HyDE (Hypothetical Document Embeddings) uses an LLM to generate a hypothetical document that would answer the query, then embeds that document and uses its embedding to retrieve similar real documents. This works well for vague or abstract queries where the query itself may be short or ambiguous, but a realistic answer would contain richer, more specific language that matches relevant documents.
HyDE is especially useful for zero‑shot retrieval tasks, as it transforms a short query into a more document‑like representation without requiring fine‑tuning of the embedding model.