ACM Transactions on the Web· 2026Q1
SPARQL-LLM: Real-Time SPARQL Query Generation from Natural Language Questions
- 3citations
- Q1SCImago
- 2026year
Short summary
SPARQL-LLM, an open-source, triplestore-agnostic system, generates SPARQL queries from natural language questions with up to 59% higher F1 score and 27x faster runtime than the second-best system, costing only $0.01 per question.
AI-generated from the title and abstract; the full text is not read.
Key points
- SPARQL-LLM achieves up to 59% higher F1 score compared to the second-best system in SPARQL query generation from natural language.
- The system demonstrates adaptability to high-resource languages like English, Spanish, and German, and can form complex bioinformatics queries.
- SPARQL-LLM is up to 27 times faster than the competing system and costs a maximum of $0.01 per question.
- The approach is triplestore-agnostic and powered by lightweight metadata for efficient query generation.
AI-generated from the title and abstract; the full text is not read.
Abstract
The advent of large language models is contributing to the emergence of novel approaches that promise to better tackle the challenge of generating structured queries, such as SPARQL queries, from natural language. However, these new approaches mostly focus on response accuracy while ignoring other evaluation criteria, such as runtime and cost to generate SPARQL queries. Consequently, they are often not production-ready or easy to deploy over real-world knowledge graphs with good accuracy. To mitigate these issues, in this paper, we describe and systematically evaluate SPARQL-LLM, an open-source and triplestore-agnostic approach, powered by lightweight metadata, that generates SPARQL queries from natural language text. First, we describe its architecture, which consists of dedicated components for metadata indexing, prompt building, and query generation and execution. Then, we evaluate it based on a state-of-the-art challenge with multilingual questions, and a collection of questions from three of the most prevalent knowledge graphs within the field of bioinformatics. Our results demonstrate a substantial improvement of up to \(59\% \) in F1 score over the second-best system participating in the challenge, adaptability to high-resource languages such as English, Spanish, and German, as well as ability to form complex bioinformatics queries. Furthermore, our results show that our system is up to 27 × faster than the second-best system participating in the challenge, while costing a maximum of $0.01 per question, making it suitable for real-time, low-cost text-to-SPARQL applications. SPARQL-LLM is publicly released as an open-source project at https://github.com/sib-swiss/sparql-llm and is currently deployed over real-world decentralized knowledge graphs at https://www.expasy.org/chat.
The authors' abstract, as published at the source. ACM Transactions on the Web, 2026 · DOI ↗
Continue with a free account
Ask the paper: 3 free questions a day about this paper; save it, get its citation, new summaries every day for your field. Takeaways are Premium.
Continue free on the webSign in with Google or Apple; no card needed. You come back to this paper.
On your phone:
Field: Molecular Biology
Molecular BiologyBiochemistry, Genetics and Molecular Biology