2025-02-20 · 进阶 · 自然语言处理 · 机器学习

Reducing Hallucinations in Language Model-based SPARQL Query Generation Using Post-Generation Memory Retrieval

该论文提出了一种名为PGMR的模块化框架,通过在生成SPARQL查询后使用非参数记忆检索来减少语言模型在生成查询时产生的幻觉,从而提高查询的准确性和可靠性。

更新于 2025-02-21。作者:Aditya Sharma、Luis Lara、Amal Zouaq、Christopher J. Pal。

中文摘要

生成自然语言问题对应的SPARQL查询的能力对于确保从知识图谱(KG)中高效准确地检索结构化数据至关重要。尽管大型语言模型(LLMs)已被广泛用于SPARQL查询生成,但在根据内部参数知识生成知识图谱元素,如统一资源标识符(URIs)时,它们往往容易产生幻觉和分布外错误。这通常会导致看似合理但实际上错误的内容,对它们在现实世界信息检索(IR)应用中的使用构成了重大挑战。这促使研究人员增加了针对检测和减轻此类错误的研究。在本文中,我们介绍了PGMR(后生成记忆检索),这是一个模块化框架,它集成了一个非参数记忆模块,用于检索知识图谱元素并增强基于LLM的SPARQL查询生成。我们的实验结果表明,PGMR在多样化的数据集、数据分布和LLMs上均表现出强劲的性能。值得注意的是,PGMR显著减轻了URI幻觉,在多个场景中几乎消除了这个问题。

英文摘要

The ability to generate SPARQL queries from natural language questions is crucial for ensuring efficient and accurate retrieval of structured data from knowledge graphs (KG). While large language models (LLMs) have been widely adopted for SPARQL query generation, they are often susceptible to hallucinations and out-of-distribution errors when producing KG elements like Uniform Resource Identifiers (URIs) based on internal parametric knowledge. This often results in content that appears plausible but is factually incorrect, posing significant challenges for their use in real-world information retrieval (IR) applications. This has led to increased research aimed at detecting and mitigating such errors. In this paper, we introduce PGMR (Post-Generation Memory Retrieval), a modular framework that incorporates a non-parametric memory module to retrieve KG elements and enhance LLM-based SPARQL query generation. Our experimental results indicate that PGMR consistently delivers strong performance across diverse datasets, data distributions, and LLMs. Notably, PGMR significantly mitigates URI hallucinations, nearly eliminating the problem in several scenarios.

解读

一句话总结

该论文提出了一种名为PGMR的模块化框架,通过在生成SPARQL查询后使用非参数记忆检索来减少语言模型在生成查询时产生的幻觉,从而提高查询的准确性和可靠性。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源

机器可读索引:llms.txt