메모리 검색 후처리를 통한 언어 모델 기반 SPARQL 쿼리 생성의 환각 현상 감소
Reducing Hallucinations in Language Model-based SPARQL Query Generation Using Post-Generation Memory Retrieval
February 19, 2025
저자: Aditya Sharma, Luis Lara, Amal Zouaq, Christopher J. Pal
cs.AI
초록
자연어 질문에서 SPARQL 쿼리를 생성하는 능력은 지식 그래프(KG)로부터 구조화된 데이터를 효율적이고 정확하게 검색하는 데 있어 핵심적입니다. 대규모 언어 모델(LLM)이 SPARQL 쿼리 생성에 널리 사용되고 있지만, 내부 파라미터 지식을 기반으로 Uniform Resource Identifier(URI)와 같은 KG 요소를 생성할 때 환각(hallucination) 및 분포 외 오류(out-of-distribution error)에 취약한 경우가 많습니다. 이는 사실적으로는 잘못되었지만 그럴듯해 보이는 내용을 생성하게 하여, 실제 정보 검색(IR) 애플리케이션에서의 사용에 상당한 어려움을 초래합니다. 이로 인해 이러한 오류를 탐지하고 완화하기 위한 연구가 활발히 진행되고 있습니다. 본 논문에서는 비파라미터 메모리 모듈을 통합하여 KG 요소를 검색하고 LLM 기반 SPARQL 쿼리 생성을 강화하는 모듈식 프레임워크인 PGMR(Post-Generation Memory Retrieval)을 소개합니다. 실험 결과, PGMR는 다양한 데이터셋, 데이터 분포 및 LLM에서 일관되게 강력한 성능을 보여주었습니다. 특히, PGMR는 URI 환각을 크게 완화하여 여러 시나리오에서 이 문제를 거의 제거했습니다.
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