Learning to Program with Natural Language

04/20/2023
by   Yiduo Guo, et al.
0

Large Language Models (LLMs) have shown remarkable performance in various basic natural language tasks, which raises hopes for achieving Artificial General Intelligence. To better complete complex tasks, we need LLMs to program for the task and then follow the program to generate a specific solution for the test sample. We propose using natural language as a new programming language to describe task procedures, making them easily understandable to both humans and LLMs. LLMs are capable of directly generating natural language programs, but these programs may still contain factual errors or incomplete steps. Therefore, we further propose the Learning to Program (LP) method to ask LLMs themselves to learn natural language programs from the training dataset of complex tasks and then use the learned program to guide inference. Our experiments on the AMPS (high school math) and Math (competition mathematics problems) datasets demonstrate the effectiveness of our approach. When testing ChatGPT on 10 tasks from the AMPS dataset, our LP method's average performance outperformed the direct zero-shot test performance by 18.3%. We release our code at <https://github.com/microsoft/NaturalLanguageProgram>.

READ FULL TEXT

page 3

page 5

page 6

research
05/23/2023

Understanding Programs by Exploiting (Fuzzing) Test Cases

Semantic understanding of programs has attracted great attention in the ...
research
04/07/2023

ChatPipe: Orchestrating Data Preparation Program by Optimizing Human-ChatGPT Interactions

Orchestrating a high-quality data preparation program is essential for s...
research
09/16/2021

Hierarchical Control of Situated Agents through Natural Language

When humans conceive how to perform a particular task, they do so hierar...
research
08/11/2023

Enhancing Network Management Using Code Generated by Large Language Models

Analyzing network topologies and communication graphs plays a crucial ro...
research
09/11/2023

Hypothesis Search: Inductive Reasoning with Language Models

Inductive reasoning is a core problem-solving capacity: humans can ident...
research
05/03/2023

CodeGen2: Lessons for Training LLMs on Programming and Natural Languages

Large language models (LLMs) have demonstrated remarkable abilities in r...
research
05/02/2023

From Words to Code: Harnessing Data for Program Synthesis from Natural Language

Creating programs to correctly manipulate data is a difficult task, as t...

Please sign up or login with your details

Forgot password? Click here to reset