提出无需训练的框架SAGA,提升文本转SPARQL的语义准确率。
SAGA: Schema-Aware Grounding for Agentic Text-to-SPARQL Generation

- 基于知识库模式约束属性搜索,避免类型不匹配
- 在九个基准上全部最优,空结果查询减少
- 适合需要高精度语义解析的研究者与开发者
复杂知识库问答通常通过子图检索或语义解析为可执行逻辑形式来解决。本文研究语义解析范式。近期大模型代理使解析过程交互化:交替进行推理、查询知识库和扩展部分SPARQL查询。这种交替降低了对一次性生成的依赖,但使知识库定位质量取决于交互工具暴露的信息。现有代理主要通过词汇相关性和实例级观察来检索或修剪候选属性,未系统考虑实体类型、属性域与范围或预期答案类型。我们称此为“类型盲定位”,导致搜索空间扩大,并常产生看似合理但语义不兼容的三元组模式,执行后返回空结果。我们提出SAGA(Schema-Aware Grounding for Agentic Text-to-SPARQL Generation),一种无需训练的框架,将属性探索转化为模式约束下的定位操作。SAGA维护持久的双向类型状态,在构建时过滤已知不兼容的属性候选,以紧凑的模式标注格式呈现剩余图结构,并通过经验与轨迹局部证据容忍缺失模式信息。在Wikidata和Freebase上的九个基准设置中,SAGA在所有九个设置上均取得最高F1值,在八个设置上达到最高精确匹配准确率,且在所有报告的Wikidata设置中减少了空结果查询。
原文摘要 · Abstract (English)
Complex knowledge base question answering (KBQA) is commonly approached through either information retrieval over a question-specific subgraph or semantic parsing into an executable logical form. We study the latter paradigm. Recent large language model agents make semantic parsing interactive: they alternate between reasoning, querying the knowledge base, and extending a partial SPARQL query. This interleaving reduces reliance on one-shot generation, but makes the quality of \emph{KB grounding} depend on what the interaction tools expose. Existing agents retrieve or prune candidate properties mainly through lexical relevance and instance-level observations, without systematically conditioning on entity types, property domains and ranges, or the expected answer type. We call this failure mode \emph{type-blind grounding}. It enlarges the grounding search space and often produces plausible-looking but semantically incompatible triple patterns that execute to empty results. We propose SAGA (\underline{S}chema-\underline{A}ware \underline{G}rounding for \underline{A}gentic Text-to-SPARQL Generation), a training-free framework that turns property exploration into a schema-constrained grounding operation. SAGA maintains a persistent bidirectional type state, filters known-incompatible property candidates at construction time, presents the remaining graph patterns in a compact schema-annotated format, and handles missing schema information permissively through empirical and trace-local evidence. Across nine benchmark settings over Wikidata and Freebase, SAGA achieves the highest F1 on all nine settings and the highest exact-match accuracy on eight, while reducing empty-result queries across all reported Wikidata settings.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。