Graph Queries from Natural Language using Constrained Language Models and Visual Editing

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Kantz, Benedikt, Innerebner, Kevin, Waldert, Peter, Lengauer, Stefan, Lex, Elisabeth, Schreck, Tobias
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866912739802218496
author Kantz, Benedikt
Innerebner, Kevin
Waldert, Peter
Lengauer, Stefan
Lex, Elisabeth
Schreck, Tobias
author_facet Kantz, Benedikt
Innerebner, Kevin
Waldert, Peter
Lengauer, Stefan
Lex, Elisabeth
Schreck, Tobias
contents Querying knowledge bases using ontologies is usually performed using dedicated query languages, question-answering systems, or visual query editors for Knowledge Graphs. We propose a novel approach that enables users to query the knowledge graph by specifying prototype graphs in natural language and visually editing them. This approach enables non-experts to formulate queries without prior knowledge of the ontology and specific query languages. Our approach converts natural language to these prototype graphs by utilizing a two-step constrained language model generation based on semantically similar features within an ontology. The resulting prototype graph serves as the building block for further user refinements within a dedicated visual query builder. Our approach consistently generates a valid SPARQL query within the constraints imposed by the ontology, without requiring any additional corrections to the syntax or classes and links used. Unlike related language models approaches, which often require multiple iterations to fix invalid syntax, non-existent classes, and non-existent links, our approach achieves this consistently. We evaluate the performance of our system using graph retrieval on synthetic queries, comparing multiple metrics, models, and ontologies. We further validate our system through a preliminary user study. By utilizing our constrained pipeline, we show that the system can perform efficient and accurate retrieval using more efficient models compared to other approaches.
format Preprint
id arxiv_https___arxiv_org_abs_2512_00948
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Graph Queries from Natural Language using Constrained Language Models and Visual Editing
Kantz, Benedikt
Innerebner, Kevin
Waldert, Peter
Lengauer, Stefan
Lex, Elisabeth
Schreck, Tobias
Human-Computer Interaction
Querying knowledge bases using ontologies is usually performed using dedicated query languages, question-answering systems, or visual query editors for Knowledge Graphs. We propose a novel approach that enables users to query the knowledge graph by specifying prototype graphs in natural language and visually editing them. This approach enables non-experts to formulate queries without prior knowledge of the ontology and specific query languages. Our approach converts natural language to these prototype graphs by utilizing a two-step constrained language model generation based on semantically similar features within an ontology. The resulting prototype graph serves as the building block for further user refinements within a dedicated visual query builder. Our approach consistently generates a valid SPARQL query within the constraints imposed by the ontology, without requiring any additional corrections to the syntax or classes and links used. Unlike related language models approaches, which often require multiple iterations to fix invalid syntax, non-existent classes, and non-existent links, our approach achieves this consistently. We evaluate the performance of our system using graph retrieval on synthetic queries, comparing multiple metrics, models, and ontologies. We further validate our system through a preliminary user study. By utilizing our constrained pipeline, we show that the system can perform efficient and accurate retrieval using more efficient models compared to other approaches.
title Graph Queries from Natural Language using Constrained Language Models and Visual Editing
topic Human-Computer Interaction
url https://arxiv.org/abs/2512.00948