面向检索增强生成的 LLM Intrinsics 库
人工智能
2025-07-22 v2
摘要
在大型语言模型 (LLM) 开发者社区中,尚不存在与软件库类似的清晰模式,以支持大规模协作。即便是检索增强生成 (RAG) 这一常见用例,也目前无法针对由不同 LLM 提供商所定义的、经过良好定义的 API 进行编写。以编译器内置指令的概念为灵感,我们通过引入面向检索增强生成的 LLM Intrinsics 库,提出了其中一些元素。LLM Intrinsics 定义为可以通过经过良好定义且相对稳定且独立于其自身实现方式的 API 调用的能力。我们库中的 Intrinsics 作为 LoRA adapter 在 HuggingFace 上发布,通过以 vLLM 为推理平台的软件接口实现,接口具备清晰的结构化输入/输出特征,两处均附带文档和代码。本文描述了每个 Intrinsic 的意图用法、训练细节和评估,以及多个 Intrinsics 的组合。
引用
@article{arxiv.2504.11704,
title = {A Library of LLM Intrinsics for Retrieval-Augmented Generation},
author = {Marina Danilevsky and Kristjan Greenewald and Chulaka Gunasekara and Maeda Hanafi and Lihong He and Yannis Katsis and Krishnateja Killamsetty and Yulong Li and Yatin Nandwani and Lucian Popa and Dinesh Raghu and Frederick Reiss and Vraj Shah and Khoi-Nguyen Tran and Huaiyu Zhu and Luis Lastras},
journal= {arXiv preprint arXiv:2504.11704},
year = {2025}
}
备注
This (June 2025) is the second version of this paper (the first was published in April 2025). Intrinsics implemented as LoRAs are now trained on IBM Granite 3.3 8b instruct (previously 3.2)