按年被提到
20222023 · 9 次2026
大模型与语言模型›词向量与预训练模型·arXiv:2212.10496 · cs.IR

Precise Zero-Shot Dense Retrieval without Relevance Labels

无需相关性标注的精确零样本稠密检索
Luyu Gao, Xueguang Ma, Jimmy Lin, Jamie Callan · 2022

HyDE:先让 LLM 写假想文档,再用它做向量检索

开始阅读 ↗PDFalphaXiv 讨论
被推荐 · 14 人首次 2023-01-22 · 最近 2026-08-14
14不同的人
9活跃月份
12讨论串
485被引(OpenAlex)

论文提出假想文档嵌入(HyDE):先让指令遵循语言模型(如 InstructGPT)针对查询零样本生成一篇假想文档,它体现相关性模式但可能含有虚假细节,再用无监督对比学习的编码器(如 Contriever)把它编码成向量,在语料向量空间中检索相似的真实文档,编码器的稠密瓶颈会过滤掉错误细节。实验显示 HyDE 明显优于 Contriever,并与微调过的检索器表现相当,覆盖网页搜索、问答、事实核查等任务及斯瓦希里语、韩语、日语等语言。

HN 为什么提它

评论者把它当作改进 RAG 和稠密检索的简单技巧来引用:让模型先编一个答案再对它做 embedding,有人称它多次帮自己减少检索问题,也有人提醒不一定总是改进。

方法难度 3 / 5约 35 分钟经得起时间
读之前最好知道
1稠密检索与向量嵌入
2对比学习与 Contriever
3检索增强生成(RAG)
4指令微调语言模型

学习路径

读这篇之前,按顺序读书架上的 5 篇 · 参考文献来自 OpenAlex,顺序和要点由 Claude Code 排出

先掌握 BERT 式编码器、GPT-3 的少样本提示和指令微调,再了解向量检索的工程基础,就能明白 HyDE 如何用指令模型写出假想文档来替代相关性标注。

  1. 1
    BERT: Pre-training of Deep Bidirectional Transformers for Language UnderstandingBERT:用于语言理解的深度双向 Transformer 预训练 · 2018

    稠密检索的编码器多基于 BERT,HyDE 的对比编码器也是同类结构。

    读预训练的双向编码器与句向量的概念;理解为什么它能做语义相似度。

  2. 2
    Language Models are Few-Shot Learners语言模型是少样本学习者 · 2020

    HyDE 靠提示让大模型零样本写出文档,这种提示能力来自 GPT-3 一路的发展。

    读少样本和零样本提示(in-context learning)的概念;跳过各数据集的评测。

  3. 3

    指令微调让模型零样本遵循指令,是 HyDE 能直接下指令生成文档的背景。

    读用指令格式微调后零样本泛化的主要结论。

  4. 4
    Training language models to follow instructions with human feedback用人类反馈训练语言模型遵循指令 · 2022

    HyDE 用的 InstructGPT 就是这篇的模型,需要知道它怎么学会遵循指令。

    读监督微调、奖励模型与强化学习的三步流程;理解它为何比同规模 GPT-3 更听话。

  5. 5
    Billion-scale similarity search with GPUs基于 GPU 的十亿级相似性搜索 · 2017

    HyDE 得到的假想文档向量要在语料向量库里做近邻搜索,这类索引就是 FAISS。

    读向量近邻搜索与乘积量化的基本概念;跳过 GPU 实现细节。

  6. 6
    Precise Zero-Shot Dense Retrieval without Relevance Labels无需相关性标注的精确零样本稠密检索 · 2022 · 就是这篇

    目标论文:先用指令模型写假想文档,再用它的向量做零样本检索。

    读假想文档生成加无监督对比编码器过滤幻觉细节的流程,以及与有监督稠密检索的对比结果。

HN 书评

推荐在前,同类按时间 · 每篇最多保留 20 条,统计用全部提及
推荐hobofan · 2023-12

“it has helped me multiple times in the past to strongly reduce problems with RAG”

推荐它,先生成假设答案再做 embedding 检索,多次帮自己大幅减少 RAG 问题
Build a search engine, not a vector DB原评论 ↗
引用kerbal · 2023-01

“Also there is an easy technique for getting better results with dense search - Hypothetical Document Embeddings.”

推荐 HyDE 这个简单技巧,能改进稠密检索的效果
How to implement Q&A against your docs with GPT3 embeddings and Datasette原评论 ↗
引用simonw · 2023-01

“There's a trick called Hypothetical Document Embeddings (HyDE) where you ask GPT-3 to invent an answer to the user's question, embed THAT fictional answer”

介绍 HyDE:让 GPT-3 编一个假答案,再对这个虚构答案做 embedding 检索
Build ChatGPT like chatbots on your website原评论 ↗
引用yayr · 2023-02

“also an approach to solve the alignment problem.”

把这种零样本稠密检索方法说成也是解决对齐问题的一种思路
I made ChatGPT and Bing AI have a conversation原评论 ↗
引用curo · 2023-02

“This approach is called HyDE (first published here: Precise Zero-Shot Dense Retrieval without Relevance Labels).”

指出这种做法叫 HyDE,并贴出它的首发论文
Using GPT3, Supabase and Pinecone to automate a personalized marketing campaign原评论 ↗
引用d4rkp4ttern · 2023-05

“Some people packaged this rather intuitive idea, named it Hyde (Hypothetical Document Embeddings) and wrote a paper about it —”

称有人把这个直观想法包装成 HyDE 并写成了论文
Giving GPT “Infinite” Knowledge原评论 ↗
看全部 11 条 →
引用danielbln · 2023-09

“The original paper proposing this technique can be found here: Precise Zero-Shot Dense Retrieval without Relevance Labels”

贴出最早提出这一技术(假设文档 embedding)的原始论文
A Comprehensive Guide for Building Rag-Based LLM Applications原评论 ↗
引用bayesian_limit · 2023-12

“Hyde 2022 Precise Zero-Shot Dense Retrieval without Relevance Labels”

把 HyDE 当作 2022 年已有的检索方法一笔带过
Build a search engine, not a vector DB原评论 ↗
引用avereveard · 2024-05

“hyde paper is here Precise Zero-Shot Dense Retrieval without Relevance Labels”

贴出 HyDE 论文,即用假设文档做查询扩展的方法
Show HN: Hacker Search – A semantic search engine for Hacker News原评论 ↗
引用pbronez · 2024-05

“which seems to be a kind of generative query expansion/pre-processing”

解释 HyDE 是一种生成式查询扩展或预处理,用生成的假设文档做检索
Show HN: Hacker Search – A semantic search engine for Hacker News原评论 ↗
引用postalcoder · 2024-09

“You can further improve your results by running query expansion using HyDE[1], though it's not always an improvement.”

建议用 HyDE 做查询扩展进一步改进 RAG 检索,但并非总有提升
Contextual Retrieval原评论 ↗
被提交为 story · 3 次