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

展望未来交互式Web开发:用自然语言编辑网页

Envisioning Future Interactive Web Development: Editing Webpage with Natural Language

Singapore Management University(新加坡管理大学);The Chinese University of Hong Kong(香港中文大学)

Truong Hai Dang, Jingyu Xiao, Yintong Huo

AI总结:

针对大语言模型编辑现有网页代码能力不足、缺乏高质量微调数据的问题,本文提出自动化数据生成流水线构建Instruct4Edit数据集,微调后小开源模型可媲美专有系统,且公开所有资源。

摘要:

Web应用的演进依赖迭代式代码修改,这一过程传统上为手动操作且耗时。尽管大语言模型(LLMs)能够生成UI代码,但它们根据新的设计需求(例如“将logo居中”)编辑现有代码的能力仍存挑战。这主要是因为缺乏大规模、高质量的微调数据,无法让模型性能与人类预期对齐。本文提出一种新颖的自动化数据生成流水线,利用LLMs合成用于网页编辑的高质量微调数据集,命名为Instruct4Edit。我们的方法生成多样化指令,执行相应的代码修改,并开展视觉验证以确保正确性。通过在Instruct4Edit上微调模型,我们证明其在将人类意图转化为精确、结构连贯且视觉准确的代码变更方面取得了持续提升。该工作为基于自然语言的网页编辑提供了可扩展且透明的基础,表明微调较小的开源模型可达到与专有系统相媲美的性能。我们发布了所有数据、代码实现和模型检查点以供复现。

英文摘要:

The evolution of web applications relies on iterative code modifications, a process that is traditionally manual and time-consuming. While Large Language Models (LLMs) can generate UI code, their ability to edit existing code from new design requirements (e.g., "center the logo") remains a challenge. This is largely due to the absence of large-scale, high-quality tuning data to align model performance with human expectations. In this paper, we introduce a novel, automated data generation pipeline that uses LLMs to synthesize a high-quality fine-tuning dataset for web editing, named Instruct4Edit. Our approach generates diverse instructions, applies the corresponding code modifications, and performs visual verification to ensure correctness. By fine-tuning models on Instruct4Edit, we demonstrate consistent improvement in translating human intent into precise, structurally coherent, and visually accurate code changes. This work provides a scalable and transparent foundation for natural language based web editing, demonstrating that fine-tuning smaller open-source models can achieve competitive performance with proprietary systems. We release all data, code implementations, and model checkpoints for reproduction.

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

↑