Reducing Hallucinations in Language Model-based SPARQL Query Generation
  Using Post-Generation Memory Retrieval
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.
67b7610afedfe97127f75374
Aditya Sharma
admin_assigned
2025-02-20T17:37:33.974Z
66d959e4fb6d15635f2b9d76
https://cdn-avatars.huggingface.co/v1/production/uploads/noauth/RpDOzFBoW_OQNW4iHuL0g.jpeg
Aditya Sharma 
user
adityasharma001
67b7610afedfe97127f75375
Luis Lara
claimed_verified
2025-02-20T17:11:22.814Z
63e972f1ccae1fe5c6211759
https://cdn-avatars.huggingface.co/v1/production/uploads/63e972f1ccae1fe5c6211759/AfKPgMdAraUtvbtJpoHFY.jpeg
Luis Lara
user
ludolara
67b7610afedfe97127f75376
Amal Zouaq
admin_assigned
2025-02-20T17:37:41.765Z
64df79eff08b064990fd62db
/avatars/88a494615a2339bc29db4ea33a9817b2.svg
Amal Zouaq
user
zouaq
67b7610afedfe97127f75377
Christopher J. Pal
Reducing Hallucinations in Language Model-based SPARQL Query Generation
  Using Post-Generation Memory Retrieval
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.
A non-parametric memory module framework, PGMR, enhances LLM-based SPARQL query generation by reducing URI hallucinations in knowledge graph retrieval.
large language models SPARQL query generation knowledge graphs URI hallucinations post-generation memory retrieval non-parametric memory module