We propose a new method to measure the task-specific accuracy of Retrieval-Augmented Large Language Models (RAG). Evaluation is performed by scoring the RAG on an automatically-generated synthetic exam composed of multiple choice questions based on the corpus of documents associated with the task. Our method is an automated, cost-efficient, interpretable, and robust strategy to select the optimal components for a RAG system. We leverage Item Response Theory (IRT) to estimate the quality of an exam and its informativeness on task-specific accuracy. IRT also provides a natural way to iteratively improve the exam by eliminating the exam questions that are not sufficiently informative about a model's ability. We demonstrate our approach on four new open-ended Question-Answering tasks based on Arxiv abstracts, StackExchange questions, AWS DevOps troubleshooting guides, and SEC filings. In addition, our experiments reveal more general insights into factors impacting RAG performance like size, retrieval mechanism, prompting and fine-tuning. Most notably, our findings show that choosing the right retrieval algorithms often leads to bigger performance gains than simply using a larger language model.
翻译:我们提出了一种新方法来衡量检索增强大语言模型(RAG)的任务特定准确性。评估通过让RAG模型在一个自动生成的合成考试中答题来实现,该考试由基于任务相关文档语料库构建的单项选择题组成。我们的方法是一种自动化、成本效益高、可解释且鲁棒的策略,用于为RAG系统选择最优组件。我们利用项目反应理论(IRT)来评估考试的质量及其对任务特定准确性的信息量。IRT还提供了一种自然的方式来迭代改进考试,即剔除那些对模型能力信息量不足的试题。我们在四个新的开放式问答任务上验证了我们的方法,这些任务基于Arxiv摘要、StackExchange问题、AWS DevOps故障排除指南和SEC文件。此外,我们的实验揭示了影响RAG性能的更普遍因素,如模型规模、检索机制、提示工程和微调。最值得注意的是,我们的研究结果表明,选择合适的检索算法通常比仅仅使用更大的语言模型带来更大的性能提升。