What’s important here?: Opportunities and Challenges of LLM in retrieving information from Web Interface

Faria Huq, Jeffrey P. Bigham, Nikolas MartelaroR0-FoMo @ NeurIPS 2023

TL;DR

This paper investigates how well Large Language Models (LLMs) can identify and retrieve important information (UI elements) from web interfaces based on user queries. While LLMs show promise, the study reveals significant challenges and areas for improvement in their ability to accurately pinpoint crucial elements on complex web pages.

What Problem Does This Paper Address?

Modern web assistants aim to help users navigate and interact with websites more efficiently. A key capability for these assistants is understanding natural language commands and then locating the relevant information or UI elements on a webpage to fulfill those commands. While previous research has focused on building autonomous web navigation agents, these systems often struggle with real-world websites, achieving low task completion rates. This paper argues that a more fundamental operation is needed: the ability of LLMs to precisely identify and retrieve the most important UI elements on a given page, given a user's task description. This decomposition allows for a focused examination of LLMs' current capabilities and limitations in this specific, crucial sub-task, paving the way for more robust web assistants.

Methods

The researchers designed an in-depth study to evaluate LLMs' ability to retrieve important UI elements from web interfaces. Their approach involved:

  • Decomposition of the Problem: Instead of full web navigation, they focused on the atomic task of identifying key UI elements based on a user query and the webpage's HTML.
  • LLM Selection: They used Anthropic's Claude2 model, chosen for its large context window (100k tokens), which is beneficial for processing complex HTML.
  • Prompt Engineering Analysis: The core of their methodology was to systematically investigate the impact of four key components of the LLM's input prompt:
  • Few-Shot Example Selection: How choosing similar or fixed examples influences performance.
  • Specificity of Natural Language Command: How detailed or abstract user queries affect accuracy.
  • HTML Truncation Strategy: How reducing the amount of HTML provided impacts the LLM's ability to find relevant elements.
  • LLM Persona: The effect of assigning a specific role (e.g., "Web Assistant," "UI Designer") to the LLM.
  • Evaluation Metrics: They used "Recall" (proportion of correctly identified elements) and "Element Accuracy" (percentage of accurately predicted elements).

Datasets

The study primarily utilized the Mind2Web dataset. This dataset contains 2,000 open-ended, real-world tasks across 137 websites, making it suitable for evaluating generalizability. The dataset includes three test sets:

  • Cross-Task: Tasks unseen during training.
  • Cross-Website: Websites unseen during training.
  • Cross-Domain: Domains unseen during training.

For their experiments, they used a subset of 124 examples from Mind2Web due to API rate limits. They also mention using a pretrained HTML filtering module from the Mind2Web paper, which is based on the DeBERTa model.

Key Insights and Ideas

  • Prompt Engineering is Crucial: The performance of LLMs in this task is highly sensitive to how the prompt is constructed. Small changes in example selection, query specificity, or HTML content can lead to significant performance shifts.
  • Few-Shot Examples Matter, But Context Length is a Constraint: While semantically similar few-shot examples can boost performance, especially in the Cross-Task setting, simply adding more examples (like in 2-shot prompting) can sometimes hurt performance, likely due to exceeding optimal context lengths.
  • HTML Truncation is Beneficial: Raw HTML can be overwhelming. Truncating the HTML to focus on the most relevant parts (e.g., top 10 or 50 elements) significantly improves LLM performance and helps mitigate issues with longer input sequences.
  • Specificity Trade-off: More detailed user queries generally lead to better LLM performance, but this contrasts with how real users might interact with systems (often using more abstract queries). This highlights a gap between current dataset designs and real-world user behavior.
  • LLMs Can Hallucinate: A significant challenge identified is the LLM's tendency to "hallucinate" non-existent UI elements by incorrectly merging information from different parts of the HTML. They also observed failures in strictly following output format instructions.

Key Results

  • Reasonable Performance, Room for Improvement: LLMs demonstrated a "reasonable level of performance" but still have "substantial room for improvement."
  • Impact of Example Selection: KNN (k-nearest neighbor) examples helped significantly in the Cross-Task setting but less so in Cross-Website and Cross-Domain, suggesting a need for better generalization strategies.
  • Specificity Impact: For fixed examples, performance was consistent across different query specificity levels. However, with KNN examples, performance decayed from detailed to abstract queries.
  • Truncation Gains: Truncation strategies (Top-10 and Top-50) significantly improved performance compared to using the full HTML.
  • Persona Performance: The "Web Assistant" persona generally outperformed "Generic User" and "UI Designer" personas, suggesting that a more task-oriented role can guide the LLM better.
  • Error Patterns: The most frequent errors were failure to follow instructions (e.g., output format) and hallucination of DOM elements.

Limitations and Future Work

  • Model Specificity: The study was conducted solely on Anthropic's Claude2. Future work should extend this analysis to other large language models (GPT-4, Llama V2, etc.).
  • Context Length Challenges: Fitting substantial HTML context into LLMs with limited context windows remains a primary challenge. Future research should explore efficient encoding methods that preserve DOM integrity.
  • Real-World User Interaction: The study highlights the discrepancy between detailed dataset task descriptions and abstract real-world user queries. Future work could focus on improving LLMs' ability to interpret nuanced user intentions.
  • Personalization and Context: Incorporating user-specific information (personalization, location, time, etc.) could further enhance LLM performance.
  • Security Concerns: When using personal user information, security must be a paramount consideration.

Summary updated

BibTeX
@inproceedings{huq2023whats,
  author = {Faria Huq and Jeffrey P. Bigham and Nikolas Martelaro},
  title = {{What’s important here?: Opportunities and Challenges of LLM in retrieving information from Web Interface}},
  booktitle = {R0-FoMo @ NeurIPS},
  year = {2023},
  url = {https://openreview.net/forum?id=Jd8mD3SU8j},
}
Figure