2022

Interactive Code Generation via Test-Driven User-Intent Formalization

Lahiri, Shuvendu K., Fakhoury, Sarah, Naik, Aaditya et al.

Understand

Large language models (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.

Reading the bibliography…