Saved in:
Bibliographic Details
Main Authors: Zhu-Tian, Chen, Xiong, Zeyu, Yao, Xiaoshuo, Glassman, Elena
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2405.03998
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866914791390445568
author Zhu-Tian, Chen
Xiong, Zeyu
Yao, Xiaoshuo
Glassman, Elena
author_facet Zhu-Tian, Chen
Xiong, Zeyu
Yao, Xiaoshuo
Glassman, Elena
contents Crafting effective prompts for code generation or editing with Large Language Models (LLMs) is not an easy task. Particularly, the absence of immediate, stable feedback during prompt crafting hinders effective interaction, as users are left to mentally imagine possible outcomes until the code is generated. In response, we introduce Language-Oriented Code Sketching, an interactive approach that provides instant, incremental feedback in the form of code sketches (i.e., incomplete code outlines) during prompt crafting. This approach converts a prompt into a code sketch by leveraging the inherent linguistic structures within the prompt and applying classic natural language processing techniques. The sketch then serves as an intermediate placeholder that not only previews the intended code structure but also guides the LLM towards the desired code, thereby enhancing human-LLM interaction. We conclude by discussing the approach's applicability and future plans.
format Preprint
id arxiv_https___arxiv_org_abs_2405_03998
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Sketch Then Generate: Providing Incremental User Feedback and Guiding LLM Code Generation through Language-Oriented Code Sketches
Zhu-Tian, Chen
Xiong, Zeyu
Yao, Xiaoshuo
Glassman, Elena
Human-Computer Interaction
Computation and Language
Crafting effective prompts for code generation or editing with Large Language Models (LLMs) is not an easy task. Particularly, the absence of immediate, stable feedback during prompt crafting hinders effective interaction, as users are left to mentally imagine possible outcomes until the code is generated. In response, we introduce Language-Oriented Code Sketching, an interactive approach that provides instant, incremental feedback in the form of code sketches (i.e., incomplete code outlines) during prompt crafting. This approach converts a prompt into a code sketch by leveraging the inherent linguistic structures within the prompt and applying classic natural language processing techniques. The sketch then serves as an intermediate placeholder that not only previews the intended code structure but also guides the LLM towards the desired code, thereby enhancing human-LLM interaction. We conclude by discussing the approach's applicability and future plans.
title Sketch Then Generate: Providing Incremental User Feedback and Guiding LLM Code Generation through Language-Oriented Code Sketches
topic Human-Computer Interaction
Computation and Language
url https://arxiv.org/abs/2405.03998