LLM-Based Natural Language to SPARQL Translation over Domain-Specific Knowledge Graph.
Saved in:
| Title: | LLM-Based Natural Language to SPARQL Translation over Domain-Specific Knowledge Graph. |
|---|---|
| Authors: | Rasheed, Mohammed H.1 mhameed001@ikasle.ehu.eus, Aguado, Marina1 |
| Source: | Knowledge Organization. Dec2025, Vol. 52 Issue 8, p1-13. 13p. |
| Subjects: | Language models, Domain-specific programming languages, Knowledge graphs, SPARQL (Computer program language), Semantic Web |
| Abstract: | Semantic web applications are witnessing a dramatic increase in complexity, data volume, and usage. Likewise, large language models (LLMs) are experiencing significant developments in performance and capabilities. Consequently, LLMs have been utilized in various fields and applications to support primary and secondary tasks. The proven ability of LLMs to process natural language (NL) has opened the door to integration into many tasks, including NL-related tasks such as Knowledge Graph Question Answering (KGQA), which involves translating NL questions into SPARQL queries to retrieve answers from Knowledge Graphs (KG). However, answering questions over domain-specific KGs is challenging due to complex schema structures, specialized vocabularies, and query complexity. Therefore, the development of domain-agnostic and user-friendly KG querying mechanisms has become necessary. Motivated by this need, this paper presents an LLM based approach for translating NL questions into SPARQL queries over domain-specific KG by investigating how various configurations of augmented KG data influence LLM responses. Our approach adopts a streamlined method for zero-shot SPARQL query generation by augmenting LLMs with different arrangements of previously extracted domain-specific KG information. Specifically, our experiments evaluate LLM generated SPARQL responses against twenty manually crafted questions of varying complexity using prompts augmented with different KG information: first, a reduced linearized KG, and second, discrete vocabulary information extracted from a reduced ontology KG. The results indicate that supplementing LLM prompts with discrete vocabulary information extracted from a reduced KG ontology yields competitive performance levels for the target LLM models compared to supplementing them with a reduced ontology. Ultimately, our approach reduces the augmented KG information size while preserving response accuracy, enables off-domain users to interact with domain-specific KG information and retrieve responses through a domain-agnostic interface, and facilitates benchmarking over a wide spectrum of LLM models. [ABSTRACT FROM AUTHOR] |
| Copyright of Knowledge Organization is the property of IMR Press and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract. (Copyright applies to all Abstracts.) | |
| Database: | Engineering Source |
| FullText | Links: – Type: pdflink Text: Availability: 0 |
|---|---|
| Header | DbId: egs DbLabel: Engineering Source An: 190679489 AccessLevel: 6 PubType: Academic Journal PubTypeId: academicJournal PreciseRelevancyScore: 0 |
| IllustrationInfo | |
| Items | – Name: Title Label: Title Group: Ti Data: LLM-Based Natural Language to SPARQL Translation over Domain-Specific Knowledge Graph. – Name: Author Label: Authors Group: Au Data: <searchLink fieldCode="AR" term="%22Rasheed%2C+Mohammed+H%2E%22">Rasheed, Mohammed H.</searchLink><relatesTo>1</relatesTo><i> mhameed001@ikasle.ehu.eus</i><br /><searchLink fieldCode="AR" term="%22Aguado%2C+Marina%22">Aguado, Marina</searchLink><relatesTo>1</relatesTo> – Name: TitleSource Label: Source Group: Src Data: <searchLink fieldCode="JN" term="%22Knowledge+Organization%22">Knowledge Organization</searchLink>. Dec2025, Vol. 52 Issue 8, p1-13. 13p. – Name: Subject Label: Subjects Group: Su Data: <searchLink fieldCode="DE" term="%22Language+models%22">Language models</searchLink><br /><searchLink fieldCode="DE" term="%22Domain-specific+programming+languages%22">Domain-specific programming languages</searchLink><br /><searchLink fieldCode="DE" term="%22Knowledge+graphs%22">Knowledge graphs</searchLink><br /><searchLink fieldCode="DE" term="%22SPARQL+%28Computer+program+language%29%22">SPARQL (Computer program language)</searchLink><br /><searchLink fieldCode="DE" term="%22Semantic+Web%22">Semantic Web</searchLink> – Name: Abstract Label: Abstract Group: Ab Data: Semantic web applications are witnessing a dramatic increase in complexity, data volume, and usage. Likewise, large language models (LLMs) are experiencing significant developments in performance and capabilities. Consequently, LLMs have been utilized in various fields and applications to support primary and secondary tasks. The proven ability of LLMs to process natural language (NL) has opened the door to integration into many tasks, including NL-related tasks such as Knowledge Graph Question Answering (KGQA), which involves translating NL questions into SPARQL queries to retrieve answers from Knowledge Graphs (KG). However, answering questions over domain-specific KGs is challenging due to complex schema structures, specialized vocabularies, and query complexity. Therefore, the development of domain-agnostic and user-friendly KG querying mechanisms has become necessary. Motivated by this need, this paper presents an LLM based approach for translating NL questions into SPARQL queries over domain-specific KG by investigating how various configurations of augmented KG data influence LLM responses. Our approach adopts a streamlined method for zero-shot SPARQL query generation by augmenting LLMs with different arrangements of previously extracted domain-specific KG information. Specifically, our experiments evaluate LLM generated SPARQL responses against twenty manually crafted questions of varying complexity using prompts augmented with different KG information: first, a reduced linearized KG, and second, discrete vocabulary information extracted from a reduced ontology KG. The results indicate that supplementing LLM prompts with discrete vocabulary information extracted from a reduced KG ontology yields competitive performance levels for the target LLM models compared to supplementing them with a reduced ontology. Ultimately, our approach reduces the augmented KG information size while preserving response accuracy, enables off-domain users to interact with domain-specific KG information and retrieve responses through a domain-agnostic interface, and facilitates benchmarking over a wide spectrum of LLM models. [ABSTRACT FROM AUTHOR] – Name: AbstractSuppliedCopyright Label: Group: Ab Data: <i>Copyright of Knowledge Organization is the property of IMR Press and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract.</i> (Copyright applies to all Abstracts.) |
| PLink | https://search.ebscohost.com/login.aspx?direct=true&site=eds-live&db=egs&AN=190679489 |
| RecordInfo | BibRecord: BibEntity: Identifiers: – Type: doi Value: 10.31083/KO42705 Languages: – Code: eng Text: English PhysicalDescription: Pagination: PageCount: 13 StartPage: 1 Subjects: – SubjectFull: Language models Type: general – SubjectFull: Domain-specific programming languages Type: general – SubjectFull: Knowledge graphs Type: general – SubjectFull: SPARQL (Computer program language) Type: general – SubjectFull: Semantic Web Type: general Titles: – TitleFull: LLM-Based Natural Language to SPARQL Translation over Domain-Specific Knowledge Graph. Type: main BibRelationships: HasContributorRelationships: – PersonEntity: Name: NameFull: Rasheed, Mohammed H. – PersonEntity: Name: NameFull: Aguado, Marina IsPartOfRelationships: – BibEntity: Dates: – D: 01 M: 12 Text: Dec2025 Type: published Y: 2025 Identifiers: – Type: issn-print Value: 09437444 Numbering: – Type: volume Value: 52 – Type: issue Value: 8 Titles: – TitleFull: Knowledge Organization Type: main |
| ResultId | 1 |