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}
翻译:大型语言模型(LLMs)在各种基础自然语言任务中表现出显著性能。对于完成复杂任务,我们仍需任务规划来引导LLMs逐步生成具体解决方案。LLMs可直接生成任务规划,但这些规划可能仍包含事实错误或不完整。高质量的任务规划应包含解决所有情况的正确逐步解决方案及避免错误的行为指令。为此,我们提出"学习规划"方法,包含两个阶段:(1)在首个任务规划学习阶段,通过提示LLMs从训练错误反馈中推导出新的逐步解决方案和行为指令,迭代更新任务规划;(2)在后续测试阶段,LLM使用已学习的任务规划引导其在测试集上的推理。我们在五种不同推理类型任务(8个数据集)上验证了方法的有效性。进一步分析实验表明,一个LLM学习的任务规划可直接引导另一LLM提升性能,这揭示了一种新的迁移学习范式。代码已发布在\url{https://github.com/Eureka6174/LearnNLPlan}。