NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

WebGen-Agent: Enhancing Interactive Website Generation with Multi-Level Feedback and Step-Level Reinforcement Learning

Zimu Lu, Houxing Ren, Yunqiao Yang, Ke Wang, Zhuofan Zong, Junting Pan, Mingjie Zhan, Hongsheng Li

TL;DR

WebGen-Agent moves beyond simple "does the code run?" feedback by using a Visual Language Model (VLM) and a GUI-testing agent to evaluate the aesthetics and functionality of generated websites. By combining this multi-level feedback with a novel Step-level Reinforcement Learning (Step-GRPO) approach, the authors nearly doubled the accuracy of Claude-3.5-Sonnet on complex web generation tasks and significantly boosted the performance of smaller open-source models.

The Problem: "Visually Blind" Code Agents

While Large Language Model (LLM) agents have become highly proficient at generating code, they are often "visually blind." For repository-level tasks like fixing a backend bug, code execution feedback (e.g., "did the test pass?") is usually sufficient. However, website generation is a different beast—it relies heavily on visual aesthetics, layout harmony, and the nuances of user interaction.

Current agents typically rely on simple execution checks. An agent might generate code that runs without errors but produces a website with misaligned buttons, clashing colors, or broken navigation links. Because the agent cannot "see" or "feel" the interface it built, it cannot effectively iterate toward a high-quality user experience.

Methodology: Bridging the Visual-Functional Gap

The authors introduce two major components to solve this problem:

1. WebGen-Agent Workflow

This is an iterative, multi-step paradigm. In each step, the agent generates code, executes it, and then gathers feedback from two distinct sources:

  • Visual Feedback: A VLM (like Qwen2.5-VL) "looks" at a screenshot of the landing page, provides a descriptive critique, and assigns an appearance score.
  • Functional Feedback: A GUI agent explores the site to verify that buttons, links, and forms actually work as intended, providing a GUI-agent score.
  • Backtracking & Selection: If the agent hits five consecutive errors, it backtracks to the last "best" state. At the end of the process, it selects the version of the codebase that achieved the highest combined visual and functional scores.
WebGen-Agent Workflow

2. Step-GRPO (Step-level Group Relative Policy Optimization)

Standard reinforcement learning often uses a single "outcome reward" at the very end of a task. For long coding trajectories, this makes it hard for the model to know which specific step was good or bad. Step-GRPO uses the VLM and GUI scores at every single step as a dense reward signal. This "process supervision" helps the model learn the direct relationship between specific code edits and visual/functional improvements.

Datasets

  • WebGen-Bench: The primary benchmark, consisting of 101 natural language instructions for website generation and 647 GUI-agent test cases.
  • WebGen-Instruct: A training set of ~700 trajectories used for the initial Supervised Fine-Tuning (SFT) and subsequent Step-GRPO training.
  • ArtifactsBench: Used to test the generalizability of the agent on a different set of web application tasks.

Key Insights

  • Decoupling Coding and Feedback: A highly practical insight is that a massive, expensive model isn't needed for everything. The authors found that a relatively small, open-source VLM (32B) is sufficient for providing high-quality visual feedback, even when the "coding engine" is a much larger proprietary model.
  • Dense Rewards Solve Credit Assignment: By rewarding the model at every step based on visual/functional delta, training becomes much more efficient. This effectively translates the VLM’s "vision" into the coding LLM’s "programming skill."
  • The Power of Backtracking: Website generation is non-linear; a "fix" for a button might break the entire layout. Implementing a memory-based backtracking mechanism allows the agent to escape local minima and "hallucination loops."

Key Results

The improvements across both proprietary and open-source models were substantial:

Performance Comparison on WebGen-Bench
  • Claude-3.5-Sonnet: Accuracy on WebGen-Bench jumped from 26.4% to 51.9%, and its appearance score rose from 3.0 to 3.9 (out of 5).
  • Qwen2.5-Coder-7B-Instruct: After Step-GRPO training, accuracy increased from 38.9% to 45.4%, outperforming much larger base models.
  • State-of-the-Art: WebGen-Agent outperformed existing popular agents like OpenHands, Aider, and Bolt.diy across nearly all metrics.
  • Human Alignment: Manual inspection showed that the VLM-generated scores were highly accurate (93-96% alignment with human judges), validating the use of VLMs as reliable automated "critics."

Limitations and Future Work

  • Computational Costs: Training larger models (30B+) with Step-GRPO is currently limited by GPU memory and compute time (the 7B/8B models already required 24+ hours on 16 A800 GPUs).
  • Scope of Evaluation: The current system focuses on landing page aesthetics and basic interactions. It does not yet account for website performance (load speeds) or complex network conditions.
  • GUI Agent Dependency: The quality of functional feedback is capped by the capabilities of the underlying GUI agent. As web-navigation agents improve, WebGen-Agent's performance is expected to scale accordingly.

Summary updated

BibTeX
@inproceedings{lu2026webgen,
  author = {Zimu Lu and Houxing Ren and Yunqiao Yang and Ke Wang and Zhuofan Zong and Junting Pan and Mingjie Zhan and Hongsheng Li},
  title = {{WebGen-Agent: Enhancing Interactive Website Generation with Multi-Level Feedback and Step-Level Reinforcement Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=fE14yWa68Z},
}
Figure