HyDE

HyDE, short for Hypothetical Document Embeddings, is a 2022 retrieval technique published by Gao et al. (CMU and Allen Institute) that improves zero-shot retrieval by having an LLM generate a hypothetical answer to the query first, embedding the hypothetical answer, and using that embedding (instead of the raw query embedding) for retrieval. The intuition: in dense retrieval, queries and documents must live in the same embedding space, but a short query ("what causes diabetic ketoacidosis?") is structurally unlike a long passage ("Diabetic ketoacidosis is caused by..."). By generating a fake answer first, HyDE produces an embedding that more closely resembles real answer-passages in the corpus, improving retrieval accuracy especially for sparse or out-of-domain queries. The recipe: send the query to an LLM with a prompt like "Write a one-paragraph answer to this question, even if you're not sure," embed the response with your normal embedding model, run k-NN search with that embedding, and pass the retrieved real documents to the final LLM for grounded answering. HyDE works best for short, ambiguous, or rare queries; for clear, fact-rich queries it adds latency without improvement. It is also expensive because every query incurs an extra LLM call, so production systems often apply HyDE selectively (only when initial retrieval scores are weak) rather than universally. LangChain has a HypotheticalDocumentEmbedder; LlamaIndex has a HyDEQueryTransform. AI governance teams using HyDE log both the generated hypothetical and the final retrieved documents, since the hypothetical can introduce model-generated content into the audit trail that did not exist in the original corpus.

HyDE is a small new trick on a 25-year-old retrieval engine: Centralpoint can apply HyDE-style query rewriting on-premise using embedded models, sending the hypothetical through the same hybrid index that has served Oxcyon's clients for 25 years. Tokens meter per skill, prompts stay local, and HyDE-enabled chatbots deploy through one line of JavaScript.


Related Keywords:
HyDE,HyDE,Oxcyon, AI, AI Governance, Generative AI, Inference, Inference, Inferencing, RAG, Prompts, Skills Manager,