arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2603.09004cs.SE
收藏

AI代理能否生成微服务?我们距离多远?

Can AI Agents Generate Microservices? How Far are We?

SERC, IIIT Hyderabad(印度信息技术研究所海德拉巴分校 SERC);University of Oulu(奥卢大学);University of Southern Denmark(南丹麦大学)

Bassam Adnan, Matteo Esposito, Davide Taibi, Karthik Vaidhyanathan

AI总结:

本文研究了AI代理生成微服务的能力,发现渐进式生成在单元测试中表现较好,而清洁状态生成在集成测试中表现更优,但整体上仍需人类监督。

摘要:

大型语言模型(LLMs)在代码生成方面已取得进展,但它们在生成具有显式依赖关系和API合同的微服务方面的应用仍研究不足。我们探讨了AI代理是否能够生成功能性的微服务,以及不同形式的上下文信息如何影响其性能。我们评估了144个生成的微服务,涉及3个代理、4个项目、2种提示策略和2种场景。渐进式生成在现有系统内进行,并通过单元测试评估。清洁状态生成仅基于需求,并通过集成测试评估。我们分析了功能正确性、代码质量和效率。最小提示在渐进式生成中优于详细提示,单元测试通过率在50-76%之间。清洁状态生成产生了更高的集成测试通过率(81-98%),表明对API合同的强烈遵守。生成的代码比人类基线的复杂性更低。生成时间在不同代理之间差异很大,平均每个服务耗时6-16分钟。AI代理可以生成具有可维护代码的微服务,但不一致的正确性和对人类监督的依赖表明,完全自动化的微服务生成尚未实现。

英文摘要:

LLMs have advanced code generation, but their use for generating microservices with explicit dependencies and API contracts remains understudied. We examine whether AI agents can generate functional microservices and how different forms of contextual information influence their performance. We assess 144 generated microservices across 3 agents, 4 projects, 2 prompting strategies, and 2 scenarios. Incremental generation operates within existing systems and is evaluated with unit tests. Clean state generation starts from requirements alone and is evaluated with integration tests. We analyze functional correctness, code quality, and efficiency. Minimal prompts outperformed detailed ones in incremental generation, with 50-76% unit test pass rates. Clean state generation produced higher integration test pass rates (81-98%), indicating strong API contract adherence. Generated code showed lower complexity than human baselines. Generation times varied widely across agents, averaging 6-16 minutes per service. AI agents can produce microservices with maintainable code, yet inconsistent correctness and reliance on human oversight show that fully autonomous microservice generation is not yet achievable.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑