Research map / Large language models / Agents, code and math
Learning to Contextualize Web Pages for Enhanced Decision Making by LLM Agents
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes LCoW, which trains a separate contextualization module (fine-tuned LM) to rewrite complex web page observations into a more comprehensible form for LLM web agents, using iterative reward-based sampling where agents' action-prediction accuracy scores candidates.
Problem
LLM web agents struggle to understand and process complex raw web page observations (HTML, accessibility trees), limiting decision-making on web automation tasks.
Approach
Decouple web page understanding from decision making by training a separate contextualization module that rewrites observations; candidate contextualizations are sampled and scored by whether multiple LLM agents predict the ground-truth action, and the best one is used for supervised fine-tuning in an iterative loop.
Key results
- On WebShop, Gemini-1.5-flash agent with LCoW (3 iterations) reaches 62.8% success, above the 59.6% expert human level and prior baselines.
- On WorkArena (165 tasks), LCoW raises Claude-3.5-Sonnet from 44.8% to 55.8% and Llama-3.1-8B from 1.2% to 37.0% success with one iteration.
- Average improvement across closed-source agents is reported as 15.6%, and 23.7% for open-source agents on WorkArena.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Add LCoW contextualization | LLM web agents · WebShop evaluation | success rate: 34.8% -> 50.6%; 43.6% -> 62.8%; 26.6% -> 59.8%; 34.2% -> 59.6% | Helped |
| Add LCoW contextualization | LLM web agents · WorkArena evaluation | success rate: 38.2% -> 44.2%; 11.5% -> 41.2%; 44.8% -> 55.8%; 26.1% -> 40.0%; 1.2% -> 37.0% | Helped |
| Use self-contextualization instead of raw observations | LLM web agents · WebShop evaluation | success rate: 34.8% -> 26.2%; 43.6% -> 46.4%; 26.6% -> 12.4%; 34.2% -> 40.2% | Mixed |
| Use self-contextualization instead of raw observations | LLM web agents · WorkArena evaluation | success rate: 38.2% -> 43.0%; 11.5% -> 12.7%; 44.8% -> 50.3%; 26.1% -> 29.1%; 1.2% -> 7.3% | Helped |
| Add LCoW contextualization | GPT-4o · WorkArena unseen-type tasks | success rate: 35.7% -> 42.9% | Helped |
| Add LCoW contextualization | Gemini-1.5-flash · WorkArena unseen-category tasks | success rate: 0.0% -> 0.0% | No clear effect |
| Add LCoW contextualization | GPT-4o · WebArena unseen website | success rate: 17.4% -> 21.7% | Helped |
| Add LCoW contextualization | GPT-4o · WebArena seen and unseen task types | success rate: 6% | Helped |
| Train LCoW contextualization for three iterations instead of using the initial raw observations | Gemini-1.5-flash · WebShop evaluation | success rate: 43.6% -> 62.8% | Helped |
Surprising findings
- Using GPT-4o as a self-contextualizer sometimes hurts performance (e.g., Claude-3.5-Sonnet self-ctx drops to 12.4% on WebShop), while LCoW-trained modules help.
- LCoW gives no improvement on unseen-category WorkArena tasks (Filter-List), where GPT-4o and Gemini-1.5-flash both remain at 0%.
Limitations
- Requires successful trajectories for training, limiting learning of tasks without collected successes.
- Adds latency to decision making due to contextualization generation.
- Does not generalize to unseen UI element types or unseen-category tasks in the reported experiments.
Experimental setup
Datasets: WebShop WorkArena WebArena WebArena-Lite
Benchmarks: WebShop WorkArena WebArena
Metrics: success rate average reward action-matching reward
Baselines: Raw observation Self-contextualization Behavior cloning GPT-4o contextualization
Builds on: MindAct HTML-T5 BrowserGym AgentOccam
Closest papers by meaning
- A Real-World WebAgent with Planning, Long Context Understanding, and Program Synthesis (ICLR 2024 · similarity 0.90)
- How to Train Your LLM Web Agent: A Statistical Diagnosis (NeurIPS 2025 · similarity 0.89)
- AutoGuide: Automated Generation and Selection of Context-Aware Guidelines for Large Language Model Agents (NeurIPS 2024 · similarity 0.88)
- AgentOccam: A Simple Yet Strong Baseline for LLM-Based Web Agents (ICLR 2025 · similarity 0.87)
- Language Agent Tree Search Unifies Reasoning, Acting, and Planning in Language Models (ICML 2024 · similarity 0.87)
- WebRL: Training LLM Web Agents via Self-Evolving Online Curriculum Reinforcement Learning (ICLR 2025 · similarity 0.87)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
