Learning to Program with Natural Language

AI-generated keywords: Large Language Models

AI-generated Key Points

  • Large Language Models (LLMs) are good at natural language tasks but struggle with complex tasks that require combining basic capabilities.
  • Natural language can be used as a new programming language to teach LLMs how to complete complex tasks.
  • The inference process is divided into two steps: finding a natural language program for the test sample and then using it to generate a specific solution.
  • Two methods for finding natural language programs are introduced: Self-Program (SP) and Learning to Program (LP).
  • LP method learns the natural language program in text form based on the training dataset, which can guide LLMs in solving complex tasks more effectively than SP methods alone.
  • The authors demonstrate the effectiveness of their approach through experiments on high school math and competition mathematics problems datasets.
  • Natural Language Programs offer generalizability and human understandability advantages as they can guide LLMs to solve all questions similar to the test sample while being readable and editable by humans.
  • Leveraging natural language as a new programming language can enhance LLMs' capabilities in completing complex tasks systematically.
  • The authors release their code at https://github.com/microsoft/NaturalLanguageProgram for further research into this field of study.
Also access our AI generated: Comprehensive summary, Lay summary, Blog-like article; or ask questions about this paper to our AI assistant.

Authors: Yiduo Guo, Yaobo Liang, Chenfei Wu, Wenshan Wu, Dongyan Zhao, Nan Duan

Work in process
License: CC BY 4.0

Abstract: 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 \url{https://github.com/microsoft/NaturalLanguageProgram}.

Submitted to arXiv on 20 Apr. 2023

Ask questions about this paper to our AI assistant

You can also chat with multiple papers at once here.

AI assistant instructions?

Results of the summarizing process for the arXiv paper: 2304.10464v1

Large Language Models (LLMs) have shown impressive performance in various natural language tasks, such as generating passages and solving grade school math problems. However, they still struggle with complex tasks that require a procedure for combining basic capabilities. To address this issue, the authors propose using natural language as a new programming language to teach LLMs how to complete complex tasks. They suggest making the inference process into two steps: finding a natural language program for the test sample and then using it to generate a specific solution. These programs guide LLMs by analyzing all possible cases, decomposing the task into sub-tasks, and employing functions sequentially to complete it. The authors introduce two methods for finding natural language programs: Self-Program (SP) and Learning to Program (LP). The SP method involves asking LLMs to generate a program consisting of general solutions but may result in programs with factual errors or incompleteness. In contrast, LP learns the natural language program in text form based on the training dataset, which can guide LLMs in solving complex tasks more effectively. The LP method is inspired by traditional deep learning processes but differs in that it learns program p as text instead of vector weight. The authors demonstrate the effectiveness of their approach through experiments on high school math and competition mathematics problems datasets. Their LP method outperforms direct zero-shot test performance by 18.3% when testing ChatGPT on ten tasks from the AMPS dataset. Natural Language Programs offer generalizability and human understandability advantages as they can guide LLMs to solve all questions similar to the test sample while being readable and editable by humans. In conclusion, leveraging natural language as a new programming language can enhance LLMs' capabilities in completing complex tasks systematically. The proposed LP method provides an effective way of learning natural language programs from training datasets that can guide LLMs towards solving complex tasks more accurately than SP methods alone. The authors release their code at https://github.com/microsoft/NaturalLanguageProgram for further research into this field of study.
Created on 21 Apr. 2023

Assess the quality of the AI-generated content by voting

Score: 0

Why do we need votes?

Votes are used to determine whether we need to re-run our summarizing tools. If the count reaches -10, our tools can be restarted.

The previous summary was created more than a year ago and can be re-run (if necessary) by clicking on the Run button below.

Similar papers summarized with our AI tools

Navigate through even more similar papers through a

tree representation

Look for similar papers (in beta version)

By clicking on the button above, our algorithm will scan all papers in our database to find the closest based on the contents of the full papers and not just on metadata. Please note that it only works for papers that we have generated summaries for and you can rerun it from time to time to get a more accurate result while our database grows.

Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.