arXiv:2512.00611cs.CL2025-12

用简洁语法定义智能体行为,让决策逻辑可读可验。

Prism: A Minimal Compositional Metalanguage for Specifying Agent Behavior

  • 基于固定核心语法,用组合方式构建智能体策略
  • 支持自然语言规则转为可执行、可检查的决策程序
  • 适合需要安全可控的智能体系统设计者

Prism 是一种小型、可组合的元语言,用于定义使用工具的软件智能体行为。它不引入临时控制结构,而是围绕一个固定的核心上下文 Core1 构建,提供数字、字符串、用户提示、工具等基本类别,以及布尔值、谓词、对偶和列表的抽象组合器。智能体策略以普通表达式形式书写,仅用单一抽象操作符,使条件判断表现为不同选项间的选择,而非命令式的 if-else 结构。各应用领域可通过定义自己的上下文小语法来扩展核心,引入新类别、谓词和外部工具,同时复用相同的组合机制。文中通过恒温器控制、家庭安防、电商推荐和医疗监测等实例,展示了如何将自然语言决策规则映射为可检查、可执行的策略。从语言学角度看,Prism 明确区分可复用的核心语法与领域特定词汇,并将工具视为内部策略表示与外部世界之间的桥梁。从工程角度看,它提供紧凑的智能体控制接口语言,使可能动作空间显式化,便于分析、验证和施加安全约束。

原文摘要 · Abstract (English)

Prism is a small, compositional metalanguage for specifying the behaviour of tool-using software agents. Rather than introducing ad hoc control constructs, Prism is built around a fixed core context, Core1, which provides a minimal background grammar of categories numbers, strings, user prompts, tools together with abstract combinators for booleans, predicates, pairs, and lists. Agent policies are written as ordinary expressions using a single abstraction operator so that conditionals appear as selections between alternatives instead of imperative if-else blocks. Domains extend the core by defining their own context-mini-grammars that introduce new categories, predicates, and external tools while reusing the same compositional machinery. We illustrate this with worked examples from thermostat control, home security, e-commerce recommendation, and medical monitoring, showing how natural language decision rules can be mapped to inspectable, executable policies. From a linguistic perspective, Prism enforces a clear separation between a reusable grammar-like core and domain specific lexicons and treats tools as bridges between internal policy representations and the external world. From an engineering perspective, it offers a compact interface language for agent control, making the space of possible actions explicit and amenable to analysis, verification, and safety constraints.

智能体行为规范可解释性

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