Home // International Journal On Advances in Software, volume 17, numbers 3 and 4, 2024 // View article
From Ambiguity to Clarity: Free Form Input to Code via Sentence Transformation
Authors:
Nikita Kiran Yeole
Michael S. Hsiao
Keywords: Natural language programming; decomposition; chain-of-thought reasoning.
Abstract:
In the realm of natural language programming, translating free-form sentences in natural language into a functional, machine-executable program remains difficult due to the following 4 challenges. First, the inherent ambiguity of natural languages. Second, the high-level verbose nature in user descriptions. Third, the complexity in the sentences and fourth, the invalid or semantically unclear sentences. Our proposed solution is a large language model (LLM)-based artificial intelligence driven assistant to process free-form sentences and decompose them into sequences of simplified, unambiguous sentences that abide by a set of rules, thereby stripping away the complexities embedded within the original sentences. The resulting sentences are then used to generate the code. For the sentences which still contain ambiguity and complexity, they are passed through another 2 step process. This includes transforming the freeform sentences written by users into JavaScript code and then reframing the original sentence using the generated JavaScript code. Although the JavaScript code generated by LLM might not be correct, this step is simply to use the code to help break down sentences into more precise sequence of actions. This effectively addresses various linguistic challenges that arise in natural language programming. We applied the proposed approach to a set of free-form sentences written by middleschool students for describing the logic behind video games. More than 76% of the free-form sentences containing these problems were successfully converted to sequences of simple unambiguous object-oriented sentences by our approach.
Pages: 258 to 269
Copyright: Copyright (c) to authors, 2024. Used with permission.
Publication date: December 30, 2024
Published in: journal
ISSN: 1942-2628