张浩彬 (2024-06-30 10:34):
@paper https://doi.org/10.48550/arXiv.2403.10131 RAFT: Adapting Language Model to Domain Specific RAG 对我而言很有启发性的paper。在大型文本数据集上预训练大型语言模型(LLMs)已成为一种标准范式。当将这些LLMs用于许多下游应用时,通常会将新的知识(例如,时效性新闻或私有领域知识)通过基于RAG(Retrieval-Augmented Generation,检索增强生成)的提示或微调,融入到预训练模型中。然而,模型如何以最优方式获取这种新知识仍然是一个开放的问题。在这篇论文中,提出了检索增强微调(Retrieval Augmented Fine Tuning,RAFT),简单来说,就是你要用rag的东西微调一下,并使用思维链熟悉一下要做的事情。当然,rag本身和微调就是两个套路,现在合在一起,似乎有点本末倒置,这也是这篇论文我认为没有讨论清楚的地方。不过这些不清楚的地方也是新的研究空间。
RAFT: Adapting Language Model to Domain Specific RAG
翻译
Abstract:
Pretraining Large Language Models (LLMs) on large corpora of textual data isnow a standard paradigm. When using these LLMs for many downstreamapplications, it is common to additionally bake in new knowledge (e.g.,time-critical news, or private domain knowledge) into the pretrained modeleither through RAG-based-prompting, or fine-tuning. However, the optimalmethodology for the model to gain such new knowledge remains an open question.In this paper, we present Retrieval Augmented FineTuning (RAFT), a trainingrecipe that improves the model's ability to answer questions in a "open-book"in-domain settings. In RAFT, given a question, and a set of retrieveddocuments, we train the model to ignore those documents that don't help inanswering the question, which we call, distractor documents. RAFT accomplishesthis by citing verbatim the right sequence from the relevant document thatwould help answer the question. This coupled with RAFT's chain-of-thought-styleresponse helps improve the model's ability to reason. In domain-specific RAG,RAFT consistently improves the model's performance across PubMed, HotpotQA, andGorilla datasets, presenting a post-training recipe to improve pre-trained LLMsto in-domain RAG. RAFT's code and demo are open-sourced atgithub.com/ShishirPatil/gorilla.
翻译
回到顶部