Sketch Then Generate: Providing Incremental User Feedback and Guiding LLM Code Generation through Language-Oriented Code Sketches (2405.03998v2)
Abstract: Crafting effective prompts for code generation or editing with 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.
- Spellburst: A Node-based Interface for Exploratory Creative Coding with Natural Language Prompts. In Proceedings of the 36th Annual ACM Symposium on User Interface Software and Technology. 1–22.
- Grounded copilot: How programmers interact with code-generating models. Proceedings of the ACM on Programming Languages 7, OOPSLA1 (2023), 85–111.
- Low-code LLM: Visual Programming over LLMs. arXiv preprint arXiv:2304.08103 (2023).
- DataParticles: Block-based and Language-oriented Authoring of Animated Unit Visualizations. In CHI Conference on Human Factors in Computing Systems. ACM, 808:1–808:15. https://doi.org/10.1145/3544548.3581472
- Programming environments based on structured editors: The MENTOR experience. Ph. D. Dissertation. Inria.
- Explosion.Ai. 2024. SpaCy. https://spacy.io
- Marijn Haverbeke. 2024. CodeMirror. https://codemirror.net
- Aishwarya Kamath and Rajarshi Das. 2018. A survey on semantic parsing. arXiv preprint arXiv:1812.00978 (2018).
- Studying the effect of AI Code Generators on Supporting Novice Learners in Introductory Programming. In Proceedings of the 2023 CHI Conference on Human Factors in Computing Systems (¡conf-loc¿, ¡city¿Hamburg¡/city¿, ¡country¿Germany¡/country¿, ¡/conf-loc¿) (CHI ’23). Association for Computing Machinery, New York, NY, USA, Article 455, 23 pages. https://doi.org/10.1145/3544548.3580919
- A Large-Scale Survey on the Usability of AI Programming Assistants: Successes and Challenges. arXiv:2303.17125 [cs.SE]
- ”What It Wants Me To Say”: Bridging the Abstraction Gap Between End-User Programmers and Code-Generating Large Language Models. In Proceedings of the 2023 CHI Conference on Human Factors in Computing Systems. 1–31.
- “What It Wants Me To Say”: Bridging the Abstraction Gap Between End-User Programmers and Code-Generating Large Language Models. In Proceedings of the 2023 CHI Conference on Human Factors in Computing Systems (¡conf-loc¿, ¡city¿Hamburg¡/city¿, ¡country¿Germany¡/country¿, ¡/conf-loc¿) (CHI ’23). Association for Computing Machinery, New York, NY, USA, Article 598, 31 pages. https://doi.org/10.1145/3544548.3580817
- Meta. 2024. React. https://react.dev
- Microsoft. 2024. TypeScript. https://www.typescriptlang.org
- Reading between the lines: Modeling user behavior and costs in AI-assisted programming. arXiv preprint arXiv:2210.14306 (2022).
- How Beginning Programmers and Code LLMs (Mis) read Each Other. arXiv preprint arXiv:2401.15232 (2024).
- Pallets. 2024. Flask. https://flask.palletsprojects.com
- A universal part-of-speech tagset. arXiv preprint arXiv:1104.2086 (2011).
- “It’s Weird That it Knows What I Want”: Usability and Interactions with Copilot for Novice Programmers. ACM Trans. Comput.-Hum. Interact. 31, 1, Article 4 (nov 2023), 31 pages. https://doi.org/10.1145/3617367
- Universal dependency parsing from scratch. arXiv preprint arXiv:1901.10457 (2019).
- The programmer’s assistant: Conversational interaction with a large language model for software development. In Proceedings of the 28th International Conference on Intelligent User Interfaces. 491–514.
- What is it like to program with artificial intelligence? arXiv preprint arXiv:2208.06213 (2022).
- Armando Solar-Lezama. 2013. Program sketching. International Journal on Software Tools for Technology Transfer 15 (2013), 475–495.
- Anaphora and coreference resolution: A review. Information Fusion 59 (2020), 139–162.
- Interactive Text-to-SQL Generation via Editable Step-by-Step Explanations. arXiv preprint arXiv:2305.07372 (2023).
- Tree-Sitter. 2024. Tree Sitter. https://tree-sitter.github.io/tree-sitter
- Expectation vs. experience: Evaluating the usability of code generation tools powered by large language models. In Chi conference on human factors in computing systems extended abstracts. 1–7.
- Haijun Xia. 2020. Crosspower: Bridging Graphics and Linguistics. In ACM Symposium on User Interface Software and Technology. ACM, 722–734. https://doi.org/10.1145/3379337.3415845
- In-IDE Code Generation from Natural Language: Promise and Challenges. ACM Trans. Softw. Eng. Methodol. 31, 2, Article 29 (mar 2022), 47 pages. https://doi.org/10.1145/3487569
- CoLadder: Supporting Programmers with Hierarchical Code Generation in Multi-Level Abstraction. arXiv preprint arXiv:2310.08699 (2023).
- Large language models meet nl2code: A survey. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). 7443–7464.
- Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Code. arXiv:2311.07989 [cs.CL]
- Chen Zhu-Tian and Haijun Xia. 2022. CrossData: Leveraging Text-Data Connections for Authoring Data Documents. In CHI Conference on Human Factors in Computing Systems. ACM, 95:1–95:15. https://doi.org/10.1145/3491102.3517485
- Sporthesia: Augmenting Sports Videos Using Natural Language. IEEE Trans. Vis. Comput. Graph. 29, 1 (2023), 918–928. https://doi.org/10.1109/TVCG.2022.3209497
- Chen Zhu-Tian (17 papers)
- Zeyu Xiong (13 papers)
- Xiaoshuo Yao (2 papers)
- Elena Glassman (12 papers)