用信念和策略声明式控制大模型流水线,让智能体更可审计、可组合。
Credo: Declarative Control of LLM Pipelines via Beliefs and Policies

- 将状态抽象为信念,用规则策略来指导行为决策
- 无需修改代码即可动态调整模型选择与重执行
- 适合需要长期状态管理的复杂智能体系统
智能体系统在需要长时间、持续演化环境中做状态化决策的应用中日益普遍。正确性不仅取决于单次模型调用的输出,还取决于如何根据新证据调整或修正先前结论。然而现有框架依赖命令式控制循环、临时内存和嵌入提示的逻辑,导致行为不透明、脆弱且难以验证。本文提出Credo,将语义状态表示为信念,并通过定义在这些信念上的声明式策略来调控行为。该设计通过数据库支持的语义控制平面,实现可适应、可审计、可组合的执行。我们在一个决策控制场景中展示了这一理念:信念与策略以声明方式引导关键执行选择(如模型选择、检索、纠错重执行),实现动态行为而无需修改底层流水线代码。
原文摘要 · Abstract (English)
Agentic AI systems are becoming commonplace in domains that require long-lived, stateful decision-making in continuously evolving conditions. As such, correctness depends not only on the output of individual model calls, but also on how to best adapt when incorporating new evidence or revising prior conclusions. However, existing frameworks rely on imperative control loops, ephemeral memory, and prompt-embedded logic, making agent behavior opaque, brittle, and difficult to verify. This paper introduces Credo, which represents semantic state as beliefs and regulates behavior using declarative policies defined over these beliefs. This design supports adaptive, auditable, and composable execution through a database-backed semantic control plane. We showcase these concepts in a decision-control scenario, where beliefs and policies declaratively guide critical execution choices (e.g., model selection, retrieval, corrective re-execution), enabling dynamic behavior without requiring any changes to the underlying pipeline code.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。