Enabling Conversational Interaction with Mobile UI using Large Language Models

Bryan Wang, Gang Li, Yang Li

TL;DR

Researchers from the University of Toronto and Google Research have demonstrated that a single Large Language Model (LLM) can handle diverse mobile UI tasks—like answering questions about a screen or mapping instructions to actions—using only a few examples (few-shot prompting). By representing complex Android UI structures as simplified HTML, they bypass the need for expensive, task-specific datasets and models, achieving performance that rivals or exceeds dedicated state-of-the-art systems.

What Problem Does This Paper Address?

Interacting with mobile apps via natural language is a "holy grail" for accessibility and hands-free use. However, current assistants like Siri or Google Assistant are mostly limited to system-level tasks (like setting timers). They struggle to understand the specific content on a user's screen.

Traditionally, solving this required building a bespoke machine learning model for every single sub-task: one for summarizing a screen, another for answering questions, and a third for clicking buttons based on voice commands. This approach is "heavy": it requires massive, hand-labeled datasets and significant engineering effort for every new feature. The authors ask: Can we use the general-purpose reasoning of LLMs to do all of this with a "lightweight" prompting approach instead?

Methods

The core challenge of using LLMs for mobile UIs is that LLMs process text, while UIs are structural and visual. The authors developed a pipeline to bridge this gap:

  1. UI-to-HTML Representation: They created an algorithm that traverses the Android "view hierarchy" (the code-based map of a screen) and converts it into simplified HTML syntax. For example, a TextView becomes a <p> tag, and a Button becomes a <button>.
  2. Numeric Indexing: To help the model reference specific elements without writing out long strings of code, they assigned each element a unique id attribute (e.g., <button id=7>).
  3. Prompting Techniques: They utilized Few-Shot Prompting, providing the model with just one or two examples of a task before asking it to perform on a new screen.
  4. Chain-of-Thought (CoT): For complex tasks like generating questions, they prompted the model to "think out loud"—first counting input fields and summarizing the screen's purpose before generating the final output.

Datasets

The study utilized several established mobile UI benchmarks to evaluate the LLM (specifically the PaLM model):

  • RICO: A massive dataset of Android UI hierarchies used here for Screen Question-Generation and Question-Answering.
  • Screen2Words: Used to evaluate Screen Summarization.
  • PixelHelp: A dataset of multi-step UI instructions (e.g., "How to change Wi-Fi settings") used for Mapping Instructions to Actions.

Key Insights and Ideas

  • HTML is the Universal Language: The authors chose HTML because LLMs are trained on vast amounts of web data. By "disguising" a mobile app as a webpage, the LLM can leverage its existing knowledge of how users interact with web interfaces.
  • Emergent Reasoning: The LLM showed a surprising ability to combine information. In one example, instead of asking for "minimum price" and "maximum price" separately, the model combined them into a single, more natural question: "What is the price range?"
  • Prior Knowledge Matters: In the summarization task, the LLM correctly identified a screen as belonging to the "London Tube" system simply by recognizing station names in the text, even though the words "London" or "Tube" never appeared in the underlying code.
  • Automatic Metrics vs. Human Reality: The LLM actually scored lower than benchmark models on automatic metrics like BLEU (which looks for exact word overlaps). However, in human evaluations, users preferred the LLM's summaries 64.1% of the time, finding them more descriptive and less "robotic."

Key Results

  • Screen Question-Answering: The LLM achieved a 66.7% exact match rate, nearly doubling the performance of a dedicated DistilBERT baseline (36%).
  • Screen Summarization: Despite having 10,000x fewer training examples than the competition, the LLM produced summaries that humans found more accurate and useful than the current state-of-the-art (Screen2Words).
  • Instruction Mapping: In the "in-app" condition, the 2-shot LLM correctly identified the target UI element 45% of the time and achieved a partial match (correctly identifying elements in a sequence) 80.36% of the time. While slightly behind dedicated models like Seq2Act (70.59% complete), it is remarkably competitive for a model that wasn't actually "trained" on the task.

Limitations and Future Work

The authors identify three main hurdles for the future:

  1. The "Vision" Gap: Currently, the model only "sees" the text and structure. If an app uses an icon (like a magnifying glass) without a text label, the LLM is blind to it. Integrating visual "pixels" is a necessary next step.
  2. Context Windows: Mobile UI hierarchies can be huge. Current LLMs have limits on how much text they can "read" at once, meaning some complex screens might be cut off.
  3. Hallucinations: Like all LLMs, the model can occasionally invent information or UI elements that don't exist, which could be problematic in a live user interface.

The paper concludes that while we aren't replacing dedicated models entirely yet, LLMs offer a powerful way to rapidly prototype and deploy conversational features for mobile apps with minimal data overhead.

Summary updated

BibTeX
@inproceedings{wang2023enabling,
  author = {Bryan Wang and Gang Li and Yang Li},
  title = {{Enabling Conversational Interaction with Mobile UI using Large Language Models}},
  booktitle = {CHI},
  year = {2023},
  doi = {10.1145/3544548.3580895},
}
Figure