部署为代码生成代理的大型语言模型表现出随机行为,与软件工程所需的确定性保证不兼容。我们正式化了双状态动作对(DSAP),一种执行原语,将随机生成与确定性后置条件验证相结合。守护函数作为传感动作,将不透明的LLM输出投影到可观察的工作流状态,实现双状态分解:有限的、确定性的S_workflow与无限的、随机的S_env。我们证明,对于能够处理epsilon的生成器,失败概率P(fail) <= (1-epsilon)^R_max -> 0。为防止多步骤工作流中朴素的O(R^K)重试爆炸,我们引入三级恢复层次:上下文细化(在步骤内重试)、有意识回溯(停滞检测与级联无效化和上下文注入到上游步骤)以及人工升级。在13个LLM(1.3B-15B参数)上三个诊断探针的实验验证中,可靠性提升达66个百分点,基准成本为1.2-2.1倍。对99个SWE-Bench Pro实例-臂对(Qwen3-Coder-Next)的恢复机制评估显示,100%的上下文注入有效性(所有71个升级事件中上游输出均发生变化),具有步骤特定的恢复不对称性——测试生成37.5% vs. 修补生成0%——以及0%的端到端修补生产,确立了执行架构与计划合成之间的边界:执行恢复是必要的但不足以实现自主软件工程。
英文摘要:
Large Language Models deployed as code generation agents exhibit stochastic behavior incompatible with the deterministic guarantees required by software engineering. We formalize the Dual-State Action Pair (DSAP), an execution primitive that couples stochastic generation with deterministic post-condition verification. Guard functions act as sensing actions that project opaque LLM outputs onto observable workflow state, enabling a dual-state decomposition: finite, deterministic S_workflow paired with infinite, stochastic S_env. We prove that for epsilon-capable generators, failure probability P(fail) <= (1-epsilon)^R_max -> 0. To prevent naive O(R^K) retry explosion across multi-step workflows, we introduce a three-level recovery hierarchy: context refinement (retry within step), informed backtracking (stagnation detection with cascade invalidation and context injection to upstream steps), and human escalation. Experimental validation across 13 LLMs (1.3B-15B parameters) on three diagnostic probes demonstrates reliability gains of up to 66 percentage points at 1.2-2.1x baseline cost. Recovery mechanism evaluation on 99 SWE-Bench Pro instance-arm pairs (Qwen3-Coder-Next) demonstrates 100% context injection effectiveness (upstream output changed in all 71 escalation events) with step-specific recovery asymmetry -- 37.5% for test generation vs. 0% for patch generation -- and 0% end-to-end patch production, establishing the boundary between execution architecture and plan synthesis: execution recovery is necessary but not sufficient for autonomous software engineering.
AgentHarm: A Benchmark for Measuring Harmfulness of LLM Agents
Gray Swan AI(格雷天鹅人工智能公司);UK AI Security Institute(英国人工智能安全研究所);EPFL(洛桑联邦理工学院);Center for AI Safety(人工智能安全中心);Carnegie Mellon University(卡内基梅隆大学);University of Oxford(牛津大学)
From LLMs to LLM-based Agents for Software Engineering: A Survey of Current, Challenges and Future
School of Electrical and Computer Engineering, The University of Sydney(悉尼大学电气与计算机工程学院);University at Buffalo, SUNY(纽约州立大学布法罗分校);University of Chicago(芝加哥大学)
AgentBoard: An Analytical Evaluation Board of Multi-turn LLM Agents
Tsinghua University(清华大学);Shanghai Jiao Tong University(上海交通大学);Westlake University(西湖大学);The University of Hong Kong(香港大学);HKUST(香港科技大学);Zhejiang University(浙江大学)
LLM-Agent-UMF: LLM-based Agent Unified Modeling Framework for Seamless Design of Multi Active/Passive Core-Agent Architectures
Mediterranean Institute of Technology(地中海技术研究所);South Mediterranean University(南地中海大学);National School of Computer Science(国家计算机科学学校);University of Manouba(曼努巴大学)
BadAgent: Inserting and Activating Backdoor Attacks in LLM Agents
Zhengzhou University(郑州大学);Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院)
LLM Agents Factory: Retrieval of Domain-Specific LLM Agents
Sber AI;Moscow Institute of Physics and Technology(莫斯科物理技术学院);National University of Science and Technology MISIS(莫斯科国立科学技术大学MISIS);Skolkovo Institute of Science and Technology(斯科尔科沃科学技术研究所);Artificial Intelligence Research Institute(人工智能研究所)
LLM agents security duality: a comprehensive survey of self-security and empowered cybersecurity
School of Cyber Science and Engineering, Wuhan University(武汉大学计算机科学与工程学院);Department of Computer Science and Engineering, University at Buffalo(布法罗大学计算机科学与工程系)
Towards Effective Offensive Security LLM Agents: Hyperparameter Tuning, LLM as a Judge, and a Lightweight CTF Benchmark
New York University(纽约大学);New York University Abu Dhabi(纽约大学阿布扎比分校);Indian Institute of Technology Kanpur(印度理工学院坎普尔分校);International Institute of Information Technology Hyderabad(国际信息技术学院海得拉巴分校)
Strategic Exploitation in LLM Agent Markets: A Simulation Framework for E-Commerce Trust
Northwestern Polytechnical University(西北工业大学);Boston University(波士顿大学);Fudan University(复旦大学);Wuhan University(武汉大学);Chinese Academy of Sciences(中国科学院);University of Oxford(牛津大学)
Molecular LLM Agents: From Architectural Design to Scientific Autonomy
The Hong Kong Polytechnic University(香港理工大学);Shanghai AI Lab(上海人工智能实验室);National University of Singapore(新加坡国立大学);Shanghai Jiao Tong University(上海交通大学)