arXiv:2603.08429cs.CLcs.AI2026-03被引 1

让大模型直接用自身隐藏状态生成检索向量,省去额外模型

One Model Is Enough: Native Retrieval Embeddings from LLM Agent Hidden States

  • 在大模型隐藏状态上加轻量投影头,直接输出检索向量
  • 保留97%基线检索效果,召回率与标准流程相当
  • 适合想简化检索架构、降低延迟的开发者

通常,大模型代理通过生成文本查询,再用独立嵌入模型将其编码为向量来检索外部知识。这一两阶段流程增加基础设施复杂性和延迟,但存在冗余:大模型本身已在其隐藏状态中编码了完整对话上下文。本文提出在大模型代理中加入轻量级投影头,直接将隐藏状态映射到嵌入空间,无需单独嵌入模型。通过联合使用对齐、对比和排名蒸馏损失进行训练,该方法在保持97%基线检索质量的同时,使大模型代理能用自己的表示进行搜索。在QReCC对话式搜索基准上的实验表明,其召回率@10和MRR@10表现与标准生成-编码流程相当,系统性消融实验验证了各损失组件的贡献。

原文摘要 · Abstract (English)

LLM agents that retrieve external knowledge typically generate a search query as text, then run a separate embedding model to encode it into a vector. This two-model pipeline adds infrastructure complexity and latency, yet is redundant: the LLM already encodes the full conversational context in its hidden states. We propose equipping LLM agents with native retrieval capability by adding a lightweight projection head that maps hidden states directly into the embedding space, eliminating the need for a separate embedding model. Trained with a combination of alignment, contrastive, and rank distillation losses, our method retains 97\% of baseline retrieval quality while enabling the LLM agent to search with its own representations. Experiments on the QReCC conversational search benchmark show competitive Recall@10 and MRR@10 compared to the standard generate-then-encode pipeline, with systematic ablations confirming the contribution of each loss component.

大模型检索增强嵌入模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。