让大模型自己写程序验证并修正答案,提升复杂任务准确性
ProgCo: Program Helps Self-Correction of Large Language Models
- 用自动生成的程序代码实现复杂逻辑验证
- 在数学与指令遵循任务上显著提升自修正效果
- 适合需要高可靠推理的AI系统开发者使用
自纠正旨在使大语言模型(LLMs)在无外部反馈的情况下自我验证并优化初始回答。然而,大模型常无法有效进行自我验证,生成错误反馈,导致纠正过程被误导,尤其在复杂推理任务中表现不佳。本文提出程序驱动的自纠正方法(ProgCo)。首先,程序驱动验证(ProgVe)通过自生成、自执行的验证伪程序,实现复杂逻辑验证和广泛测试;其次,程序驱动修正(ProgRe)接收来自ProgVe的反馈,对回答与验证程序进行双重反思与修正,缓解复杂任务中错误反馈带来的误导。在三个指令遵循与数学基准测试上的实验表明,ProgCo实现了有效的自纠正,结合真实程序工具后性能还可进一步提升。代码已开源:https://github.com/songxiaoshuai/progco。
原文摘要 · Abstract (English)
Self-Correction aims to enable large language models (LLMs) to self-verify and self-refine their initial responses without external feedback. However, LLMs often fail to effectively self-verify and generate correct feedback, further misleading refinement and leading to the failure of self-correction, especially in complex reasoning tasks. In this paper, we propose Program-driven Self-Correction (ProgCo). First, program-driven verification (ProgVe) achieves complex verification logic and extensive validation through self-generated, self-executing verification pseudo-programs. Then, program-driven refinement (ProgRe) receives feedback from ProgVe, conducts dual reflection and refinement on both responses and verification programs to mitigate misleading of incorrect feedback in complex reasoning tasks. Experiments on three instruction-following and mathematical benchmarks indicate that ProgCo achieves effective self-correction, and can be further enhance performance when combined with real program tools. We release our code at https://github.com/songxiaoshuai/progco.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。