RAG 鑄造廠:增強檢索增強生成的框架
RAG Foundry: A Framework for Enhancing LLMs for Retrieval Augmented Generation
August 5, 2024
作者: Daniel Fleischer, Moshe Berchansky, Moshe Wasserblat, Peter Izsak
cs.AI
摘要
實現檢索增強生成(RAG)系統在本質上是複雜的,需要對數據、使用案例和精細設計決策有深入的理解。此外,評估這些系統也面臨著重大挑戰,需要通過多方面的方法來評估檢索準確性和生成質量。我們引入了 RAG Foundry,這是一個用於擴充大型語言模型以應用於 RAG 案例的開源框架。RAG Foundry 將數據創建、訓練、推斷和評估整合到單一工作流程中,有助於創建用於在 RAG 環境中訓練和評估大型語言模型的數據增強數據集。這種整合使得能夠快速原型設計和實驗各種 RAG 技術,讓用戶能夠輕鬆生成數據集並使用內部或專門知識來訓練 RAG 模型。我們通過使用多種 RAG 配置來擴充和微調 Llama-3 和 Phi-3 模型,展示了在三個知識密集型數據集上的一致改進。代碼已作為開源發布在 https://github.com/IntelLabs/RAGFoundry。
English
Implementing Retrieval-Augmented Generation (RAG) systems is inherently
complex, requiring deep understanding of data, use cases, and intricate design
decisions. Additionally, evaluating these systems presents significant
challenges, necessitating assessment of both retrieval accuracy and generative
quality through a multi-faceted approach. We introduce RAG Foundry, an
open-source framework for augmenting large language models for RAG use cases.
RAG Foundry integrates data creation, training, inference and evaluation into a
single workflow, facilitating the creation of data-augmented datasets for
training and evaluating large language models in RAG settings. This integration
enables rapid prototyping and experimentation with various RAG techniques,
allowing users to easily generate datasets and train RAG models using internal
or specialized knowledge sources. We demonstrate the framework effectiveness by
augmenting and fine-tuning Llama-3 and Phi-3 models with diverse RAG
configurations, showcasing consistent improvements across three
knowledge-intensive datasets. Code is released as open-source in
https://github.com/IntelLabs/RAGFoundry.Summary
AI-Generated Summary