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

大语言模型上下文工程综述

A Survey of Context Engineering for Large Language Models

Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所);University of California, Merced(加州大学默塞德分校);The University of Queensland(昆士兰大学);Peking University(北京大学);Tsinghua University(清华大学);University of Chinese Academy of Sciences(中国科学院大学)
Lingrui Mei, Jiayu Yao, Yuyao Ge, Yiwei Wang, Baolong Bi, Yujun Cai, Jiazhi Liu, Mingyu Li, Zhong-Zhi Li, Duzhen Zhang, Chenlin Zhou, Jiayi Mao, Tianze Xia, Jia… 展开作者

Lingrui Mei, Jiayu Yao, Yuyao Ge, Yiwei Wang, Baolong Bi, Yujun Cai, Jiazhi Liu, Mingyu Li, Zhong-Zhi Li, Duzhen Zhang, Chenlin Zhou, Jiayi Mao, Tianze Xia, Jiafeng Guo, Shenghua Liu

AI总结:

本文系统综述了大语言模型上下文工程,提出涵盖上下文检索、生成、处理与管理的分类体系,并分析RAG、记忆系统、工具集成推理和多智能体系统等实现,同时指出模型在理解复杂上下文与生成长篇输出之间存在能力不对称这一关键研究空白。

摘要:

大语言模型(LLMs)的性能从根本上取决于推理过程中提供的上下文信息。本综述引入了上下文工程(Context Engineering),这是一门超越简单提示设计的正式学科,涵盖对LLMs信息载荷的系统性优化。我们提出了一个全面的分类体系,将上下文工程分解为其基础组件以及将这些组件集成到智能系统中的复杂实现。我们首先考察基础组件:上下文检索与生成、上下文处理和上下文管理。然后,我们探讨这些组件如何在架构上被集成以创建复杂的系统实现:检索增强生成(RAG)、记忆系统与工具集成推理,以及多智能体系统。通过对1400多篇研究论文的系统分析,本综述不仅为该领域确立了技术路线图,还揭示了一个关键的研究空白:模型能力之间存在根本性的不对称。当前模型在先进上下文工程的增强下,在理解复杂上下文方面表现出显著的能力,但在生成同样复杂的长篇输出方面表现出明显的局限性。填补这一空白是未来研究的决定性优先事项。最终,本综述为推进上下文感知人工智能的研究人员和工程师提供了一个统一的框架。

英文摘要:

The performance of Large Language Models (LLMs) is fundamentally determined by the contextual information provided during inference. This survey introduces Context Engineering, a formal discipline that transcends simple prompt design to encompass the systematic optimization of information payloads for LLMs. We present a comprehensive taxonomy decomposing Context Engineering into its foundational components and the sophisticated implementations that integrate them into intelligent systems. We first examine the foundational components: context retrieval and generation, context processing and context management. We then explore how these components are architecturally integrated to create sophisticated system implementations: retrieval-augmented generation (RAG), memory systems and tool-integrated reasoning, and multi-agent systems. Through this systematic analysis of over 1400 research papers, our survey not only establishes a technical roadmap for the field but also reveals a critical research gap: a fundamental asymmetry exists between model capabilities. While current models, augmented by advanced context engineering, demonstrate remarkable proficiency in understanding complex contexts, they exhibit pronounced limitations in generating equally sophisticated, long-form outputs. Addressing this gap is a defining priority for future research. Ultimately, this survey provides a unified framework for both researchers and engineers advancing context-aware AI.

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

↑