AgentModernize: 通过多智能体LLM和行为规范图在遗留系统现代化中保留业务逻辑
AgentModernize: Preserving Business Logic in Legacy Modernization with Multi-Agent LLMs and Behavioral Specification Graphs
AI总结:
本文提出AgentModernize框架,通过多智能体系统和行为规范图来保留业务逻辑,解决传统方法在遗留系统现代化中丢失隐含规则和交叉模块约束的问题,实验表明该方法在多个场景中表现优异。
摘要:
遗留系统现代化会破坏业务逻辑。大多数工具和基于LLM的方法将现代化视为语法翻译,丢失了隐含规则、边缘情况处理和跨模块约束。我们提出了AgentModernize,一个将现代化视为行为保留问题的多智能体框架。四个专门的代理负责提取、规范、代码生成和验证。关键中间产物——行为规范图(BSG)——在任何代码生成之前强制提取的业务逻辑必须是显式且可检查的。我们在LegacyModernize-8上进行了评估,八个场景涵盖电信和银行业,使用三种模型(GPT-4o-mini,GPT-4o,GPT-5.3-codex)在公平的协议下:相同的金标准测试,三次试验,温度0.0。完整的AgentModernize加上反馈是唯一在每种基础架构下具有非零平均BER的配置。SP-LLM和CoT-LLM在每个场景和每个基础架构上都得分为0.0%。没有反馈的AgentModernize在GPT-4o-mini和GPT-5.3-codex上得到0.0%的平均BER;在GPT-4o下,仅在S1(44.4%;5.6%的平均场景)中出现非零BER。完整的AgentModernize的平均BER为9.4%(mini),8.1%(GPT-4o),和19.4%(codex)。BSG捕获了91.2%的金标准规则,证实瓶颈是代码生成,而不是提取。
英文摘要:
Legacy modernization breaks business logic more often than most teams expect. Most tools and LLM-based approaches treat modernization as syntax translation: convert COBOL to Java, swap PL/SQL for Python, ship it. Implicit rules, edge-case handling, and cross-module constraints that keep production systems running are lost, and nobody notices until something fails in production. We present AgentModernize, a multi-agent framework that treats modernization as a behavioral preservation problem. Four agents handle extraction, specification, code generation, and validation. The key intermediate artifact, a Behavioral Specification Graph (BSG), forces extracted business logic to be explicit and inspectable before any code is generated. We evaluated on LegacyModernize-8, eight synthetic scenarios spanning telecom and banking, under a fair protocol where each method's tests are generated from its own API surface (3 trials, temperature 0.0). With GPT-4o-mini, AgentModernize with feedback achieves 23.0% mean BER (non-zero on 5/8 scenarios, up to 53.3%), while AgentModernize without feedback reaches 23.8%. SP-LLM scores 12.4% (non-zero on 2/8) and CoT-LLM 4.5% (2/8). No single method dominates all scenarios. The feedback loop is decisive for scenarios requiring iterative correction (S4, S6, S7) but can regress code in others (S2, S8). The BSG captures 92.3% of gold-standard rules with 90.2% precision; the bottleneck is code generation, not extraction. A cross-model study (GPT-4o, GPT-5.3-codex) reveals the pipeline's benefit is inversely correlated with model capability: stronger models achieve higher BER with single-prompt methods than with the pipeline. For regulated industries, the pipeline's traceable artifacts (business rule inventory, BSG, equivalence reports) provide an audit trail that no single-prompt approach can match.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。