Automating SPARQL Query Translations Between DBpedia and Wikidata

Authors: Malte Christian Bartels, Debayan Banerjee, Ricardo Usbeck

Year: 2025

Conference: SEMANTiCS 2025

Abstract: This paper investigates whether state-of-the-art Large Language Models (LLMs) can automatically translate SPARQL between popular Knowledge Graph (KG) schemas. We focus on translations between the DBpedia and Wikidata KG, and later on DBLP and OpenAlex KG. This study addresses a notable gap in KG interoperability research by rigorously evaluating LLM performance on SPARQL-to-SPARQL translation. Two benchmarks are assembled, where the first align 100 DBpedia-Wikidata queries from QALD-9-Plus; the second contains 100 DBLP queries aligned to OpenAlex, testing generalizability beyond encyclopaedic KGs. Three open LLMs: Llama-3-8B, DeepSeek-R1-Distill-Llama-70B, and Mistral-Large-Instruct-2407 are selected based on their sizes and architectures and tested with zero-shot, few-shot, and two chain-of-thought variants. Outputs were compared with gold answers, and resulting errors were categorized. We find that the performance varies markedly across models and prompting strategies, and that translations for Wikidata to DBpedia work far better than translations for DBpedia to Wikidata.

Show BibTeX
@inproceedings{DBLP:conf/i-semantics/BartelsBU25,
  author       = {Malte Christian Bartels and
                  Debayan Banerjee and
                  Ricardo Usbeck},
  editor       = {Blerina Spahiu and
                  Sahar Vahdati and
                  Angelo A. Salatino and
                  Tassilo Pellegrini and
                  Giray Havur},
  title        = {Automating {SPARQL} Query Translations Between DBpedia and Wikidata},
  booktitle    = {Linking Meaning: Semantic Technologies Shaping the Future of {AI}
                  - Proceedings of the 21st International Conference on Semantic Systems,
                  SEMANTiCS 2025, Vienna, Austria, September 3-5, 2025},
  series       = {Studies on the Semantic Web},
  volume       = {62},
  pages        = {176--193},
  publisher    = {{IOS} Press},
  year         = {2025},
  url          = {https://doi.org/10.3233/SSW250019},
  doi          = {10.3233/SSW250019},
  timestamp    = {Tue, 24 Mar 2026 08:38:29 +0100},
  biburl       = {https://dblp.org/rec/conf/i-semantics/BartelsBU25.bib},
  bibsource    = {dblp computer science bibliography, https://dblp.org}
}