Context-aware few-shot learning SPARQL query generation from natural language on an aviation knowledge graph

Question answering over domain-specific knowledge graphs implies several challenges. It requires sufficient knowledge of the world and the domain to understand what is being asked, familiarity with the knowledge graph?s structure to build a correct query, and knowledge of the query language. However...

Descripción completa

Detalles Bibliográficos
Autores: Hernández Camero, Inés Virginia, García López, Eva|||0000-0002-7598-3289, García Cabot, Antonio|||0000-0002-0298-3237, Caro Álvaro, Sergio|||0000-0002-3192-8499
Tipo de recurso: artículo
Fecha de publicación:2025
País:España
Institución:Universidad de Alcalá (UAH)
Repositorio:e_Buah Biblioteca Digital Universidad de Alcalá
Idioma:inglés
OAI Identifier:oai:ebuah.uah.es:10017/67457
Acceso en línea:http://hdl.handle.net/10017/67457
https://dx.doi.org/10.3390/make7020052
Access Level:acceso abierto
Palabra clave:Knowledge graphs
SPARQL
Query generation
Prompting
Large language models
Informática
Computer science
Descripción
Sumario:Question answering over domain-specific knowledge graphs implies several challenges. It requires sufficient knowledge of the world and the domain to understand what is being asked, familiarity with the knowledge graph?s structure to build a correct query, and knowledge of the query language. However, mastering all of these is a time-consuming task. This work proposes a prompt-based approach that enables natural language to generate SPARQL queries. By leveraging the advanced language capabilities of large language models (LLMs), we constructed prompts that include a natural-language question, relevant contextual information from the domain-specific knowledge graph, and several examples of how the task should be executed. To evaluate our method, we applied it to an aviation knowledge graph containing accident report data. Our approach improved the results of the original work?in which the aviation knowledge graph was first introduced?by 6%, demonstrating its potential for enhancing SPARQL query generation for domain-specific knowledge graphs.