A Comprehensive Evaluation of Neural SPARQL Query Generation from Natural Language Questions
Not on the map. Why?
Abstract (arXiv)
In recent years, the field of neural machine translation (NMT) for SPARQL query generation has witnessed significant growth. Incorporating the copy mechanism with traditional encoder-decoder architectures and using pre-trained encoder-decoders and large language models have set new performance benchmarks. This paper presents various experiments that replicate and expand upon recent NMT-based SPARQL generation studies, comparing pre-trained language models (PLMs), non-pre-trained language models (NPLMs), and large language models (LLMs), highlighting the impact of question annotation and the copy mechanism and testing various fine-tuning methods using LLMs. In particular, we provide a systematic error analysis of the models and test their generalization ability. Our study demonstrates that the copy mechanism yields significant performance enhancements for most PLMs and NPLMs. Annotating the data is pivotal to generating correct URIs, with the "tag-within" strategy emerging as the most effective approach. Additionally, our findings reveal that the primary source of errors stems from incorrect URIs in SPARQL queries that are sometimes replaced with hallucinated URIs when using base models. This does not happen using the copy mechanism, but it sometimes leads to selecting wrong URIs among candidates. Finally, the performance of the tested LLMs fell short of achieving the desired outcomes.
Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). Builds on 20 of its 49 references that are in the map. First posted on arXiv 16 Apr 2023.
Builds on
20 of 49 references.
References · 20
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,893
- 2017Get To The Point: Summarization with Pointer-Generator Networkscited by 1,292
- 2017Convolutional Sequence to Sequence Learningcited by 552
- 2016Incorporating Copying Mechanism in Sequence-to-Sequence Learningcited by 218
- 2022SGPT: GPT Sentence Embeddings for Semantic Searchcited by 204
8 more
- 2019Compositional generalization through meta sequence-to-sequence learningcited by 99
- 2022Modern Baselines for SPARQL Semantic Parsingcited by 34
- 2019Neural Machine Translating from Natural Language to SPARQLcited by 23
- 2019Leveraging Frequent Query Substructures to Generate Formal Queries for Complex Question Answeringcited by 15
- 2017SPARQL as a Foreign Languagecited by 13
- 2018Semantic Parsing Natural Language into SPARQL: Improving Target Language Representation with Neural Attentioncited by 8
- 2022A Copy Mechanism for Handling Knowledge Base Elements in SPARQL Neural Machine Translationcited by 4
- 2021SPBERT: An Efficient Pre-training BERT on SPARQL Queries for Question Answering over Knowledge Graphscited by 1
Built on by
Citing papers per year: 2024: 2; 2025: 5; 2026: 2.
9 papers.
- 2024Assessing SPARQL capabilities of Large Language Modelscited by 14
- 2024Leveraging small language models for Text2SPARQL tasks to improve the resilience of AI assistancecited by 13
- 2025SPARQL Query Generation with LLMs: Measuring the Impact of Training Data Memorization and Knowledge Injectioncited by 6
- 2025Reducing Hallucinations in Language Model-based SPARQL Query Generation Using Post-Generation Memory Retrievalcited by 3
- 2025Q-NL Verifier: Leveraging Synthetic Data for Robust Knowledge Graph Question Answeringcited by 2
- 2025FRASE: Structured Representations for Generalizable SPARQL Query Generationcited by 2
- 2025InteracSPARQL: An Interactive System for SPARQL Query Refinement Using Natural Language Explanationscited by 2
- 2026Graph Query Generation with Constraint-guided Large Language Agentscited by 0
- 2026DeSQ: Decomposition-based SPARQL Query Generationcited by 0
- 2026DeSQ: Decomposition-based SPARQL Query Generation29 May 2026
- 2026Graph Query Generation with Constraint-guided Large Language Agents9 Apr 2026
- 2025InteracSPARQL: An Interactive System for SPARQL Query Refinement Using Natural Language Explanations3 Nov 2025
- 2025SPARQL Query Generation with LLMs: Measuring the Impact of Training Data Memorization and Knowledge Injection18 Jul 2025
- 2025FRASE: Structured Representations for Generalizable SPARQL Query Generation28 Mar 2025
- 2025Q-NL Verifier: Leveraging Synthetic Data for Robust Knowledge Graph Question Answering3 Mar 2025
- 2025Reducing Hallucinations in Language Model-based SPARQL Query Generation Using Post-Generation Memory Retrieval19 Feb 2025
- 2024Assessing SPARQL capabilities of Large Language Models9 Sep 2024
- 2024Leveraging small language models for Text2SPARQL tasks to improve the resilience of AI assistance27 May 2024