Data-driven prototyping via natural-language-based GUI retrieval

Kristian Kolthoff, Christian Bartelt, Simone Paolo PonzettoAutom. Softw. Eng 2023 · DOI

Introduction

In the early stages of software development, high-fidelity prototypes—those that closely mimic the look and feel of a finished application—are essential for eliciting clear, actionable feedback from stakeholders. However, creating these prototypes is traditionally a labor-intensive process, requiring designers to build every interface element from scratch or manually search for visual inspiration.

Existing tools generally offer manual editing (e.g., Figma) or visual search based on existing sketches. The "missing link" in this workflow is a system capable of translating vague natural language requirements directly into functional, high-fidelity screens. This paper introduces RaWi, a data-driven prototyping tool designed to bridge this gap by allowing analysts to generate mobile app prototypes through natural language search.

The incremental prototyping process using natural language requirements.

The RaWi Framework

RaWi leverages a massive repository of existing Android Graphical User Interfaces (GUIs) to enable a "remix" approach to design. The core philosophy is that it is significantly faster for a human to modify a 90%-complete screen than to build one from a blank canvas. By using state-of-the-art BERT-based ranking models, RaWi allows users to retrieve, adapt, and integrate real-world screens into their specifications in minutes.

Methodology: From Text to GUI

The system employs a multi-stage pipeline to transform a text query into an editable prototype:

  1. Metadata-Rich Text Extraction: RaWi utilizes the Rico dataset, which contains over 72,000 UI screens. Beyond visible text, the tool extracts "hidden" metadata such as activity names, resource IDs, and icon labels. These developer-written strings often provide more descriptive context than the sparse text visible on the UI.
  2. Semantic Retrieval: To overcome the "vocabulary mismatch" problem—where a user might search for "choose" while the code uses "select"—RaWi implements BERT-based Learning-To-Rank (LTR) models. These models understand the semantic relationship between queries and GUI metadata better than traditional keyword-matching algorithms like BM25.
  3. Automatic GUI Derivation: Unlike simple image search, RaWi uses underlying hierarchy data to "crop" individual components (buttons, labels, inputs) from original screenshots. Through OCR and histogram analysis, it extracts styles like font size and background color, rendering the retrieved screens partly editable in a web-based environment.
The role of the Requirements Analyst using RaWi to produce GUI specifications.

Evaluation and Results

To rigorously test RaWi, the authors established a new "Gold Standard" benchmark using Amazon Mechanical Turk, consisting of 100 unique queries and 2,000 human-annotated relevance scores.

Key Findings

  • Retrieval Excellence: The pairwise BERT-LTR model emerged as the superior ranking method, achieving a Mean Reciprocal Rank (MRR) of 0.631. This indicates that a highly relevant result typically appears within the top two search results.
  • Productivity Gains: In a controlled study with 19 participants, those using RaWi produced significantly more correct GUI components within the same timeframe compared to those using traditional prototyping tools like Mockplus.
  • User Satisfaction: RaWi received a System Usability Scale (SUS) score of 81.57, categorized as "excellent." Users particularly valued the ability to quickly visualize potential interface layouts during the requirements phase.

Discussion and Future Work

While RaWi demonstrates significant potential for accelerating the design phase, it faces challenges regarding visual cohesion; prototypes assembled from different apps may lack a unified aesthetic. Future iterations aim to expand the dataset to include iOS and web GUIs, improve the editor's styling capabilities, and introduce multilingual support to allow for global accessibility. By turning the vast landscape of existing mobile apps into a searchable library of components, RaWi fundamentally changes the speed at which software requirements can be visualized and validated.

Summary updated

BibTeX
@article{kolthoff2023data,
  author = {Kristian Kolthoff and Christian Bartelt and Simone Paolo Ponzetto},
  title = {{Data-driven prototyping via natural-language-based GUI retrieval}},
  journal = {Autom. Softw. Eng.},
  year = {2023},
  doi = {10.1007/s10515-023-00377-x},
}
Figure