
A new research prototype from Apple demonstrates how Large Language Models (LLMs), guided by structured intermediate representations, can generate functional, multi-screen app prototypes, marking a significant leap forward in AI-assisted software development.
While AI chatbots can generate snippets of code, they often struggle with the complexity of a complete software application. User interfaces are intricate, involving multiple interconnected screens, a coherent data model, and seamless navigation flows—a challenge that typically overwhelms a single, direct prompt to an LLM.
In a new paper titled “Athena: Intermediate Representations for Iterative Scaffolded App Generation with an LLM,” researchers from Apple introduce a novel prototype system that solves this problem. Athena uses a set of shared Intermediate Representations (IRs)—a Storyboard, a Data Model, and GUI Skeletons—to scaffold a collaborative, iterative process between a developer and an LLM. This approach allows for the generation of complete, multi-screen iOS app prototypes that can be exported to Xcode and run on a real device.
How Athena Works: Bridging the Idea-to-Code Gap
Instead of asking an LLM to generate thousands of lines of code from a single description, Athena breaks the process down into manageable, human-understandable steps.
- The Storyboard: The system first generates a visual graph of the app’s screens and the navigation paths between them, much like a director planning a film. This allows developers to see the app’s structure and request high-level changes early on.
- The Data Model: Athena then creates the Swift data structures (structs) that define the information the app will use and manage (e.g., a
User
, a Product
, a Booking
).
- GUI Skeletons: For each screen in the storyboard, Athena generates SwiftUI pseudocode that outlines the layout and UI components (e.g.,
VStack
, Button
, List
) and how they connect to the Data Model.
A key innovation is the planning prompt that orchestrates this process. When a user requests a change via chat or by directly editing an IR, the planner decomposes the request into atomic operations and updates all affected IRs in a cascading order, maintaining consistency across the entire app design.
Study Findings: Developers Prefer Structure Over Raw Chat
The researchers conducted a user study with 12 iOS developers, comparing Athena to a standard ChatGPT (GPT-4o) baseline.
The results were compelling:
- 75% of participants preferred using Athena over the baseline for prototyping an app from an initial idea.
- 100% of participants preferred Athena for designing app navigation flows.
- Increased Complexity: Apps built with Athena were significantly more complex, containing twice as many views (6.0 vs. 3.1) and three times as much code (353.9 vs. 117.8 lines) on average than those built with the baseline in the same 25-minute timeframe.
- Improved Understanding: Participants reported that the IRs helped them understand the LLM’s intent and the structure of the final code before it was even generated, moving away from a “black box” experience.
The Trade-off: Complexity Introduces Bugs
The technical evaluation revealed a trade-off. The increased complexity of Athena-generated apps led to more bugs—an average of 7.3 compilation errors and 4.0 navigation errors per app. However, these were largely simple issues like placeholder comments where navigation code should be or incorrect property accesses, which experienced developers could fix quickly. The paper suggests that future “agentic” approaches, where the LLM checks and fixes its own code, could resolve these issues.
Why It Matters
This research, published on arXiv, is more than just a new tool; it’s a new paradigm for human-AI collaboration in software development. By using IRs, Athena:
- Lowers the Barrier to Entry: It helps developers, especially those less experienced, structure their ideas and understand how an app comes together.
- Enables True Iteration: Developers can make high-level structural changes early without losing their entire progress, a common frustration with chatbot-style code generation.
- Modernizes Model-Based Development: It revives the concept of model-based UI development but uses a conversational LLM instead of tedious manual model creation.
The Athena prototype demonstrates that the future of AI-assisted coding may not be a single, monolithic prompt, but a structured, iterative conversation guided by shared representations that both humans and machines can understand.
Link to the paper: Athena: Intermediate Representations for Iterative Scaffolded App Generation with an LLM on arXiv.