ChatPaper.aiChatPaper

WebGen-Bench: Оценка способности языковых моделей генерировать интерактивные и функциональные веб-сайты с нуля

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

May 6, 2025
Авторы: Zimu Lu, Yunqiao Yang, Houxing Ren, Haotian Hou, Han Xiao, Ke Wang, Weikang Shi, Aojun Zhou, Mingjie Zhan, Hongsheng Li
cs.AI

Аннотация

Агенты на основе языковых моделей (LLM) продемонстрировали значительный потенциал в генерации и управлении кодом в сложных кодовых базах. В данной статье мы представляем WebGen-Bench — новый бенчмарк, разработанный для оценки способности LLM-агентов создавать многокомпонентные кодовые базы веб-сайтов с нуля. Он включает разнообразные инструкции для генерации веб-сайтов, созданные совместными усилиями человеческих аннотаторов и GPT-4o. Эти инструкции охватывают три основные категории и тринадцать подкатегорий, включая практически все важные типы веб-приложений. Для оценки качества сгенерированных веб-сайтов мы используем GPT-4o для создания тестовых случаев, нацеленных на каждую функциональность, описанную в инструкциях, а затем вручную фильтруем, корректируем и организуем их для обеспечения точности, в результате чего получаем 647 тестовых случаев. Каждый тестовый случай определяет операцию, которую необходимо выполнить на веб-сайте, и ожидаемый результат после её выполнения. Для автоматизации тестирования и повышения воспроизводимости мы применяем мощного агента для навигации по веб-сайтам, который выполняет тесты на сгенерированных веб-сайтах и определяет, соответствуют ли наблюдаемые результаты ожидаемым. Мы оцениваем три высокопроизводительных фреймворка для работы с кодом — Bolt.diy, OpenHands и Aider, используя несколько проприетарных и открытых LLM в качестве движков. Лучшая комбинация, Bolt.diy с движком DeepSeek-R1, достигает точности всего 27,8% на тестовых случаях, что подчеркивает сложность нашего бенчмарка. Кроме того, мы создаем WebGen-Instruct — обучающий набор, состоящий из 6 667 инструкций для генерации веб-сайтов. Обучение модели Qwen2.5-Coder-32B-Instruct на траекториях Bolt.diy, сгенерированных на основе подмножества этого обучающего набора, позволяет достичь точности 38,2%, превосходящей производительность лучшей проприетарной модели.
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.

Summary

AI-Generated Summary

PDF151May 13, 2025