用Python代码统一处理表格、数据库等结构化知识,让大模型推理更准确。
Pandora: A Code-Driven Large Language Model Agent for Unified Reasoning Across Diverse Structured Knowledge
- 通过Pandas API构建统一知识表示,适配大模型预训练先验
- 生成可执行代码与文本推理步骤,跨任务迁移效果显著
- 在4个基准上超越现有统一框架,媲美专用方法
统一结构化知识推理(USKR)旨在通过表格、数据库、知识图谱等结构化数据源,以统一方式回答自然语言问题。现有方法多依赖特定任务策略或自定义表示,难以实现不同结构化知识推理任务间的知识迁移,且与大模型的先验不匹配,限制了性能提升。本文提出新框架Pandora,利用Python的Pandas API构建与大模型预训练对齐的统一知识表示,让大模型生成问题对应的文本推理步骤和可执行的Python代码。通过从包含多种SKR任务的训练示例记忆库中获取示范,实现跨任务知识迁移。在涉及三种SKR任务的四个基准上的大量实验表明,Pandora优于现有统一框架,并能有效媲美专用方法。
原文摘要 · Abstract (English)
Unified Structured Knowledge Reasoning (USKR) aims to answer natural language questions (NLQs) by using structured sources such as tables, databases, and knowledge graphs in a unified way. Existing USKR methods either rely on employing task-specific strategies or custom-defined representations, which struggle to leverage the knowledge transfer between different SKR tasks or align with the prior of LLMs, thereby limiting their performance. This paper proposes a novel USKR framework named \textsc{Pandora}, which takes advantage of \textsc{Python}'s \textsc{Pandas} API to construct a unified knowledge representation for alignment with LLM pre-training. It employs an LLM to generate textual reasoning steps and executable Python code for each question. Demonstrations are drawn from a memory of training examples that cover various SKR tasks, facilitating knowledge transfer. Extensive experiments on four benchmarks involving three SKR tasks demonstrate that \textsc{Pandora} outperforms existing unified frameworks and competes effectively with task-specific methods.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。