Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
119 tokens/sec
GPT-4o
56 tokens/sec
Gemini 2.5 Pro Pro
43 tokens/sec
o3 Pro
6 tokens/sec
GPT-4.1 Pro
47 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Interactive Code Generation via Test-Driven User-Intent Formalization (2208.05950v2)

Published 11 Aug 2022 in cs.SE, cs.LG, and cs.PL

Abstract: LLMs have shown great potential in automating significant aspects of coding by producing natural code from informal natural language (NL) intent. However, when interacting with LLMs, users have no guarantees that the code suggestions produced correctly satisfy the intent they provided. In fact, it is hard to define a notion of correctness since natural language can be ambiguous and lacks a formal semantics. In this paper, we propose the workflow of {\it interactive test-driven code generation}, which leverages lightweight user feedback to (a) formalize the user intent using generated tests that can be useful for debugging, and (b) produce an improved set of code suggestions by pruning and ranking candidate code suggestions. We describe a language-agnostic abstract algorithm and a concrete implementation TiCoder. We perform an automated evaluation of TiCoder on the \emph{MBPP} and \emph{HumanEval} code generation benchmarks. Our results are promising with using the OpenAI Codex LLM: our best algorithm improves the \passk{1} code generation accuracy (in absolute percentages) between $22.49\%$ to $37.71\%$ for MBPP and between $24.79\%$ to $53.98\%$ for HumanEval using between 1 to 5 simulated user queries.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (11)
  1. Shuvendu K. Lahiri (32 papers)
  2. Sarah Fakhoury (10 papers)
  3. Aaditya Naik (8 papers)
  4. Georgios Sakkas (4 papers)
  5. Saikat Chakraborty (62 papers)
  6. Madanlal Musuvathi (8 papers)
  7. Piali Choudhury (3 papers)
  8. Curtis von Veh (1 paper)
  9. Jeevana Priya Inala (18 papers)
  10. Chenglong Wang (80 papers)
  11. Jianfeng Gao (344 papers)
Citations (57)

Summary

We haven't generated a summary for this paper yet.

X Twitter Logo Streamline Icon: https://streamlinehq.com