Skip to main content
QUICK REVIEW

[Paper Review] A Case Study in Engineering a Conversational Programming Assistant's Persona

Steven Ross, Michael Müller|arXiv (Cornell University)|Jan 13, 2023
AI in Service InteractionsComputer Science3 citations
TL;DR

This paper presents a case study on engineering the persona of a conversational programming assistant using prompt engineering with a code-fluent large language model (Codex). By iteratively refining a structured prompt that defines role, tone, and interaction conventions, the authors enabled the model to sustain coherent, helpful, and personality-consistent dialogues over extended coding sessions, demonstrating that persona shaping via prompt design significantly enhances usability and perceived helpfulness in AI-assisted software development.

ABSTRACT

The Programmer's Assistant is an experimental prototype software development environment that integrates a chatbot with a code editor. Conversational capability was achieved by using an existing code-fluent Large Language Model and providing it with a prompt that establishes a conversational interaction pattern, a set of conventions, and a style of interaction appropriate for the application. A discussion of the evolution of the prompt provides a case study in how to coax an existing foundation model to behave in a desirable manner for a particular application.

Motivation & Objective

  • To investigate whether prompt engineering can shape a code-fluent large language model into a conversational programming assistant with a consistent, helpful, and human-centered persona.
  • To evaluate how iterative prompt refinement influences the assistant's tone, behavior, and conversational quality in real-time software development interactions.
  • To explore the feasibility of achieving sustained, context-aware dialogue without fine-tuning, using only prompt-based persona configuration.
  • To assess user perception and interaction quality of a conversational assistant that simulates collaborative dialogue through dynamic prompt extension.

Proposed method

  • The authors constructed a dynamic, growing prompt that included a role definition, conversational conventions, and a persona framework (e.g., humble, forthcoming) to guide the model’s responses.
  • The prompt was structured in three parts: context (role and setting), data (user input and prior dialogue turns), and instruction (response format and behavior expectations).
  • Each user turn was appended to the prompt, and the model generated a response based on the full context, simulating a session-long conversation with short-term memory.
  • The prompt was iteratively refined through experimentation, adjusting persona descriptors and example dialogues to improve perceived helpfulness, clarity, and engagement.
  • The system used the Codex model (a 12B-parameter, code-fine-tuned GPT-3 variant) without fine-tuning, relying solely on prompt engineering to shape behavior.
  • The approach enabled the assistant to handle artifact-centric conversations (e.g., code reviews, refactoring suggestions) and maintain consistent personality across sessions.

Experimental results

Research questions

  • RQ1How can prompt engineering be used to shape the conversational persona of a code-fluent large language model to enhance perceived helpfulness and humility?
  • RQ2To what extent can a static prompt with incremental dialogue extension simulate coherent, context-aware conversation in a programming assistant?
  • RQ3What specific prompt components (e.g., persona description, example dialogues) most significantly influence the assistant’s tone and response quality?
  • RQ4Can a conversational programming assistant maintain a consistent, helpful, and collaborative persona across extended interactions without model fine-tuning?

Key findings

  • Iterative prompt refinement enabled the model to consistently adopt and sustain a helpful, humble, and forthcoming persona, significantly improving perceived user engagement and satisfaction.
  • The assistant demonstrated the ability to carry on extended, context-aware dialogues on software design, debugging, and code explanation, with responses that remained relevant and coherent over multiple turns.
  • Small changes to the prompt’s persona description and example dialogues produced measurable and meaningful shifts in the assistant’s tone and behavior, such as increased humility or confidence.
  • The system achieved artifact-centric conversation, allowing the assistant to reason about code structure, suggest improvements, and compare alternative implementations without requiring fine-tuning.
  • The approach enabled the assistant to generate both code and non-code content (e.g., poetry, jokes, abstracts), demonstrating the model’s versatility under prompt guidance.
  • Despite limitations in context length, dynamic prompt management allowed for sustained conversation by selectively retaining and pruning earlier dialogue turns.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.