NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

PwR: Exploring the Role of Representations in Conversational Programming

Pradyumna Ym, Vinod Ganesan, Dinesh Kumar Arumugam, Meghna Gupta, Nischith Shadagopan, Tanay Dixit, Sameer Segal, Pratyush Kumar, Mohit Jain, Sriram RajamaniarXiv 2023

TL;DR

Programming with Representations (PwR) is a new framework designed to bridge the "mental model gap" in conversational programming. By exposing the AI’s internal understanding as a structured, editable natural language model (Logic, Variables, and Knowledge Base), PwR transforms the LLM from a "black box" into a transparent partner, significantly increasing user agency and debugging efficiency.

What Problem Does This Paper Address?

While Large Language Models (LLMs) like GPT-4 have made "conversational programming" (building software through chat) a reality, they suffer from a transparency problem. When a user gives a sequence of instructions, they often have no way of knowing if the AI truly "got it" until they run the code. This mismatch between the user’s intent and the AI’s actual state leads to uncertainty, lack of trust, and a tedious trial-and-error cycle.

For novice programmers, this is especially daunting because they lack the vocabulary to debug generated code. For experts, the stochastic nature of LLMs makes it difficult to ensure precise logic through chat alone.

![Fig.

  1. An example of PwR representation. A natural language utterance or direct edit can result in changes to the representations.](/figures/art_b2c930634a974e6f98433757048c8115)

Methods

The authors developed the PwR tool, a web-based environment for building chatbots. The tool features a three-pane interface:

  1. Dev-bot (Left): A chat interface where users provide high-level instructions.
  2. Representations (Center): A structured view of the bot's "brain," divided into a Knowledge Base (data), Logic (natural language rules), and Variables (state).
  3. Test-bot (Right): A functional sandbox to interact with the current version of the application.

The core innovation is that the "Representations" are not just for show—they are bi-directionally editable. A user can update the bot by chatting with the dev-bot (which then updates the representation) or by directly editing the text in the representation pane. The system uses GPT-4 to maintain consistency across these components and ensure that new instructions don't contradict existing logic.

![Fig.

  1. A screenshot of the PwR tool, chatbot builder page.](/figures/art_52a370b72e234453879aad7b084b3e46)

Datasets

The paper focuses on a qualitative and quantitative user study rather than a model training benchmark. The "dataset" consists of interaction logs and focus group data from 14 participants (ranging from novices to expert developers) who used the PwR tool to create 33 unique chatbots, including quiz games and informational assistants (e.g., a "Community Health Worker trainer" or a "Science Fiction knowledge bot").

Key Insights and Ideas

  • The "Glancing" Interaction: The study identified a new user behavior termed "glancing." Instead of reading every line of generated code, users (especially intermediates) would quickly peek at the representation pane to confirm that "something changed" in response to their prompt, providing immediate psychological closure.
  • Agency through Transparency: Participants reported that seeing the logic written out in structured natural language made the AI feel like less of a "black box." This transparency instilled a sense of control, allowing them to identify "hallucinations" or logic errors immediately.
  • Expert vs. Novice Divergence:
    • Experts used representations for high-precision debugging and often bypassed the chat entirely to edit the logic directly, finding it faster and more reliable.
  • Novices were sometimes intimidated by technical jargon like "variables" but still benefited from the chat-based updates to the representation, which served as a "receipt" of the AI's understanding.
  • Democratization of Logic: The tool allowed non-programmers to build complex state-based systems (like a quiz bot that tracks scores and difficulty levels) without writing a single line of traditional code.

Key Results

  • High Understandability: 12 out of 14 participants agreed that representations significantly improved their understanding of the development process.
  • Efficiency Gains: Expert participants noted that building a bot that would normally take 2-3 hours of coding took only 10-15 minutes using PwR.
  • Direct Edits: While chat was the primary interface, users performed 42 direct representation edits, proving that users value the ability to "reach inside" the AI's model to fix specific errors.
  • Workflow Flexibility: The authors identified four distinct workflows, showing that PwR supports both "chat-first" and "logic-first" development styles.

Limitations and Future Work

  • Technical Jargon: Novices found terms like "Knowledge Base" and "Variables" confusing. Future iterations might use more accessible terms like "Information Library" or "Data Holders."
  • Scaling Complexity: Participants worried that as the number of rules grows, a flat list of natural language logic might become as difficult to manage as spaghetti code. The authors suggest exploring hierarchical flow-diagram representations.
  • Missing IDE Features: Expert users expressed a need for traditional software engineering tools within the conversational interface, specifically unit testing to verify that the LLM's stochastic output remains consistent over time.
  • Broadening Scope: The current study focused on chatbots. The authors plan to extend PwR to web application development (HTML/CSS/JS) and Python-based data analysis.

Summary updated

BibTeX
@misc{ym2023pwr,
  author = {Pradyumna YM and Vinod Ganesan and Dinesh Kumar Arumugam and Meghna Gupta and Nischith Shadagopan and Tanay Dixit and Sameer Segal and Pratyush Kumar and Mohit Jain and Sriram Rajamani},
  title = {{PwR: Exploring the Role of Representations in Conversational Programming}},
  year = {2023},
  eprint = {2309.09495},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.09495},
}
Figure