为LLM智能体的上下文设计提供标准化描述语言,提升系统可读性与可复现性。
A Language for Describing Agentic LLM Contexts

- 提出ACDL语言,精准描述上下文的角色消息、动态内容和时间索引结构
- 支持条件与循环结构表达,可独立于具体实现完整刻画提示工程架构
- 适用于论文写作、团队协作及代码评审,促进上下文设计的标准化
大型语言模型越来越多地被用于更复杂的系统(即LLM智能体),这些系统通过一系列模型调用完成任务,每次调用都向模型传递指令、观测结果和交互历史。上下文的设计与结构对系统性能至关重要,催生了大量上下文工程工作。然而,目前缺乏统一的上下文描述标准:上下文构建通常依赖非正式文字、临时图表或代码直接阅读,难以精确呈现提示在交互过程中的演变,也难以比较不同上下文策略的差异。为此,我们提出一种名为Agentic Context Description Language(ACDL)的语言,用于以精确、可读且标准化的方式描述LLM输入上下文的结构与动态演化,并提供可视化支持。ACDL支持角色消息序列、动态内容、时间索引引用以及条件或迭代结构等建模能力,能独立于具体实现完整表达提示架构。其图示既可手绘于白板,也可用正式语言编写后渲染。我们通过文档化多个现有系统及其变体展示了该语言的应用,并鼓励社区在日常交流与论文中采用它来描述上下文设计。工具、示例与文档见www.acdlang.org。
原文摘要 · Abstract (English)
Large language models are increasingly used within larger systems ("LLM agents"). These make a sequence of LLM calls, each call providing the LLM with a combination of instructions, observations, and interaction history. The design of the encoded information and its structure play a central role in the quality of the resulting system, leading to efforts spent on context engineering. It is therefore critical to communicate the composition of the LLM context in a system, and how it evolves over time. Yet, no standard exists for doing so: context construction is typically conveyed through informal prose, ad hoc diagrams, or direct inspection of code, none of which precisely capture how a prompt evolves across interaction steps or how two context representation strategies differ. To remedy this, we introduce the Agentic Context Description Language (ACDL), a language for specifying the structure and dynamics of LLM input contexts in a precise, readable, and standard manner, along with visualizations. ACDL provides constructs for specifying context aspects such as role message sequences, dynamic content, time-indexed references, and conditional or iterative structure, capturing the full architecture of a prompt independently of any particular implementation. ACDL diagrams can be hand drawn on a whiteboard, or written in formal language which can then be rendered. We describe the language, demonstrate it by documenting several existing systems and their variants, and encourage the community to adopt it for describing LLM systems context, both in day-to-day communication and in papers. Tooling, examples and documentation are available at www.acdlang.org.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。