arXiv:2510.07414cs.CLcs.AI2025-10被引 4

构建噪声长文本测试集,评估大模型在真实复杂场景下的推理鲁棒性。

Haystack Engineering: Context Engineering for Heterogeneous and Agentic Long-Context Evaluation

  • 基于维基百科超链接网络设计多跳问答基准,模拟多样检索器引入的干扰
  • 强稠密检索器虽增干扰但图重排可同时提升效果并减少有害干扰
  • 揭示大模型在自主推理中易因自生干扰导致连锁错误,适合研究长期推理的学者

现代长上下文大语言模型在合成的'针在 haystack'(NIAH)基准上表现良好,但这些测试忽略了现实世界中噪声上下文的来源——如偏见检索与代理工作流。本文提出需进行'haystack engineering',以构建包含异构偏见检索与代理流程级联错误的真实噪声长上下文,来评估模型的长上下文鲁棒性。我们通过 HaystackCraft 新基准实现该目标,其基于完整英文维基百科超链接网络,支持多跳问题。该基准评估不同检索策略(稀疏、稠密、混合、图基)对干扰项构成、文档排序及下游模型性能的影响。此外,还扩展 NIAH 至动态、依赖大模型的设置,模拟代理操作:模型可优化查询、反思过往推理并决定终止。15 个长上下文模型实验表明:(1) 强稠密检索器会引入更难干扰项,但图重排能同时提升检索效率并减轻有害干扰;(2) 即使是先进模型如 Gemini 2.5 Pro 与 GPT-5 也面临自生成干扰引发的级联失败或早期停止困难。结果凸显代理式长上下文推理中的持续挑战,并确立 HaystackCraft 作为未来进展的重要测试平台。

原文摘要 · Abstract (English)

Modern long-context large language models (LLMs) perform well on synthetic "needle-in-a-haystack" (NIAH) benchmarks, but such tests overlook how noisy contexts arise from biased retrieval and agentic workflows. We argue that haystack engineering is necessary to construct noisy long contexts that faithfully capture key real-world factors -- distraction from heterogeneous biased retrievers and cascading errors in agentic workflows -- to test models' long-context robustness. We instantiate it through HaystackCraft, a new NIAH benchmark built on the full English Wikipedia hyperlink network with multi-hop questions. HaystackCraft evaluates how heterogeneous retrieval strategies (e.g., sparse, dense, hybrid, and graph-based) affect distractor composition, haystack ordering, and downstream LLM performance. HaystackCraft further extends NIAH to dynamic, LLM-dependent settings that simulate agentic operations, where models refine queries, reflect on their past reasonings, and decide when to stop. Experiments with 15 long-context models show that (1) while stronger dense retrievers can introduce more challenging distractors, graph-based reranking simultaneously improves retrieval effectiveness and mitigates more harmful distractors; (2) in agentic tests, even advanced models like Gemini 2.5 Pro and GPT-5 suffer cascading failures from self-generated distractors or struggle to perform early stops. These results highlight persistent challenges in agentic long-context reasoning and establish HaystackCraft as a valuable testbed for future progress.

长上下文检索增强代理推理基准测试

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。