Retrieval-augmented large language models (R-LLMs) combine pre-trained large language models (LLMs) with information retrieval systems to improve the accuracy of factual question-answering. However, current libraries for building R-LLMs provide high-level abstractions without sufficient transparency for evaluating and optimizing prompts within specific inference processes such as retrieval and generation. To address this gap, we present RaLLe, an open-source framework designed to facilitate the development, evaluation, and optimization of R-LLMs for knowledge-intensive tasks. With RaLLe, developers can easily develop and evaluate R-LLMs, improving hand-crafted prompts, assessing individual inference processes, and objectively measuring overall system performance quantitatively. By leveraging these features, developers can enhance the performance and accuracy of their R-LLMs in knowledge-intensive generation tasks. We open-source our code at https://github.com/yhoshi3/RaLLe.
翻译:检索增强型大语言模型通过将预训练大语言模型与信息检索系统相结合,提升了事实性问答任务的准确性。然而,现有用于构建此类模型的库多提供高层抽象接口,在检索和生成等具体推理过程中,难以透明地评估和优化提示词。为弥补这一不足,我们提出了RaLLe——一个开源框架,旨在促进知识密集型任务中检索增强型大语言模型的开发、评估与优化。借助RaLLe,开发者可便捷地构建与评估模型,优化人工设计的提示词,评估各推理过程,并客观量化整体系统性能。通过利用这些功能,开发者可在知识密集型生成任务中提升其检索增强型大语言模型的性能与准确性。我们已将代码开源至https://github.com/yhoshi3/RaLLe。