评测大模型从零生成可交互网站的能力,发现现有方法准确率不足三成。
WebGen-Bench: Evaluating LLMs on Generating Interactive and Functional Websites from Scratch
- 构建多类别网页生成指令集与自动化测试流程,实现端到端评估。
- 顶尖模型组合仅达27.8%准确率,凸显生成复杂网页的挑战性。
- 开源训练集助力模型性能超越部分闭源方案,适合研究代码生成者。
基于大模型的智能体在复杂代码库中生成与管理代码方面展现出巨大潜力。本文提出WebGen-Bench,一个新型基准,用于评估大模型智能体从零开始创建多文件网站代码库的能力。该基准包含通过人工标注与GPT-4o协同生成的多样化网页生成指令,覆盖三大类、十三小类,几乎涵盖所有重要类型的Web应用。为评估生成网站的质量,我们使用GPT-4o生成针对指令中描述功能的测试用例,并经人工筛选、调整与整理,形成647个测试用例,每个用例明确指定操作及预期结果。为实现自动化测试并提升可复现性,采用强大的网页导航智能体在生成网站上执行测试,判断实际响应是否符合预期。我们评估了三种高性能代码智能体框架(Bolt.diy、OpenHands、Aider)在多个专有与开源大模型下的表现,最佳组合(Bolt.diy + DeepSeek-R1)仅达到27.8%准确率,凸显本基准的难度。此外,我们构建了WebGen-Instruct训练集,包含6,667条网页生成指令。在子集轨迹上训练Qwen2.5-Coder-32B-Instruct模型,准确率达38.2%,超过最优闭源模型表现。
原文摘要 · Abstract (English)
LLM-based agents have demonstrated great potential in generating and managing code within complex codebases. In this paper, we introduce WebGen-Bench, a novel benchmark designed to measure an LLM-based agent's ability to create multi-file website codebases from scratch. It contains diverse instructions for website generation, created through the combined efforts of human annotators and GPT-4o. These instructions span three major categories and thirteen minor categories, encompassing nearly all important types of web applications. To assess the quality of the generated websites, we use GPT-4o to generate test cases targeting each functionality described in the instructions, and then manually filter, adjust, and organize them to ensure accuracy, resulting in 647 test cases. Each test case specifies an operation to be performed on the website and the expected result after the operation. To automate testing and improve reproducibility, we employ a powerful web-navigation agent to execute tests on the generated websites and determine whether the observed responses align with the expected results. We evaluate three high-performance code-agent frameworks, Bolt.diy, OpenHands, and Aider, using multiple proprietary and open-source LLMs as engines. The best-performing combination, Bolt.diy powered by DeepSeek-R1, achieves only 27.8\% accuracy on the test cases, highlighting the challenging nature of our benchmark. Additionally, we construct WebGen-Instruct, a training set consisting of 6,667 website-generation instructions. Training Qwen2.5-Coder-32B-Instruct on Bolt.diy trajectories generated from a subset of this training set achieves an accuracy of 38.2\%, surpassing the performance of the best proprietary model.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。