LASER: LLM Agent with State-Space Exploration for Web Navigation

Kaixin Ma, Hongming Zhang, Hongwei Wang, Xiaoman Pan, Dong Yu · DOI

Abstract

Large Language Models (LLMs) often struggle with the dynamic and non-linear nature of web navigation. This paper introduces LASER (LLM Agent with State-Space ExploRation), a framework that models web navigation as a structured exploration of states rather than a simple sequence of actions. By defining specific navigation states and constrained action spaces, LASER enables robust backtracking and error recovery. Experimental results on WebShop and real-world Amazon tasks demonstrate that LASER significantly outperforms existing methods, nearly matching human performance in complex shopping scenarios.

Introduction

Current LLM agents for web navigation typically follow a "forward-only" execution model, relying on a few "oracle" trajectories. This approach fails when agents encounter errors, as they lack the "mental map" required for recovery. Furthermore, operating with a global action space often leads to invalid actions. LASER addresses these issues by treating web navigation as a state-space exploration problem, allowing agents to navigate the web with the same flexibility as human users.

Methods

LASER categorizes web pages into four high-level states: Search, Results, Item, and Finish. Each state is governed by specific system instructions and a constrained action space, ensuring that the agent only attempts valid operations for its current context.

The LASER framework models web navigation as a state-machine with transitions between Search, Results, Item, and Finish states.

Key methodological features include:

  • State-Specific Instructions: Detailed descriptions of page layouts and goals per state, reducing the need for few-shot examples.
  • Constrained Action Spaces: Limiting actions to those relevant to the current state (e.g., "Buy Now" is only available in the Item state).
  • Backtracking & Memory: Allowing the agent to return to previous states (e.g., "Back to search") and maintaining a memory buffer of viewed items to use if maximum iterations are reached.
  • Function Calling: Utilizing native LLM function-calling capabilities to ensure correctly formatted, valid actions.

Results

LASER was evaluated on the WebShop benchmark and a "sim-to-real" task on Amazon.com. The results indicate that structured exploration is superior to linear execution.

Performance metrics showing rewards and success rates across different iteration counts, alongside task distribution.

Key findings include:

  • State-of-the-Art Performance: LASER achieved a 50.0% success rate on WebShop, significantly outperforming ReAct (34.0%) and the supervised WebGUM (45.0%).
  • Human-Level Accuracy: On live Amazon.com tasks, LASER reached a 62.0% success rate, approaching the human expert benchmark of 65.0%.
  • Zero-Shot Efficiency: The framework performs best with zero-shot prompting, as state-specific instructions provide sufficient clarity without the need for potentially distracting examples.

Conclusion

LASER demonstrates that imposing a state-machine structure on LLM reasoning significantly improves web navigation reliability and efficiency. While the current implementation requires manual state definition for specific domains, future work aims to automate this process through hierarchical multi-agent systems and expanded toolsets, such as external knowledge retrievers.

Summary updated

BibTeX
@misc{ma2023laser,
  author = {Kaixin Ma and Hongming Zhang and Hongwei Wang and Xiaoman Pan and Dong Yu},
  title = {{LASER: LLM Agent with State-Space Exploration for Web Navigation}},
  year = {2023},
  eprint = {2309.08172},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.08172},
}
Figure