arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2505.03733cs.CL
收藏

WebGen-Bench:评估LLM从零开始生成交互式与功能性网站的能力

WebGen-Bench: Evaluating LLMs on Generating Interactive and Functional Websites from Scratch

Multimedia Laboratory (MMLab), The Chinese University of Hong Kong(香港中文大学多媒体实验室)

Zimu Lu, Yunqiao Yang, Houxing Ren, Haotian Hou, Han Xiao, Ke Wang, Weikang Shi, Aojun Zhou, Mingjie Zhan, Hongsheng Li

AI总结:

本文提出WebGen-Bench基准,通过647个测试用例评估LLM智能体从零生成多文件网站代码库的能力,并构建WebGen-Instruct训练集微调模型,使Qwen2.5-Coder-32B准确率达38.2%,超越最强专有模型。

摘要:

基于LLM的智能体在复杂代码库中生成和管理代码方面展现出了巨大潜力。在本文中,我们介绍了WebGen-Bench,这是一个新颖的基准,旨在衡量基于LLM的智能体从零开始创建多文件网站代码库的能力。它包含多样化的网站生成指令,这些指令是通过人类标注员和GPT-4o的共同努力创建的。这些指令涵盖3个主要类别和13个次要类别,几乎包含了所有重要类型的Web应用程序。为了评估生成网站的质量,我们使用GPT-4o生成针对指令中描述的每个功能的测试用例,然后手动过滤、调整和组织它们以确保准确性,最终得到647个测试用例。每个测试用例都指定了要在网站上执行的操作以及操作后的预期结果。为了实现测试自动化并提高可重复性,我们采用了一个强大的网页导航智能体在生成的网站上执行测试,并确定观察到的响应是否符合预期结果。我们使用多个专有和开源LLM作为引擎,评估了三个高性能代码智能体框架:Bolt.diy、OpenHands和Aider。表现最好的组合是由DeepSeek-R1驱动的Bolt.diy,在测试用例上仅达到27.8%的准确率,突显了我们基准的挑战性。此外,我们构建了WebGen-Instruct,一个包含6,667条网站生成指令的训练集。在该训练集子集生成的Bolt.diy轨迹上训练Qwen2.5-Coder-32B-Instruct,达到了38.2%的准确率,超越了最佳专有模型的性能。

英文摘要:

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.

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

↑