From Artificial Needles to Real Haystacks: Improving Retrieval Capabilities in LLMs by Finetuning on Synthetic Data
Zheyang Xiong, Vasilis Papageorgiou, Kangwook Lee, Dimitris Papailiopoulos
摘要
Recent studies have shown that Large Language Models (LLMs) struggle to accurately retrieve information and maintain reasoning capabilities when processing long-context inputs. To address these limitations, we propose a finetuning approach utilizing a carefully designed synthetic dataset comprising numerical key-value retrieval tasks. Our experiments on models like GPT-3.5 Turbo and Mistral 7B demonstrate that finetuning LLMs on this dataset significantly improves LLMs' information retrieval and reasoning capabilities in longer-context settings. We present an analysis of the finetuned models, illustrating the transfer of skills from synthetic to real task evaluations (e.g., 10.5% improvement on 20 documents MDQA at position 10 for GPT-3.5 Turbo). We also find that finetuned LLMs' performance on general benchmarks remains almost constant while LLMs finetuned on other baseline long-context augmentation data can encourage hallucination (e.g., on TriviaQA, Mistral 7B finetuned on our synthetic data cause no performance drop while other baseline data can cause a drop that ranges from 2.33% to 6.19%). Our study highlights the potential of finetuning on synthetic data for improving the performance of LLMs on longer-context tasks.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 8 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Make Your LLM Fully Utilize the Context 引用了 Data Engineering for Scaling Language Models to 128K Context
- Make Your LLM Fully Utilize the Context 引用了 Measuring Massive Multitask Language Understanding
- Make Your LLM Fully Utilize the Context 引用了 Random-Access Infinite Context Length for Transformers
- Data Engineering for Scaling Language Models to 128K Context 引用了 Measuring Massive Multitask Language Understanding
- PERK: Long-Context Reasoning as Parameter-Efficient Test-Time Learning 引用了 Make Your LLM Fully Utilize the Context
- PERK: Long-Context Reasoning as Parameter-Efficient Test-Time Learning 引用了 Data Engineering for Scaling Language Models to 128K Context
- PERK: Long-Context Reasoning as Parameter-Efficient Test-Time Learning 引用了 Random-Access Infinite Context Length for Transformers
- Untie the Knots: An Efficient Data Augmentation Strategy for Long-Context Pre-Training in Language Models 引用了 Data Engineering for Scaling Language Models to 128K Context
- When Long Helps Short: How Context Length in Supervised Fine-tuning Affects Behavior of Large Language Models 引用了 Data Engineering for Scaling Language Models to 128K Context
- When Long Helps Short: How Context Length in Supervised Fine-tuning Affects Behavior of Large Language Models 引用了 Measuring Massive Multitask Language Understanding
引用它的顶会 Paper8
- Untie the Knots: An Efficient Data Augmentation Strategy for Long-Context Pre-Training in Language ModelsJunfeng Tian, Da Zheng, Yang Chen, Rui Wang 等ACL 2025 · 8 次引用
- Learning from Synthetic Data Improves Multi-hop ReasoningAnmol Kabra, Yilun Yin, Albert Gong, Kamilė Stankevičiūtė 等ICLR 2026 · 6 次引用
- PERK: Long-Context Reasoning as Parameter-Efficient Test-Time LearningZeming Chen, Angelika Romanou, Gail Weiss, Antoine BosselutICLR 2026 · 4 次引用
- RefactorBench: Evaluating Stateful Reasoning in Language Agents Through CodeDhruv Gautam, Spandan Garg, Jinu Jang, Neel Sundaresan 等ICLR 2025
- When Long Helps Short: How Context Length in Supervised Fine-tuning Affects Behavior of Large Language ModelsYingming Zheng, Hanqi Li, Kai Yu, Lu ChenEMNLP 2025
它引用的 Paper12
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
- Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou 等ICLR 2021 · 7,905 次引用
- Make Your LLM Fully Utilize the ContextShengnan An, Zexiong Ma, Zeqi Lin, Nanning Zheng 等NeurIPS 2024 · 212 次引用
- Random-Access Infinite Context Length for TransformersAmirkeivan Mohtashami, Martin JaggiNeurIPS 2023 · 207 次引用
- Data Engineering for Scaling Language Models to 128K ContextYao Fu, Rameswar Panda, Xinyao Niu, Xiang Yue 等ICML 2024 · 204 次引用
相关 Paper
- Training with "Paraphrasing the Original Text" Teaches LLM to Better Retrieve in Long-Context TasksYijiong Yu, Yongfeng Huang, Zhixiao Qi, Zhe ZhouAAAI 2025 · 5 次引用
- Understanding Synthetic Context Extension via Retrieval HeadsXinyu Zhao, Fangcong Yin, Greg DurrettICML 2025
- Retrieval meets Long Context Large Language ModelsPeng Xu, Wei Ping, Xianchao Wu, Lawrence McAfee 等ICLR 2024 · 131 次引用
- MAmmoTH2: Scaling Instructions from the WebXiang Yue, Tianyu Zheng, Ge Zhang, Wenhu ChenNeurIPS 2024 · 176 次引用
- Differential Fine-Tuning Large Language Models Towards Better Diverse Reasoning AbilitiesXiaosong Yuan, Chen Shen, Shaotian Yan, kaiyuan liu 等ICLR 2026 · 6 次引用
