Learning to Program with Natural Language
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.
Authors: Yiduo Guo, Yaobo Liang, Chenfei Wu, Wenshan Wu, Dongyan Zhao, Nan Duan
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}.
Ask questions about this paper to our AI assistant
You can also chat with multiple papers at once here.
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 representationLook 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.