arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2611.30494cs.AI
收藏

重新审视大型语言模型作为上下文工程师

Revisiting LLMs as Context Engineers

National University of Singapore(新加坡国立大学);University of Science and Technology of China(中国科学技术大学);University of Chicago(芝加哥大学)

Junrui Zhang, Zeyu Xu, Runchuan Zhu, Jie Peng, Long Zhang, Zixin Ding, Jiaxin Lin, Kai Wang, Jianmin Ji, Junyuan Hong

AI总结:

本研究建立含不同推理模式的基准,对比8B规模LLM的LCE方法,发现其性能与推理失败多样性负相关,揭示LCE抽象多样失败模式的能力有限,为后续研究提供指导。

摘要:

随着大型语言模型(LLMs)被应用于越来越多的新任务,上下文工程成为一种无需密集训练即可通过构建指令提示或元数据来有效引导LLMs的基础方法。越来越多的LLM上下文工程(LCE)方法通过将LLM本身作为工程师,从离线试验中提取可泛化的指令或经验作为上下文,来自动完成该任务。尽管这些方法类似于人类从经验中学习的方式,但目前仍不清楚LLMs何时以及如何能从数据中构建有效的上下文。为回答该问题,我们首先建立了一个由具有不同推理模式的数据集组成的基准。我们在8B规模的不同LLM家族中比较了不同的LCE方法,结果显示,不存在适用于所有任务的单一最优方法,即使与思维链等简单基线相比也是如此。即使通过更多参数或生成迭代来扩展模型能力,LCE也无法持续提升现有性能。在所有数据集和模型中,LCE的性能提升与推理轨迹的失败模式多样性呈负相关(r=-0.5,p≤0.05)。在研究LCE的工作机制时,我们发现:(1)指令遵循度的提升可以解释LCE的部分成功;(2)一个主要瓶颈在于LLMs能否从天然多样的失败中提取有效经验。通过本研究,我们揭示了LCE在从多样失败模式中抽象出原则性上下文方面的有限能力,并理解了LCE的工作原理,为未来工作提供了指导。

英文摘要:

As large language models (LLMs) are used in more and more new tasks, context engineering becomes a fundamental method to efficiently steer LLMs by constructing instruction prompts or metadata without intensive training. A growing number of LLM context engineering (LCE) approaches automate the task by casting the LLM itself as the engineer that draws generalizable instructions or experiences from offline trials as context. Although these methods resemble how humans learn from experiences, it remains unclear \textbf{when and how} LLMs can engineer effective context from data. To answer the question, we first establish a benchmark composed of datasets with different reasoning patterns. We compared different LCE methods with different LLM families in 8B size, showing that there is no single winner for all tasks, even compared with simple baselines like chain-of-thought. Even when scaling model capabilities via more parameters or generation iterations, LCEs do not consistently boost existing performance. Across all datasets and models, the performance gains of LCEs are negatively correlated ($r=-0.5, p\le 0.05$) with the diversity of the failure modes of reasoning trajectories. Investigating how LCEs work, we find that (1) the improvement in instruction adherence can explain some success of LCEs; (2) one major bottleneck is whether LLMs can extract effective experiences out of natively diverse failures. Through this study, we uncover the limited capabilities of LCEs in abstracting principled contexts from diverse failure modes and understand how LCEs work, providing guidelines for future work.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑