Het verminderen van hallucinaties bij het genereren van SPARQL-query's op basis van taalmodel door middel van post-generatie geheugenretrieval
Reducing Hallucinations in Language Model-based SPARQL Query Generation Using Post-Generation Memory Retrieval
February 19, 2025
Auteurs: Aditya Sharma, Luis Lara, Amal Zouaq, Christopher J. Pal
cs.AI
Samenvatting
Het vermogen om SPARQL-query's te genereren uit vragen in natuurlijke taal is cruciaal voor een efficiënte en accurate ophalen van gestructureerde gegevens uit kennisgrafieken (KG). Hoewel grote taalmodellen (LLM's) veelvuldig worden ingezet voor het genereren van SPARQL-query's, zijn ze vaak gevoelig voor hallucinaties en out-of-distribution fouten bij het produceren van KG-elementen zoals Uniform Resource Identifiers (URI's) op basis van interne parametrische kennis. Dit resulteert vaak in inhoud die plausibel lijkt maar feitelijk onjuist is, wat aanzienlijke uitdagingen oplevert voor hun gebruik in real-world informatie-ophalingsapplicaties (IR). Dit heeft geleid tot toenemend onderzoek gericht op het detecteren en mitigeren van dergelijke fouten. In dit artikel introduceren we PGMR (Post-Generation Memory Retrieval), een modulair framework dat een niet-parametrische geheugenmodule integreert om KG-elementen op te halen en de op LLM gebaseerde SPARQL-querygeneratie te verbeteren. Onze experimentele resultaten tonen aan dat PGMR consistent sterke prestaties levert over diverse datasets, dataverdelingen en LLM's. Opmerkelijk is dat PGMR URI-hallucinaties aanzienlijk vermindert, waardoor het probleem in verschillende scenario's vrijwel wordt geëlimineerd.
English
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.Summary
AI-Generated Summary