AI 与机器学习2024arxiv.org
Self-Retrieval:用单个 LLM 构建信息检索系统
Self-Retrieval: Building an information retrieval system with one LLM
进阶 · 约 50 分钟读完前置知识:信息检索基础、LLM 微调、RAG 与约束解码
导读
这篇论文提出 Self-Retrieval,用单个 LLM 自身完成信息检索:把文档中的每个句子当作索引、文档当作索引对象,通过自监督微调让模型“记住”语料库并建立自然语言索引,从而在生成时直接检索并输出语料中的原文段落。为保证引用准确,作者采用基于 trie(前缀树)的受限解码,将生成词表限制在语料库范围内。
HN 关注点:是否挑战了传统 RAG(embedding + 向量检索)范式,讨论焦点是这种“把语料内化进模型”的做法是否只适用于静态语料、能否替代频繁更新的检索系统。
HN 评论精选
这几条评论里:支持 2 质疑 2
支持肯定论文用 trie 受限解码保证生成内容严格来自语料库的做法
这听起来像是确保引用准确的好办法:为了准确生成语料库中的原文段落,他们采用基于 trie 的受限解码算法——每一步不从整个目标词表中生成 token,而是用前缀树约束目标词表,确保生成内容都在语料库内。构建 trie 时还会去掉起始的停用词以改善语义表示。
skybrian查看英文原文
This sounds like an interesting way to ensure accurate quotes: > To accurately generate the exact passages in the given corpus, we employ a trie-based constrained decoding algorithm (Chen et al., 2020; Cao et al., 2021; Lu et al., 2021) in which the generated tokens can be constrained in the dynamic vocabulary. Specifically, instead of generating a token from the entire target vocabulary at each step, we use a prefix tree (trie) to constraint the target vocabulary and ensure that the generated content is within the corpus. During the construction of trie, we remove stop words from the initial token to improve semantic representation of the trie.
质疑质疑该方法只适用于静态语料,无法替代 RAG 处理频繁更新的数据
有意思,但如果我没读错,他们是在语料上训练 LLM。这确实能比现成的 embedding 模型效果更好,但对频繁变化的语料行不通——你得不断重新训练模型。而 RAG 的意义恰恰在于:对于变化快到无法直接训练的数据,如何把正确的信息作为上下文喂给 LLM。
reissbaker查看英文原文
This is interesting, but unless I'm misreading the paper, it looks like they're training an LLM on the corpus. I can easily see why that would result in better performance than an off-the-shelf embeddings model, but... it won't work for a corpus that changes frequently, since you'll constantly have to retrain the LLM. That's sort of the point of RAG: how do you get the right information into an LLM as context, for data that changes so frequently that you can't directly train on it?
质疑抱怨论文术语含糊、架构图不清晰,读不懂核心机制
我需要有人用直白的话解释这篇论文。论文反复说“通过自然语言索引架构把语料库内化到 LLM 中进行检索”,但从来没解释“内化”到底是什么意思,“自然语言索引”在架构中处于什么位置。图 2 是唯一勉强算架构图的东西,却只用这些模糊未定义的术语来描述。是我漏了什么,还是大家都一样困惑?
swyx查看英文原文
i need someone to explain this paper in direct language, because this paper keeps saying things like "internalizes the corpus to retrieve into a LLM via a natural language indexing architecture." but never ever explains what the heck "internalizing" means, and where the "natural language index" sits in the architecture. Figure 2 is the only thing somewhat resembling an arch diagram and just uses these vague undefined terms to describe it. am i missing something or just voicing the same confusion everyone else has?
支持称赞思路巧妙,指出其本质是利用小数据集微调带来的过拟合
“我们把文档中的每个原始句子作为索引、文档本身作为索引对象,让 LLM 通过自监督学习记住文档并建立索引”——这很聪明,我还没见过有效训练 LLM 搜索文档的方法,可以想象这会非常有效。我猜这依赖于在很小的数据集上微调时产生的过拟合。
tinco查看英文原文
"Specifically, we treat each original sentence in the document as an index and the document itself as the object of the index, allowing the LLM to memorize documents and build indexes through self-supervised learning" This is clever, I haven't seen an effective way to train an LLM to search a document yet and I can imagine this being very effective. I suppose this relies on the over fitting you get when fine tuning on a very small dataset.
相关资源
从这篇论文所有 HN 讨论帖的全部评论里整理出来的链接。
历次讨论
- 2024Hacker News 讨论帖200 分 · 29 评
同领域还值得读
DeepSeek-R1:通过强化学习激励 LLM 的推理能力
DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via RL
研究如何用强化学习激励大语言模型的推理能力,提出 DeepSeek-R1,并探讨 RL 训练对模型推理表现的影响。
AI 与机器学习2025 · 1,351 分 · 1,056 评 · 引用 30进阶 · 约 80 分钟编辑精选1-bit LLM 时代:面向低成本计算的三值参数
The Era of 1-bit LLMs: ternary parameters for cost-effective computing
提出用三值参数 {-1, 0, 1} 替代 LLM 中的浮点权重,即所谓“1-bit LLM”。
AI 与机器学习2024 · 1,040 分 · 447 评 · 引用 19进阶 · 约 45 分钟编辑精选DeepSeek-V3.2:推进开放大语言模型的前沿
DeepSeek-v3.2: Pushing the frontier of open large language models
这是 DeepSeek-V3.2 的技术报告,延续了 DeepSeek 开源权重模型的路线,目标是让开放模型继续逼近甚至追平前沿闭源模型。
AI 与机器学习2025 · 982 分 · 465 评进阶 · 约 90 分钟编辑精选通过自我对弈与通用强化学习掌握国际象棋和将棋(AlphaZero)
Mastering Chess and Shogi by Self-Play with General Reinforcement Learning
DeepMind 的 AlphaZero 论文:用通用强化学习算法(自我博弈 + MCTS + 神经网络),从零开始仅数小时训练便在国际象棋和将棋上击败了世界顶级引擎 Stock…
AI 与机器学习2017 · 539 分 · 270 评 · 引用 13进阶 · 约 90 分钟编辑精选用强化学习发现更快的矩阵乘法算法
Discovering faster matrix multiplication algorithms with reinforcement learning
论文提出 AlphaTensor,用强化学习搜索矩阵乘法算法。
AI 与机器学习2022 · 518 分 · 111 评专业 · 约 90 分钟编辑精选