arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.05737cs.AIcs.CL
收藏

ReFlect:一种有效的复杂长周期LLM推理Harness系统

ReFlect: An Effective Harness System for Complex Long-Horizon LLM Reasoning

Indiana University Bloomington(印第安纳大学布卢明顿)

Fan Huang

AI总结:

ReFlect通过创建确定性封装逻辑,有效检测和恢复LLM推理中的错误,提升多阶段任务的成功率,尤其在SWE-bench中显著提高代码补全质量。

摘要:

当前LLM推理范式包括链式思维、ReAct和事后自我批评,但这些范式在长周期、多阶段任务中失效,导致错误累积。本文提出ReFlect,一种LLM推理的Harness系统,通过确定性封装逻辑独立检测和恢复错误。实验显示,ReFlect在六个领域中提升任务成功率,从41%到56%,并在SWE-bench中将代码补全质量从0%提升至82%-87%。ReFlect的增益与模型基础成功率成反比,每减少1个百分点的基础成功率可获得1.69个百分点的Harness增益。

英文摘要:

Current reasoning paradigms for LLMs include chain-of-thought, ReAct, and post-hoc self-critique. These paradigms rely on two assumptions that fail on long-horizon, multi-stage tasks. As a result, errors accumulate silently across reasoning steps, leaving an open question: can a reasoning system effectively detect and recover from its own failures? We present ReFlect, a \emph{harness} system for LLM reasoning that creates standalone error detection and recovery logic as a deterministic wrapper around the model. Controlled experiments across 6 reasoning domains show that prompt-level self-critique produces formulaic templates that flag no issues in 90 of 100 audited reflection blocks, and the investigated LLMs wrongly accept a wrong answer in at least 76\% of cases. Our ReFlect harness achieves task success rates ranging from 41\% on gpt-4o-mini to 56\% on Claude Sonnet 4.5 across six models spanning small and frontier scale, with per-model gains over Direct CoT ranging from +7 pp on Qwen2.5-72B to +29 pp on Claude Sonnet 4.5, and additionally raises SWE-bench patch-structural quality from 0\% (Direct CoT) to between 82\% (Qwen2.5-72B) and 87\% (GPT-4o). Notably, the harness gain is inversely proportional to the model's Direct CoT task success rate (the fitted slope is -1.69 with r=-0.76): each pp lost in baseline success rate is mechanically recovered by 1.69 pp of harness gain. We spot that adding structured reasoning state and operators yields only 15.0--18.7\% pair-mean on Llama-3.3-70B and Qwen2.5-72B because models at this scale cannot reliably populate the state its operators require. ReFlect is model-agnostic, training-free, and operates entirely at inference time.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑