LaRA
收藏LaRA: Benchmarking Retrieval-Augmented Generation and Long-Context LLMs
数据集简介
- 数据集名称:LaRA
- 数据集用途:用于比较长文本处理能力的长文本LLM(LC LLMs)和检索增强生成(RAG)方法。
- 数据集内容:包含32K和128K的上下文长度,三种自然发生的长文本类型,以及四种基于上下文的问答任务,总计2326个测试案例。
- 实验结果:实验表明,RAG和LC LLMs之间没有明确的优劣之分,性能受到上下文长度、上下文类型、模型处理长文本的能力和任务类型等多个因素的影响。
数据集结构
-
存储位置:
dataset文件夹 -
文件命名:
{context length}_{context type}_{task type}.jsonl -
文件夹结构:
LaRA ├── dataset │ ├── 32k │ ├── 128k │ └── query │ ├──32k_book_comp.jsonl │ ├──32k_book_hallu.json │ ├──32k_book_location.jsonl │ ├──32k_book_reasoning.jsonl │ ├──32k_financial_comp.jsonl │ ├──32k_financial_hallu.jsonl │ ... ...
安装与使用
安装步骤
-
创建conda环境: shell conda create --name lara python=3.10 -y conda activate lara
-
克隆仓库并安装依赖: shell git clone https://github.com/Alibaba-NLP/LaRA.git cd LaRA pip install -r requirements.txt
评估步骤
- 生成预测:提供评估开源模型和专有模型的代码,位于
evaluation文件夹中。 - 计算分数:使用GPT-4o或Qwen-max进行评估。
引用
bibtex @article{li2025lara, title={LaRA: Benchmarking Retrieval-Augmented Generation and Long-Context LLMs-No Silver Bullet for LC or RAG Routing}, author={Li, Kuan and Zhang, Liwen and Jiang, Yong and Xie, Pengjun and Huang, Fei and Wang, Shuai and Cheng, Minhao}, journal={arXiv preprint arXiv:2502.09977}, year={2025} }




