让大模型智能体持续进化,无需改代码就能根据新规则自动修正行为。
Agent Gym: A Framework for Continuous Evaluation and Evolution of LLM Agents Through Human-in-the-Loop Feedback
- 通过六项可组合能力构建闭环,实现智能体行为的持续评估与修正。
- 在发票处理场景中验证,能自动发现并修正12类业务规则偏差。
- 适合需要快速响应业务变化的金融、客服等领域的智能体运维团队。
部署于生产环境的大语言模型(LLM)智能体面临根本矛盾:其行为在部署后即固定,而业务规则和边缘情况却持续演化。现有方法仅支持一次性构建与评估,缺乏无需修改源码即可持续修正行为的结构化机制。多数市场方案依赖大量日志收集与工程团队重审设计,过程繁重且削弱了智能体转型的经济价值。本文提出Agent Gym,一个模块化、领域无关的框架,将任意现有LLM智能体纳入持续评估与演化循环。该框架提供六项可组合能力——执行、评估、调查、纠正、学习、观察——分属三个架构层级:配置化领域知识的宪章层、链式执行-调查-自适应修正的运行时推理管道,以及通过自然语言交互使领域专家发现并验证新修正规则的学习环。关键技术贡献包括含21个条件操作符与三阶动作的混合确定性-大模型纠错引擎、无真实标签的三层调查架构,以及确保规则正确性的程序化安全环。此外提出「规范到注释差距」概念,以自编码器视角揭示智能体透明度。开源参考实现基于发票处理场景,验证框架可落地可用。
原文摘要 · Abstract (English)
Large Language Model (LLM) agents deployed in production environments face a fundamental tension: the agent's behavior is frozen at deployment time, while the business rules and edge cases it must handle continue to evolve. Existing approaches address agent construction and one-time evaluation but provide no structured mechanism for continuous post-deployment behavioral correction without modifying the agent's source code. Most of the approaches offered in the market, require intense collection of logs and traces, and re-examining the agent design by the engineering team, a process which is heavy, long and negates the economical value of agentic transformation. We introduce Agent Gym, a modular, domain-agnostic framework that wraps any existing LLM-based agent in a continuous evaluation-and-evolution loop. The framework provides six composable capabilities --- Act, Evaluate, Investigate, Correct, Learn, and Observe --- organized across three architectural zones: a constitution layer that codifies domain knowledge in configuration artifacts, a runtime inference pipeline that chains acting, investigation, and adaptive correction, and a learning loop that enables subject matter experts to discover and validate new correction rules through natural language interaction. The key technical contributions include a hybrid deterministic-LLM correction engine with 21 condition operators and three-tier actions, a three-layer investigation architecture for ground-truth-free compliance validation, and a programmatic safety loop that guarantees rule correctness before human approval. We further introduce the Spec-to-Note Gap, an autoencoder-inspired view of agentic system transparency. An open-source reference implementation for invoice processing demonstrates that the framework is fully operational and ready for adoption.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。