arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.14935cs.AI
收藏

PrologMCP:面向LLM代理的标准化Prolog工具接口

PrologMCP: A Standardized Prolog Tool Interface for LLM Agents

Royal Holloway, University of London(伦敦大学皇家霍洛威学院)

Agnieszka Mensfelt, Adarsh Prabhakaran, Adrian Haret, Vince Trencsenyi, Kostas Stathis

AI总结:

提出PrologMCP,一个通过模型上下文协议将Prolog暴露为状态化工具的任务无关开源服务器,使LLM代理能够通过翻译-运行-检查-修复循环稳健地委托演绎推理,在PARARULE-Plus上达到或超越推理型LLM。

摘要:

前沿推理调优语言模型在深度演绎任务上仍然失败,而通过扩展内部推理来提升性能的成本很高。符号委托提供了一条补充路径:语言模型翻译问题,求解器执行推理。然而,当前用于逻辑编程的自动形式化管道通常是针对特定任务或代理的定制集成。我们引入了PrologMCP,一个任务无关的开源服务器,通过模型上下文协议(MCP)将Prolog暴露为状态化工具。其紧凑的工具接口、结构化错误报告和每会话隔离使翻译-运行-检查-修复循环成为MCP能力代理的可复用原语。我们在PARARULE-Plus的两个子集上评估了增强PrologMCP的形式化代理与标准和推理LLM(Claude Sonnet 4.6、GPT-4.1和o4-mini)的性能:一个通用样本和一个更具挑战性的样本,针对自然语言推理的特定失败模式。在通用样本上,形式化代理匹配或超越推理LLM(准确率1.00对比1.00/0.998),相比标准模型提升最大(GPT-4.1为0.762)。在挑战性子集上,形式化代理保持接近完美(1.00/0.99),而推理LLM降至0.95/0.94。这些结果表明,通过MCP将推理委托给Prolog是扩展自然语言推理的一种稳健且可检查的替代方案。

英文摘要:

Frontier reasoning-tuned language models still fail on deductive tasks at depth, and the cost of improved performance through extended internal reasoning scales poorly. Symbolic delegation offers a complementary route: a language model translates the problem, while a solver performs the inference. However, current autoformalization pipelines for logic programming are typically bespoke integrations tied to particular tasks or agents. We introduce PrologMCP, a task-agnostic, open-source server that exposes Prolog as a stateful tool through the Model Context Protocol (MCP). Its compact tool interface, structured error reporting, and per-session isolation make the translate-run-inspect-repair loop a reusable primitive for MCP-capable agents. We evaluate a formalizer agent enhanced with PrologMCP against standard and reasoning LLMs (Claude Sonnet 4.6, GPT-4.1, and o4-mini) on two subsets of PARARULE-Plus: a general-purpose sample and a more challenging one targeting a specific failure mode of natural-language reasoning. On the general sample, the formalizer matches or exceeds reasoning LLMs (accuracy 1.00 vs.\ 1.00 / 0.998), with the largest gains over standard models (0.762 for GPT-4.1). On the challenging subset, the formalizer remains near-perfect (1.00 / 0.99) while reasoning LLMs drop to 0.95 / 0.94. These results suggest that delegating inference to Prolog via MCP is a robust and inspectable alternative to extended natural-language reasoning.

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

↑