链载Ai

标题: 一个全面、先进、公平且模块化的开源RAG框架 [打印本页]

作者: 链载Ai    时间: 昨天 23:39
标题: 一个全面、先进、公平且模块化的开源RAG框架

两个关键问题限制了 RAG 的发展:

RAGLAB:是一个模块化的开源库。RAGLAB 复现了 6 种先进的算法,并为研究 RAG 算法提供了一个全面的生态系统。利用 RAGLAB,对 10 个基准上的 6 种 RAG 算法进行了公平比较。有了 RAGLAB,研究人员可以高效地比较各种算法的性能并开发新算法

不同 RAG 库和框架的比较公平比较指的是在评估过程中对所有基本组件进行对齐,包括随机种子、生成器、检索器和指令。数据收集器指的是能够收集或生成训练和测试数据的能力,无论是通过从现有的原始数据集中抽样,还是通过使用LLM构建标记数据。

RAGLAB提供了一个模块化的架构,允许用户轻松地替换和扩展算法的各个组成部分,包括检索器(retriever)、生成器(generator)和指令(instruction)。

RAGLAB 框架的架构和组件

ingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.578px;">

RAGLAB进行了全面的实验,使用不同的基础模型作为生成器,同时保持其他基本组件的一致性,以促进不同高级RAG算法之间的公平比较。
一个使用 RAGLAB 来复现 Self-RAG 算法的脚本

分析了使用不同基础模型的RAG算法(Naive RAG、RRR 、ITER-RETGEN、Self-Ask、Active RAG、Self-RAG)在多个基准上的性能,发现Self-RAG算法在使用特定生成器时显著优于其他算法。

不同算法的指令
Naive RAG# read process insruction"### Instruction:\n {task_instrucion} \n## Input:\n\n{query}\n\n Now, based on the following passagesand your knowledge, please answer the question more succinctly and professionally. ### BackgroundKnowledge:\n{passages}\n\n###Response:\n"
RRR# rewrite process instruction"rovide a better search query for Wikipedia to answer the given question, end the query with '**'. \n\nQuestion: Ezzard Charles was a world champion in which sport? \n\n Query: Ezzard Charleschampion** \n\n Question: What is the correct name of laughing gas? \n\n Query: laughing gasname** \n\n Question: {query} \n\n Query: " # read process insruction"### Instruction:\n {task_instrucion} \n## Input:\n\n{query}\n\n Now, based on the following passagesand your knowledge, please answer the question more succinctly and professionally. ### BackgroundKnowledge:\n{passages}\n\n###Response:\n"
ITER-RETGEN# read process insruction"### Instruction:\n {task_instrucion} \n## Input:\n\n{query}\n\n Now, based on the following passagesand your knowledge, please answer the question more succinctly and professionally. ### BackgroundKnowledge:\n {passages} \n\n### Response:\n"
Self ASK# follow up question instruction"Question: When does monsoon season end in the state the area code 575 is located? Are follow upquestions needed here: Yes. Follow up: Which state is the area code 575 located in? Intermediateanswer: The area code 575 is located in New Mexico. Follow up: When does monsoon season end inNew Mexico? Intermediate answer: Monsoon season in New Mexico typically ends in mid-September. So the final answer is: mid-September. \n{query} Are follow up questions needed here:" # read process insruction"### Instruction:\n {task_instrucion} \n## Input:\n\n{query}\n\n Now, based on the following passagesand your knowledge, please answer the question more succinctly and professionally. ### BackgroundKnowledge:\n {passages} \n\n### Response:\n"
ActiveRAG# read process insruction"### Instruction:\n {task_instrucion} \n## Input:\n\n{query}\n\n Now, based on the following passagesand your knowledge, please answer the question more succinctly and professionally. ### BackgroundKnowledge:\n{passages}\n\n###Response:\n"
Self-RAG# read process instruction"### Instruction:\n{task_instruction}\n\n## Input:\n\n{query}\n\n### Response:\n"

RAGLAB 系统用户评估问卷

RAGLAB:AModularandResearch-OrientedUnifiedFrameworkforRetrieval-AugmentedGenerationhttps://arxiv.org/pdf/2408.11381https://github.com/fate-ubw/RAGLab






欢迎光临 链载Ai (https://www.lianzai.com/) Powered by Discuz! X3.5