about
Learning to Program with Natural Language (arxiv.org)
3 points by mercat on Apr 22, 2023 | hide | past | pdf | 2 comments on HN

In plain words: Rather than asking a language model to write a plan once, this method keeps fixing it using mistakes on practice problems, adding missing steps and tips to avoid errors. The plan then guides the model and solved more problems across five reasoning tasks.

Abstract · Learning to Plan with Natural Language

Large Language Models (LLMs) have shown remarkable performance in various basic natural language tasks. For completing the complex task, we still need a plan for the task to guide LLMs to generate the specific solutions step by step. LLMs can directly generate task plans, but these plans may still contain factual errors or are incomplete. A high-quality task plan contains correct step-by-step solutions for solving all situations and behavioral instructions for avoiding mistakes. To obtain it, we propose the Learning to Plan method, which involves two phases: (1) In the first learning task plan phase, it iteratively updates the task plan with new step-by-step solutions and behavioral instructions, which are obtained by prompting LLMs to derive from training error feedback. (2) In the subsequent test phase, the LLM uses the learned task plan to guide the inference of LLM on the test set. We demonstrate the effectiveness of our method on the five different reasoning type tasks (8 datasets). Further, our analysis experiment shows that the task plan learned by one LLM can directly guide another LLM to improve its performance, which reveals a new transfer learning paradigm. We release the code at \url{https://github.com/Eureka6174/LearnNLPlan}

Yiduo Guo, Yaobo Liang, Chenfei Wu, Wenshan Wu, Dongyan Zhao, Nan Duan
arXiv:2304.10464 · cs.CL · submitted Apr 20, 2023 · updated Dec 13, 2023
abstract · pdf · html · Large Language Model, Learning from feedback, Planning and Reasoning

add comment on HN

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%.
I'm interested as to why it does worse, and some cases much more so, on some problems.

I find myself struggling to connect all of the dots without seeing the entire log. I understand the need to editorialize to show your specific research and implementations. However I cannot fully grok what is being sent to the LLM without seeing an unedited version. It's probably very stupid, but I need to run inferences step by step on LLM prompts to see exactly what is being described.