用案例推理让大模型工作流可复用、可调试,实现自我进化。
NormCode Canvas: Making LLM Agentic Workflows Development Sustainable via Case-Based Reasoning
- 将每个执行节点视为独立案例,避免状态共享导致的错误扩散。
- 支持案例检索复用与自动边界更新,提升多步任务可靠性。
- 适合构建可持续演进的AI自动化系统,如代码生成与调试。
我们提出 NormCode Canvas (v1.1.3),一个部署的系统,通过两级案例推理机制实现多步骤大模型工作流。基础是 NormCode——一种半形式化规划语言,其编译器验证的作用域规则确保每个执行检查点都是自包含案例,消除传统编排框架中隐式共享状态带来的检索不可靠与故障非定位问题。一级将每个检查点视为具体案例(暂停运行时);Fork 实现检索复用,Value Override 实现修订并自动传播过期边界。二级将每个编译计划视为抽象案例;编译流程本身也是 NormCode 计划,支持递归案例学习。三个结构性特性为:(C1) 直接检查点审视;(C2) 编译器生成叙事用于预执行审查;(C3) 作用域限定的选择性重执行。四个已部署计划提供结构化证据:PPT 生成在商用 API 上每页约 40 秒完成;代码助手完成跨越十轮推理的多步软件工程任务;NC 编译将自然语言规格转化为可执行 NormCode 计划;画布助手连接外部 AI 代码编辑器后可自动化计划调试。这些计划共同构成一个自我维持生态系统,计划之间相互生成、调试与优化,实现系统级累积案例学习。
原文摘要 · Abstract (English)
We present NormCode Canvas (v1.1.3), a deployed system realizing Case-Based Reasoning at two levels for multi-step LLM workflows. The foundation is NormCode, a semi-formal planning language whose compiler-verified scope rule ensures every execution checkpoint is a genuinely self-contained case -- eliminating the implicit shared state that makes retrieval unreliable and failure non-localizable in standard orchestration frameworks. Level 1 treats each checkpoint as a concrete case (suspended runtime); Fork implements retrieve-and-reuse, Value Override implements revision with automatic stale-boundary propagation. Level 2 treats each compiled plan as an abstract case; the compilation pipeline is itself a NormCode plan, enabling recursive case learning. Three structural properties follow: (C1) direct checkpoint inspection; (C2) pre-execution review via compiler-generated narrative; (C3) scope-bounded selective re-execution. Four deployed plans serve as structured evidence: PPT Generation produces presentation decks at ~40s per slide on commercial APIs; Code Assistant carries out multi-step software-engineering tasks spanning up to ten reasoning cycles; NC Compilations converts natural-language specifications into executable NormCode plans; and Canvas Assistant, when connected to an external AI code editor, automates plan debugging. Together these plans form a self-sustaining ecosystem in which plans produce, debug, and refine one another -- realizing cumulative case-based learning at system scale.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。