Exploring Direct Instruction and Summary-Mediated Prompting in LLM-Assisted Code Modification
Ningzhi Tang, Emory Smith, Yu Huang, Collin McMillan, Toby Jia-Jun Li

TL;DR
This study compares two prompting strategies—direct instruction and summary-mediated—for using large language models to assist in code modification, revealing their respective advantages and influencing factors in developer workflows.
Contribution
It introduces and empirically evaluates two novel prompting strategies for LLM-assisted code modification, highlighting their trade-offs and developer preferences.
Findings
Direct instruction prompting is more flexible and easier to specify.
Summary-mediated prompting enhances comprehension and control.
Developer choice depends on task goals and context.
Abstract
This paper presents a study of using large language models (LLMs) in modifying existing code. While LLMs for generating code have been widely studied, their role in code modification remains less understood. Although "prompting" serves as the primary interface for developers to communicate intents to LLMs, constructing effective prompts for code modification introduces challenges different from generation. Prior work suggests that natural language summaries may help scaffold this process, yet such approaches have been validated primarily in narrow domains like SQL rewriting. This study investigates two prompting strategies for LLM-assisted code modification: Direct Instruction Prompting, where developers describe changes explicitly in free-form language, and Summary-Mediated Prompting, where changes are made by editing the generated summaries of the code. We conducted an exploratory…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Model-Driven Software Engineering Techniques · Scientific Computing and Data Management
