ObSynth: An Interactive Synthesis System for Generating Object Models from Natural Language Specifications

Alex Gu, Tamara Mitrovska, Daniela Velez, Jacob Andreas, Armando Solar-LezamaarXiv 2022 · DOI

Abstract

Software development begins with architectural design, a process of transforming vague requirements into concrete technical blueprints. This paper introduces ObSynth, an interactive system that utilizes Large Language Models (LLMs) to automate the generation of object models—comprising classes, fields, and methods—from natural language specifications. Through a concept termed "specification reification," ObSynth assists developers by providing domain-specific suggestions that often exceed the detail of manual designs. A user study with 11 participants reveals that ObSynth shifts the development workflow from "creation-centric" to "edit-centric," leading to more comprehensive models with high user retention of AI-generated components.

Introduction

While AI-assisted coding tools like GitHub Copilot have become proficient at solving localized implementation problems, they often struggle with the initial architectural phase of software development. Before a single line of logic is written, developers must define the system's core objects, their data fields, and their functional methods. This transition from high-level, often ambiguous natural language (e.g., "I want a restaurant management app") to a structured technical blueprint is known as specification reification. This task is challenging for AI because it requires "common sense" domain knowledge that is frequently omitted from initial prompts. ObSynth addresses this gap by providing an interactive environment where LLMs suggest architectural components that users can then refine and verify.

Methodology

ObSynth combines a specialized frontend user interface with a GPT-3 backend (text-davinci-001) to facilitate an iterative design process. The workflow begins with a user-provided prompt, from which the system synthesizes a list of potential objects.

The iterative workflow of ObSynth, showing the transition from natural language text to a final object model through user-AI collaboration.

The system employs few-shot prompting across eight specific subtasks, such as predicting field types and determining collection cardinality. A key feature of ObSynth is its interactivity; users are kept "in the loop," utilizing "Auto Add" buttons to trigger suggestions for missing elements at any stage. This ensures that the final model remains aligned with the developer's specific vision while benefiting from the LLM's vast pre-trained knowledge base.

Results and Discussion

The effectiveness of ObSynth was evaluated through a user study involving 11 participants from both academia and industry. Participants were tasked with designing an object model for a restaurant management system.

The final object model generated for a restaurant management app, illustrating the high level of detail in fields and methods.

The study yielded several key insights:

  • Shift to Verification: ObSynth fundamentally altered the design process. Instead of starting from a blank canvas, users spent their time auditing and correcting AI suggestions. This "edit-centric" workflow was found to be mentally lighter than traditional creation.
  • The "Hidden Detail" Benefit: AI-assisted models were significantly more detailed than those produced by the control group. The LLM suggested essential but often overlooked fields, such as "ingredients" for menu items or "phone numbers" for customers.
  • High Retention and Criticality: Users retained a high percentage of AI suggestions—92% of objects, 79% of fields, and 65% of methods. Despite this high retention, users remained critical, frequently deleting or renaming components that did not fit their specific requirements, indicating low levels of AI complacency.

Limitations and Future Work

Despite its success, ObSynth has limitations. The system currently performs "shallow modeling," generating names and types but not method arguments or internal logic. Additionally, the AI-generated names can sometimes be ambiguous, suggesting a need for synthesized descriptions or docstrings. Future iterations could also benefit from real-time learning, where the system adapts its suggestions based on user deletions and edits.

Conclusion

ObSynth demonstrates the potential of LLMs to assist in the high-level architectural phase of software engineering. By reifying vague specifications into detailed object models, it empowers developers to create more complete and robust systems through an interactive, verification-focused workflow.

Summary updated

BibTeX
@misc{gu2022obsynth,
  author = {Alex Gu and Tamara Mitrovska and Daniela Velez and Jacob Andreas and Armando Solar-Lezama},
  title = {{ObSynth: An Interactive Synthesis System for Generating Object Models from Natural Language Specifications}},
  year = {2022},
  eprint = {2210.11468},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2210.11468},
}
Figure