Large Language Models (LLMs) have shown remarkable performance in various basic natural language tasks, which raises hope for achieving Artificial General Intelligence. For completing the complex task, we still need a program for the task first and then ask LLMs to follow the program to generate the specific solution. We propose using natural language as a new programming language to describe task procedures, making them easily understandable to both humans and LLMs. ~The LLM is 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 (\text{LP}) method to ask LLMs themselves to learn the natural language program based on the training dataset of the complex task first and then use the learned program to guide the inference. Our experiments on the reasoning tasks of five different reasoning types (8 datasets) demonstrate the effectiveness of our approach. Further, our analysis experiment shows that the learned program can be directly used to guide another LLM to improve its performance, which reveals a new transfer learning paradigm.
翻译:大型语言模型(LLMs)在各种基础自然语言任务中展现出卓越性能,这为达成通用人工智能带来了希望。要完成复杂任务,我们仍需先为该任务编写程序,再让LLMs遵循程序生成具体解决方案。我们提出将自然语言作为一种新型编程语言来描述任务流程,使其对人类和LLMs都易于理解。虽然LLM能够直接生成自然语言程序,但这些程序可能仍包含事实性错误或不完整步骤。为此,我们进一步提出"学习编程"(Learning to Program, \text{LP})方法——首先让LLMs基于复杂任务的训练数据集自主学习自然语言程序,再利用学得的程序指导推理。在涵盖五种不同推理类型(共8个数据集)的推理任务实验中,我们的方法展现出有效性。此外,分析实验表明,学得的程序可直接用于指导另一个LLM提升其性能,这揭示了一种新的迁移学习范式。