用精准纠错示例提升大模型规划能力,让其不再犯低级错误。
Localizing and Correcting Errors for LLM-based Planners
- 针对大模型规划中的错误步骤,注入最小纠正示例进行局部修正。
- 在8×8网格世界中,仅用60个示例就将有效计划率提升至89%。
- 适用于各类规划任务,对不同大模型架构均有效,适合调试智能体行为。
大语言模型在数学和编程推理上表现优异,但在符号式经典规划任务中常失败,生成的计划频繁违反指令中的领域约束(如穿墙)。为解决此问题,我们提出局部上下文学习(L-ICL):迭代地在指令中注入针对性纠正示例。具体而言,L-ICL识别轨迹中首个约束违反步骤,并插入最小输入-输出示例,展示该步骤的正确行为。相比显式指令或传统IcL(需完整解题轨迹),L-ICL显著更优。例如,在8×8网格世界中,使用60个训练示例时,L-ICL生成有效计划比例达89%,优于最佳基线的59%,提升30%。该方法在网格导航、迷宫、推箱子和积木世界等多个领域及多种大模型架构上均表现出显著改进。
原文摘要 · Abstract (English)
Large language models (LLMs) have demonstrated strong reasoning capabilities on math and coding, but frequently fail on symbolic classical planning tasks. Our studies, as well as prior work, show that LLM-generated plans routinely violate domain constraints given in their instructions (e.g., walking through walls). To address this failure, we propose iteratively augmenting instructions with Localized In-Context Learning (L-ICL) demonstrations: targeted corrections for specific failing steps. Specifically, L-ICL identifies the first constraint violation in a trace and injects a minimal input-output example giving the correct behavior for the failing step. Our proposed technique of L-ICL is much effective than explicit instructions or traditional ICL, which adds complete problem-solving trajectories, and many other baselines. For example, on an 8x8 gridworld, L-ICL produces valid plans 89% of the time with only 60 training examples, compared to 59% for the best baseline, an increase of 30%. L-ICL also shows dramatic improvements in other domains (gridworld navigation, mazes, Sokoban, and BlocksWorld), and on several LLM architectures.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。