arXiv:2605.26807cs.SEcs.AI2026-05被引 2

让LLM生成的HTML能真正用起来,通过真实交互测试修复缺陷

HTMLCure: Turning Browser Experience into State Guided Repair for Interactive HTML

论文配图:HTMLCure: Turning Browser Experience into State Guided Repair for Interactive HTML
图 1 · 摘自论文原文
  • 用浏览器真实交互评估页面状态,生成可复现的故障证据
  • 从97K提示中修复出4万高质量网页,提升测试通过率至45.2%
  • 适合需要稳定交互体验的网页生成与自动化测试场景

当前大模型可生成完整HTML页面,但多数仅表面正确:渲染一次后,在滚动、悬停、点击、调整窗口或游戏操作下即失效。仅靠截图评估会遗漏这些失败,而过滤又丢弃了大量仍可修复的页面。本文提出HTMLCure,一个基于浏览器真实体验的评估框架。该框架在不同视口和交互状态下执行页面,记录确定性的浏览器证据,并向视觉语言模型提供执行轨迹中的关键帧,而非孤立截图。相同的状态信号驱动闭环修复引擎:系统诊断当前页面,选择特定状态的修复策略,重新运行候选方案,并导出可用于监督微调(SFT)的高质量页面。在97,000个提示语料上,此方法将原始种子扩展为63,703个质量合格的候选页面,最终构建出40,000个优化后的SFT数据集。使用相同骨干网络与训练流程,HTMLCure-27B-Refined在HTMLBench-400上达到50.6分,确定性测试通过率达45.2%,性能与Kimi-K2.6、GPT-5.4等强参考模型相当。在公开的MiniAppBench验证集上,平均得分达81.2,相比原始27B SFT提升15.3分,接近顶尖系统水平。

原文摘要 · Abstract (English)

LLMs can now produce full HTML pages, but many of those pages are only superficially correct: they render once, then fail under scroll, hover, click, resize, or gameplay. Evaluation from screenshots can miss these failures, and filtering discards many pages that are still repairable. We introduce HTMLCure, a browser experience framework that evaluates HTML after the system has interacted with it. The evaluator executes the page across viewports and interaction states, records deterministic browser evidence, and gives the VLM curated keyframes from the executed trajectory rather than isolated screenshots. The same state signal drives a closed loop repair engine: HTMLCure diagnoses the current page, chooses a state specific repair family, runs each candidate again, and exports quality cleared pages for SFT. On a 97K prompt corpus, this expands the directly usable seed into a candidate pool of 63703 quality cleared pages, from which we construct the final refined SFT set of 40K pages. Under the same backbone and training recipe, HTMLCure-27B-Refined reaches 50.6 on HTMLBench-400 with 45.2% deterministic test case pass, placing it in the same performance band as strong reference rows such as Kimi-K2.6 and GPT-5.4. On the released MiniAppBench validation split, it reaches 81.2 average, improving raw 27B SFT by 15.3 points and approaching the level of strong reference systems.

网页生成交互修复LLM评估SFT优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。