# Enhancing SPARQL Query Rewriting for Complex Ontology Alignments

arXiv: https://arxiv.org/abs/2505.01309 · HTML: https://mlsanity.com/paper/2505.01309/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 1 of its 25 references that are in the map.
- First posted on arXiv 2 May 2025.

## Builds on (most cited first, 1 of 1)

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)

## Abstract (arXiv)

SPARQL query rewriting is a fundamental mechanism for uniformly querying heterogeneous ontologies in the Linked Data Web. However, the complexity of ontology alignments, particularly rich correspondences (c : c), makes this process challenging. Existing approaches primarily focus on simple (s : s) and partially complex ( s : c) alignments, thereby overlooking the challenges posed by more expressive alignments. Moreover, the intricate syntax of SPARQL presents a barrier for non-expert users seeking to fully exploit the knowledge encapsulated in ontologies. This article proposes an innovative approach for the automatic rewriting of SPARQL queries from a source ontology to a target ontology, based on a user's need expressed in natural language. It leverages the principles of equivalence transitivity as well as the advanced capabilities of large language models such as GPT-4. By integrating these elements, this approach stands out for its ability to efficiently handle complex alignments, particularly (c : c) correspondences , by fully exploiting their expressiveness. Additionally, it facilitates access to aligned ontologies for users unfamiliar with SPARQL, providing a flexible solution for querying heterogeneous data.
