MacroBench:面向大语言模型的Web自动化脚本新型测试平台
MacroBench: A Novel Testbed for Web Automation Scripts via Large Language Models
AI总结:
MacroBench是一个代码优先基准,通过HTML/DOM和Selenium评估LLM合成浏览器自动化宏的能力,涵盖681个任务,结果显示简单任务可靠但复杂工作流失败。
摘要:
我们提出了MacroBench,一个代码优先的基准测试,用于评估大语言模型(LLMs)是否能够通过阅读HTML/DOM并生成Selenium代码,从自然语言目标中合成可复用的浏览器自动化程序(宏)。MacroBench实例化了七个自托管网站,涵盖681个任务,这些任务在交互复杂性和目标定位难度上有所不同。我们的端到端协议通过静态检查、沙盒执行和结果验证(DOM断言、数据库快照)来验证生成的代码,并包含一个安全套件,用于处理抓取、垃圾邮件/滥用以及凭证/隐私提示。在2,636次模型-任务运行中,我们观察到分层成功率:GPT-4o-mini(96.8%)、GPT-4o(95.3%)、Gemini(89.0%)、DeepSeek(83.4%)。模型能可靠地处理简单任务(91.7%),但在复杂工作流上失败(0.0%),并且尽管功能完成,但没有一个达到生产质量的编码实践。我们在https://github.com/hyunjun1121/MacroBench 发布了完整的基准测试管道、评估框架和实验结果,以实现对Web自动化宏合成的可重复评估。
英文摘要:
We introduce MacroBench, a code-first benchmark that evaluates whether LLMs can synthesize reusable browser-automation programs (macros) from natural-language goals by reading HTML/DOM and emitting Selenium. MacroBench instantiates seven self-hosted sites covering 681 tasks across interaction complexity and targeting difficulty. Our end-to-end protocol validates generated code via static checks, sandboxed execution, and outcome verification (DOM assertions, database snapshots), and includes a safety suite for scraping, spam/abuse, and credential/privacy prompts. Across 2,636 model-task runs, we observe stratified success: GPT-4o-mini (96.8%), GPT-4o (95.3%), Gemini (89.0%), DeepSeek (83.4%). Models handle simple tasks reliably (91.7%) but fail on complex workflows (0.0%), and none meet production-quality coding practices despite functional completion. We release our complete benchmark pipeline, evaluation framework, and experimental results at https://github.com/hyunjun1121/MacroBench to enable reproducible assessment of macro synthesis for web automation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。