arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.04302cs.CLcs.AI
收藏

CBR-RAG:面向大语言模型法律问答的检索增强生成案例推理

CBR-RAG: Case-Based Reasoning for Retrieval Augmented Generation in LLMs for Legal Question Answering

Robert Gordon University(罗伯特戈登大学);Informatics Institute of Technology(信息学技术学院);BT France(英国电信法国公司)

Nirmalie Wiratunga, Ramitha Abeyratne, Lasal Jayawardena, Kyle Martin, Stewart Massie, Ikechukwu Nkisi-Orji, Ruvan Weerasinghe, Anne Liret, Bruno Fleisch

AI总结:

提出CBR-RAG框架,将案例推理的检索、索引与相似性容器融入RAG,并通过法律问答实验验证其可显著提升答案质量。

摘要:

检索增强生成(RAG)通过将先验知识作为上下文提供给输入来提升大语言模型(LLM)的输出。这有利于知识密集型和依赖专家的任务,包括法律问答,因为这类任务需要证据来验证生成的文本输出。我们强调,案例推理(CBR)提供了关键机会,可在LLM中将检索构建为RAG过程的一部分。我们提出CBR-RAG,其中利用CBR循环的初始检索阶段、其索引词汇表和相似性知识容器,以具有上下文相关性的案例增强LLM查询。这种集成增强了原始LLM查询,提供了更丰富的提示。我们对CBR-RAG进行了评估,并在法律问答任务上检验了不同表示(即通用嵌入和领域专用嵌入)以及比较方法(即类间、类内和混合相似性)。结果表明,CBR案例复用所提供的上下文强化了问题相关组成部分与证据库之间的相似性,从而显著提升了生成答案的质量。

英文摘要:

Retrieval-Augmented Generation (RAG) enhances Large Language Model (LLM) output by providing prior knowledge as context to input. This is beneficial for knowledge-intensive and expert reliant tasks, including legal question-answering, which require evidence to validate generated text outputs. We highlight that Case-Based Reasoning (CBR) presents key opportunities to structure retrieval as part of the RAG process in an LLM. We introduce CBR-RAG, where CBR cycle's initial retrieval stage, its indexing vocabulary, and similarity knowledge containers are used to enhance LLM queries with contextually relevant cases. This integration augments the original LLM query, providing a richer prompt. We present an evaluation of CBR-RAG, and examine different representations (i.e. general and domain-specific embeddings) and methods of comparison (i.e. inter, intra and hybrid similarity) on the task of legal question-answering. Our results indicate that the context provided by CBR's case reuse enforces similarity between relevant components of the questions and the evidence base leading to significant improvements in the quality of generated answers.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑