仅用3条正确执行记录,自动验证智能体行为是否正确。
Learning Correct Behavior from Examples: Validating Sequential Execution in Autonomous Agents
- 结合编译器支配分析与大模型语义理解,识别关键状态。
- 仅需2-10条通过样本,即可构建通用正确行为模型。
- 适用于界面测试、代码生成等多领域,结果可解释。
随着智能体日益复杂,验证其顺序行为成为重大挑战。传统方法需人工指定、精确匹配序列或数千条训练样本。本文提出一种新算法,仅需2-10条成功执行轨迹,即可自动学习正确行为,并用于验证新执行。该方法融合编译器理论中的支配分析与多模态大语言模型的语义理解,识别关键状态并处理非确定性行为。系统采用前缀树接受器构建泛化真值模型,通过多层级等价检测合并轨迹,并以拓扑子序列匹配验证新执行。在可控实验中,仅使用3条训练轨迹即实现高精度的产品缺陷与虚假成功检测。该方法提供可解释的验证结果及覆盖率度量,适用于用户界面测试、代码生成和机器人流程等多样领域。
原文摘要 · Abstract (English)
As autonomous agents become increasingly sophisticated, validating their sequential behavior presents a significant challenge. Traditional testing approaches require manual specification, exact sequence matching, or thousands of training examples. We present a novel algorithm that automatically learns correct behavior from just 2-10 passing execution traces and validates new executions against this learned model. Our approach combines dominator analysis from compiler theory with multimodal large language model-powered semantic understanding to identify essential states and handle non-deterministic behavior. The system constructs a generalized ground truth model using Prefix Tree Acceptors, merges traces through multi-tiered equivalence detection, and validates new executions via topological subsequence matching. In controlled experiments, our system achieved high accuracy in detecting product bugs and false successes using only 3 training traces. This approach provides explainable validation results with coverage metrics and works across diverse domains including UI testing, code generation, and robotic processes.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。