超越像素:探索面向基于大语言模型的智能体的DOM下采样
Beyond Pixels: Exploring DOM Downsampling for LLM-Based Web Agents
AI总结:
本文提出D2Snap算法对DOM下采样,解决原始DOM令牌占用过大的问题,经评估其在GPT-4o智能体上的成功率达73%,接近基于GUI快照的基线性能。
摘要:
大语言模型(LLM)的出现推动了自主网页浏览智能体的发展:给定一项网页浏览任务和序列化的用户界面(UI)状态,LLM需要逐步提出输入动作以解决给定任务。核心挑战在于如何为LLM序列化UI状态。网页智能体越来越依赖基于图形的UI(GUI)快照——即带有视觉提示的截图,这类快照因输入令牌占用量适中而受到青睐。而文档对象模型(DOM)快照以HTML形式序列化,是一种颇具吸引力的替代方案,它可利用LLM已展现出的HTML解析能力。然而,其过大的令牌占用量至今阻碍了其在网页智能体中的可靠部署。本文提出D2Snap算法,该算法以保留可操作性及可操作性区分特征为前提,对DOM进行下采样。我们使用从Online-Mind2Web采样的数据集,在基于快照变体的网页智能体(GPT-4o)上评估经D2Snap下采样的DOM快照。结果显示,42%的原始DOM快照超出模型上下文窗口(128×10³令牌),而我们参考配置下所有经D2Snap下采样的DOM快照均符合要求,平均上下文利用率为16.5%。与基于GUI快照基线67%的成功率相比,我们的配置达到73%(提升5.8个百分点;95%置信区间为-13.6至+26.0个百分点;McNemar检验,p=0.47),排除了超过11个百分点的单侧95%置信区间的缺陷。此外,图像输入似乎对快照效用的提升作用很小;仅基于文本的 grounding 达到62%(下降5.8个百分点;McNemar检验,p=0.37)。
英文摘要:
The advent of large language models (LLMs) has sparked an evolution of autonomous web browsing agents: given a web browsing task and serialised user interface (UI) state, an LLM is expected to suggest input actions that incrementally solve the given task. The central challenge lies in serialising UI state for LLMs. Web agents have increasingly relied on grounded graphical UI (GUI) snapshots - screenshots augmented with visual cues - favoured for their modest input token footprint. Document object model (DOM) snapshots, serialised as HTML, represent a compelling alternative that leverages previously demonstrated HTML interpretation capabilities of LLMs. Their excessive token footprint, however, has precluded reliable deployment with web agents to date. We propose D2Snap, an algorithm to downsample the DOM, premised on preserving actionability and actionability-discriminating features. We evaluate D2Snap-downsampled DOM snapshots using a snapshot-variant web agent (GPT-4o) on a dataset sampled from Online-Mind2Web. Whilst 42% of raw DOM snapshots exceed the model context window (128 x 10^3 tokens), all D2Snap-downsampled DOM snapshots of our reference configuration fit, at a mean context utilisation of 16.5%. Against the 67% success rate of a grounded GUI snapshot baseline, our configuration attains 73% (+5.8%pt; 95% CI -13.6 to +26.0%pt; McNemar, p = 0.47), excluding a deficit (one-sided 95%) beyond 11%pt. Image input moreover appears to add little to snapshot utility; grounding text alone attains 62% (-5.8%pt; McNemar, p = 0.37).
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。