AgentOccam: A Simple Yet Strong Baseline for LLM-Based Web Agents

Ke Yang,Yao Liu,Sapana Chaudhary,Rasool Fakoor,Pratik Chaudhari,George Karypis,Huzefa Rangwala
2024-10-18
Abstract:Autonomy via agents using large language models (LLMs) for personalized, standardized tasks boosts human efficiency. Automating web tasks (like booking hotels within a budget) is increasingly sought after. Fulfilling practical needs, the web agent also serves as an important proof-of-concept example for various agent grounding scenarios, with its success promising advancements in many future applications. Prior research often handcrafts web agent strategies (e.g., prompting templates, multi-agent systems, search methods, etc.) and the corresponding in-context examples, which may not generalize well across all real-world scenarios. On the other hand, there has been limited study on the misalignment between a web agent's observation/action representation and the pre-training data of the LLM it's based on. This discrepancy is especially notable when LLMs are primarily trained for language completion rather than tasks involving embodied navigation actions and symbolic web elements. Our study enhances an LLM-based web agent by simply refining its observation and action space to better align with the LLM's capabilities. This approach enables our base agent to significantly outperform previous methods on a wide variety of web tasks. Specifically, on WebArena, a benchmark featuring general-purpose web interaction tasks, our agent AgentOccam surpasses the previous state-of-the-art and concurrent work by 9.8 (+29.4%) and 5.9 (+15.8%) absolute points respectively, and boosts the success rate by 26.6 points (+161%) over similar plain web agents with its observation and action space alignment. We achieve this without using in-context examples, new agent roles, online feedback or search strategies. AgentOccam's simple design highlights LLMs' impressive zero-shot performance on web tasks, and underlines the critical role of carefully tuning observation and action spaces for LLM-based agents.
Artificial Intelligence,Computation and Language
What problem does this paper attempt to address?
The problem that this paper attempts to solve is: when Web agents based on large language models (LLMs) perform Web tasks, the performance is poor due to the inconsistency between their observation and action representations and the LLM training data. Specifically: 1. **Alignment problems in the observation space and action space**: - Current LLMs are mainly pre - trained on natural language processing tasks, while Web agents need to understand web page content and perform specific interaction operations (such as clicking, scrolling, etc.). This difference makes LLMs perform less well than expected when handling Web tasks. - Many existing studies improve the performance of Web agents by manually designing complex prompt templates or strategies, but these methods are difficult to generalize to various practical application scenarios. 2. **How to improve the generalization ability of Web agents**: - Existing methods usually rely on specific task strategies or online search, etc., which increase the computational cost and limit the application range. - The author proposes a simple method. By optimizing the observation space and action space, LLMs can better adapt to the requirements of Web tasks, thus significantly improving performance. ### Specific problem description - **Optimization of the observation space**: The content of Web pages is usually represented in the form of HTML or accessibility trees, which contains a large amount of formatting markup, making it difficult for LLMs to process efficiently. Therefore, it is necessary to simplify and refine this content to make it easier for LLMs to understand and process. - **Optimization of the action space**: The existing action space contains many unnecessary or difficult - to - understand actions (such as `hover`, `press`, etc.), which may mislead LLMs. In addition, some actions (such as `scroll`) may cause the agent to repeat operations aimlessly. Therefore, it is necessary to reduce unnecessary actions and introduce some new actions (such as `branch` and `prune`) that are helpful for planning and managing the task flow. ### Solution The solution proposed by the author is to optimize the observation space and action space in the following ways: 1. **Simplify the action space**: - Remove unnecessary actions (such as `noop`, `tab_focus`, `new_tab`, etc.), reducing the dependence on high - level entity knowledge. - Introduce new planning actions (such as `branch` and `prune`), helping LLMs generate and manage task plans. 2. **Optimize the observation space**: - Remove redundant text and convert HTML or accessibility trees into a more concise Markdown format. - Selectively replay key web elements and historical records to ensure that the agent only focuses on parts relevant to the current task. Through these optimizations, the author has developed a Web agent named AGENT OCCAM, which significantly outperforms the previous state - of - the - art methods in the WebArena benchmark test, with a 26.6 - percentage - point increase in success rate (+161%), and does not require the use of context examples, additional online search, or complex prompt templates. ### Conclusion The main contributions of this paper are: 1. Propose a simple but powerful baseline method. By optimizing the observation space and action space, the performance of Web agents based on LLMs in various Web tasks is significantly improved. 2. Verify the zero - sample performance potential of LLMs in Web tasks and emphasize the importance of adjusting the observation and action space. 3. Provide an orthogonal method that can be combined with other agent strategies, providing a basis for further research.