让大模型学会用逻辑规则推理,解决幻觉和步骤错误问题。
Do LLMs Dream of Discrete Algorithms?
- 用逻辑规则模块增强大模型,分解复杂任务为可验证子任务。
- 在DABStep基准上,精度和覆盖率显著提升,系统文档更完整。
- 适合需要可靠推理的工程化AI应用,如自动编程或安全决策。
大语言模型(LLMs)已深刻改变人工智能领域,支持自然语言交互和软件组件的动态调度。然而,其基于概率推理的特性限制了在需严格逻辑推理、离散决策和强可解释性领域的表现。本文研究这些局限性,提出一种神经符号方法,通过引入基于逻辑的推理模块(特别是Prolog谓词和可组合工具集),增强LLMs能力。该框架结合一阶逻辑与显式规则系统,使模型能将复杂查询分解为可验证子任务,协调可靠解决方案,并缓解幻觉与错误步骤分解等常见失败模式。我们在DABStep基准上验证该混合架构的实际效益,结果显示多步推理任务中的精度、覆盖率和系统文档质量均得到提升。结果表明,将LLMs与模块化逻辑推理结合,可恢复工程严谨性,提升系统可靠性,为复杂领域中可信、可解释AI代理提供可扩展路径。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have rapidly transformed the landscape of artificial intelligence, enabling natural language interfaces and dynamic orchestration of software components. However, their reliance on probabilistic inference limits their effectiveness in domains requiring strict logical reasoning, discrete decision-making, and robust interpretability. This paper investigates these limitations and proposes a neurosymbolic approach that augments LLMs with logic-based reasoning modules, particularly leveraging Prolog predicates and composable toolsets. By integrating first-order logic and explicit rule systems, our framework enables LLMs to decompose complex queries into verifiable sub-tasks, orchestrate reliable solutions, and mitigate common failure modes such as hallucination and incorrect step decomposition. We demonstrate the practical benefits of this hybrid architecture through experiments on the DABStep benchmark, showing improved precision, coverage, and system documentation in multi-step reasoning tasks. Our results indicate that combining LLMs with modular logic reasoning restores engineering rigor, enhances system reliability, and offers a scalable path toward trustworthy, interpretable AI agents across complex domains.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。