Abstract
Graphical User Interface (GUI) agents often struggle with "long-tail" tasks—rare or niche scenarios underrepresented in training data. While Retrieval-Augmented Generation (RAG) offers a potential solution, standard text-based RAG fails to handle the procedural complexity and noise inherent in web tutorials. This paper introduces RAG-GUI, a lightweight vision-language adapter that transforms retrieved tutorials into concise, task-aware "generative guidelines." By distilling long-form procedural text into actionable steps, RAG-GUI significantly improves the performance of GUI agents across mobile and web benchmarks without requiring expensive backbone retraining.
Introduction
As AI agents increasingly navigate complex applications and websites, they encounter a significant hurdle: the "long-tail" problem. Rare tasks or niche applications often lack the training density required for zero-shot success. Traditional RAG approaches, which typically dump raw text chunks into a model's prompt, are ill-suited for GUI navigation. Tutorials are often lengthy, noisy, and lack the state-awareness needed to guide an agent through its current screen state. RAG-GUI addresses these challenges by acting as a model-agnostic "plug-and-play" module that filters and summarizes knowledge into real-time guidance.
Methodology
RAG-GUI functions as an intermediary between a large-scale tutorial knowledge base and a GUI agent backbone (e.g., Qwen-2.5-VL). The workflow consists of three primary stages:
- Retrieval: The system identifies potentially relevant web tutorials based on the user's task.
- Generative Guidance: A lightweight Vision-Language Model (VLM) adapter analyzes the current screen, the task, and the retrieved content. It filters out irrelevant information and generates a "guideline"—a concise summary of the next necessary steps tailored to the agent's current progress.
- Execution: The backbone agent receives this distilled guideline and executes the corresponding action.
Self-guided Rejection Sampling Finetuning (RSF)
A critical component of RAG-GUI's success is its training recipe. Beyond initial Supervised Fine-Tuning (SFT), the authors utilize Self-guided Rejection Sampling Finetuning (RSF). In this phase, the model generates multiple candidate guidelines. These candidates are then tested to see which actually lead the agent to the correct ground-truth action. Only the successful guidelines are used for final fine-tuning, ensuring the adapter learns to provide useful, actionable advice rather than just accurate summaries.
Experimental Setup
The authors curated a massive library of 2.6 million GUI tutorials sourced from WikiHow and large-scale datasets like MINT and OmniCorpus. To evaluate the system, they utilized three major benchmarks:
- AndroidWorld: An online environment featuring 116 distinct mobile tasks.
- Android Control: An offline dataset for mobile device control.
- Multimodal-Mind2Web: A benchmark for cross-domain web navigation.
Key Results
RAG-GUI demonstrates substantial performance gains over both direct inference and "vanilla" RAG baselines. On the AndroidWorld (AW) benchmark, the system achieved absolute success rate gains of 13.3% for 7B backbones and 10.7% for 72B backbones.
As shown in the results table, RAG-GUI-72B achieves a success rate of 45.7% on AndroidWorld, rivaling or exceeding the performance of much larger proprietary models and specialized training-based agents like UI-TARS.
Key Insights and Ablation Studies
The Importance of Distillation
The study highlights that "vanilla RAG"—simply providing the raw tutorial text—offers minimal performance benefits. The agent requires a distilled, state-aware version of the instructions to avoid being overwhelmed by context window noise.
Optimal Retrieval Count ($k$)
Ablation studies were conducted to find the "Goldilocks zone" for retrieval. The authors found that retrieving exactly three tutorials ($k=3$) provided the best balance between information coverage and noise reduction.
Conclusion and Future Work
RAG-GUI proves that a small, specialized "guide" model can significantly enhance the capabilities of much larger GUI agents. By focusing on generative guidelines rather than raw retrieval, the system bridges the gap between static knowledge and dynamic execution. Future work will address the latency introduced by the retrieval-summarization pipeline and explore real-time learning from deployment failures.
Summary updated