arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~

GGC:面向可靠Text-to-SPARQL生成的选择性查询修正

GGC: Selective Query Correction for Reliable Text-to-SPARQL Generation

Ziyi Yang, Thanh-Son Nguyen, Tuan Anh Nguyen, Lihui Chen

arXiv 2607.28082首次发表:更新:

发表机构

Nanyang Technological University; Institute of High Performance Computing, Agency for Science, Technology and Research (A*STAR)(南洋理工大学; 新加坡科技研究局高性能计算研究所)

机构由 AI 辅助整理,请以论文原文为准。

AI 中文总结

该研究针对LLM生成Text-to-SPARQL查询不可靠的问题,提出GGC框架,通过选择性修正高风险查询,在MCQA数据集上提升准确率并降低推理开销。

AI 中文摘要

大型语言模型(LLMs)在结构化查询生成方面展现出强大能力,使其成为Text-to-SPARQL任务的自然选择,该任务旨在将自然语言问题转换为可在知识图谱上执行的SPARQL查询。然而,LLMs的初始输出仍不可靠:生成的查询可能可执行但在语义上与输入问题不一致,导致检索结果错误。为解决该问题,本文提出Generator-Gate-Corrector(GGC)框架,用于构建可靠的基于LLM的Text-to-SPARQL生成系统。GGC首先利用生成器(Generator)生成初始查询,接着应用门控模块(Gate)预测是否需要修正,最后仅对选定的高风险查询调用修正器(Corrector)。这种选择性修正机制可避免不必要的修改,降低对原本正确的查询造成性能下降的风险。在MCQA数据集上的实验表明,与对所有生成的查询进行修正相比,GGC将查询级准确率从90.23%提升至98.33%,同时降低了45%的推理开销。消融研究显示,Gate在不同阈值下表现稳定,且Corrector的训练数据构成会影响修正效果与稳定性。总体而言,实验结果证明选择性修正可提升基于LLM的Text-to-SPARQL生成的准确性、可靠性与效率。

英文摘要

Large language models (LLMs) have demonstrated strong capabilities in structured query generation, making them a natural choice for Text-to-SPARQL, which translates natural language questions into executable SPARQL queries over knowledge graphs. However, their initial outputs remain unreliable: generated queries may be executable yet semantically misaligned with input questions, leading to incorrect retrieval. To address this issue, we propose Generator-Gate-Corrector (GGC), a framework for reliable LLM-based Text-to-SPARQL generation. GGC first uses a Generator to produce an initial query, then applies a Gate to predict whether correction is needed, and finally invokes a Corrector only for selected high-risk queries. This selective correction mechanism avoids unnecessary modifications and reduces the risk of degrading originally correct queries. Experiments on MCQA show that GGC improves query-level accuracy from 90.23\% to 98.33\% while reducing inference overhead by 45\% compared with correcting all generated queries. Ablation studies show that the Gate is robust across thresholds and that Corrector training data composition affects correction effectiveness and stability. Overall, the results demonstrate that selective correction enhances the accuracy, reliability, and efficiency of LLM-based text-to-SPARQL generation.

Comments18 pages, 1 figure

论文原文

arXiv 摘要页 · PDF 原文 · HTML 原文

↑