Graph Query Generation with Constraint-guided Large Language Agents
- URL: http://arxiv.org/abs/2605.00845v1
- Date: Thu, 09 Apr 2026 21:50:47 GMT
- Title: Graph Query Generation with Constraint-guided Large Language Agents
- Abstract summary: UniQGen is a constraint-based framework that extracts and refines representative graph query clauses.<n>We demonstrate that UniQGen outperforms state-of-the-art graph query generation techniques in both accuracy and efficiency.<n>We release Cypher outputs and a Neptune-ready Freebase snapshot to support cross-language KGQA research.
- Score: 9.418317695662516
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Knowledge Graph Question Answering (KGQA) has advanced through structured query generation, yet most efforts target RDF/SPARQL, leaving Cypher and property graphs underexplored, despite increasing demand for unified KGQA in industry settings. We propose UniQGen, a novel constraint-based framework that employs LLM agents to dynamically extract and refine representative graph query clauses into executable, intent-aligned graph queries across query languages. The foundation of our method is a variant of Chase & Backchase, a family of algorithms for query optimization and reformulation. We extend Chase & Backchase with a dynamic reasoning process over query constraints that also interact with LLMs for query quality estimation. With a Cypher-supported Freebase graph deployed on Amazon Neptune, we extensively evaluate our approach on popular KGQA benchmarks (GraphQ, GrailQA, and WebQSP). We demonstrate that UniQGen outperforms state-of-the-art graph query generation techniques in both accuracy and efficiency, with F1 gains of 31.6% on GraphQ and 4.9% on GrailQA. Unlike prior methods, our framework does not require fine-tuning for schema matching, making it more extensible to schema-less graphs and semantics in query workloads, and is more suitable for enterprise-grade KGQA. We release Cypher outputs and a Neptune-ready Freebase snapshot to support reproducible, cross-language KGQA research.
Related papers
- Search-on-Graph: Iterative Informed Navigation for Large Language Model Reasoning on Knowledge Graphs [26.0585592684229]
Large language models (LLMs) have demonstrated impressive reasoning abilities yet remain unreliable on knowledge-intensive, multi-hop questions.<n>We propose Search-on-Graph (SoG), a simple yet effective framework that enables LLMs to perform iterative informed graph navigation.<n>We demonstrate particularly strong gains on Wikidata benchmarks (+16% improvement over previous best methods) alongside consistent improvements on Freebase benchmarks.
arXiv Detail & Related papers (2025-10-09T21:20:16Z) - Query-Centric Graph Retrieval Augmented Generation [15.423162448800134]
QCG-RAG is a query-centric graph RAG framework that enables query-granular indexing and multi-hop chunk retrieval.<n> Experiments on LiHuaWorld and MultiHop-RAG show that QCG-RAG consistently outperforms prior chunk-based and graph-based RAG methods in question answering accuracy.
arXiv Detail & Related papers (2025-09-25T14:35:44Z) - Enrich-on-Graph: Query-Graph Alignment for Complex Reasoning with LLM Enriching [61.824094419641575]
Large Language Models (LLMs) struggle with hallucinations and factual errors in knowledge-intensive scenarios like knowledge graph question answering (KGQA)<n>We attribute this to the semantic gap between structured knowledge graphs (KGs) and unstructured queries, caused by inherent differences in their focuses and structures.<n>Existing methods usually employ resource-intensive, non-scalable reasoning on vanilla KGs, but overlook this gap.<n>We propose a flexible framework, Enrich-on-Graph (EoG), which leverages LLMs' prior knowledge to enrich KGs, bridge the semantic gap between graphs and queries.
arXiv Detail & Related papers (2025-09-25T06:48:52Z) - The benefits of query-based KGQA systems for complex and temporal questions in LLM era [55.20230501807337]
Large language models excel in question-answering (QA) yet still struggle with multi-hop reasoning and temporal questions.<n> Query-based knowledge graph QA (KGQA) offers a modular alternative by generating executable queries instead of direct answers.<n>We explore multi-stage query-based framework for WikiData QA, proposing multi-stage approach that enhances performance on challenging multi-hop and temporal benchmarks.
arXiv Detail & Related papers (2025-07-16T06:41:03Z) - A Query-Aware Multi-Path Knowledge Graph Fusion Approach for Enhancing Retrieval-Augmented Generation in Large Language Models [3.0748861313823]
QMKGF is a Query-Aware Multi-Path Knowledge Graph Fusion Approach for Enhancing Retrieval Augmented Generation.<n>We design prompt templates and employ general-purpose LLMs to extract entities and relations.<n>We introduce a multi-path subgraph construction strategy that incorporates one-hop relations, multi-hop relations, and importance-based relations.
arXiv Detail & Related papers (2025-07-07T02:22:54Z) - Effective Instruction Parsing Plugin for Complex Logical Query Answering on Knowledge Graphs [51.33342412699939]
Knowledge Graph Query Embedding (KGQE) aims to embed First-Order Logic (FOL) queries in a low-dimensional KG space for complex reasoning over incomplete KGs.
Recent studies integrate various external information (such as entity types and relation context) to better capture the logical semantics of FOL queries.
We propose an effective Query Instruction Parsing (QIPP) that captures latent query patterns from code-like query instructions.
arXiv Detail & Related papers (2024-10-27T03:18:52Z) - Neural Graph Reasoning: Complex Logical Query Answering Meets Graph
Databases [63.96793270418793]
Complex logical query answering (CLQA) is a recently emerged task of graph machine learning.
We introduce the concept of Neural Graph Database (NGDBs)
NGDB consists of a Neural Graph Storage and a Neural Graph Engine.
arXiv Detail & Related papers (2023-03-26T04:03:37Z) - Better Query Graph Selection for Knowledge Base Question Answering [2.367061689316429]
This paper presents a novel approach based on semantic parsing to improve the performance of Knowledge Base Question Answering (KBQA)
Specifically, we focus on how to select an optimal query graph from a candidate set so as to retrieve the answer from knowledge base (KB)
arXiv Detail & Related papers (2022-04-27T01:53:06Z) - Knowledge Base Question Answering by Case-based Reasoning over Subgraphs [81.22050011503933]
We show that our model answers queries requiring complex reasoning patterns more effectively than existing KG completion algorithms.
The proposed model outperforms or performs competitively with state-of-the-art models on several KBQA benchmarks.
arXiv Detail & Related papers (2022-02-22T01:34:35Z) - Outlining and Filling: Hierarchical Query Graph Generation for Answering
Complex Questions over Knowledge Graph [16.26384829957165]
We propose a new two-stage approach to build query graphs.
In the first stage, the top-$k$ related instances are collected by simple strategies.
In the second stage, a graph generation model performs hierarchical generation.
arXiv Detail & Related papers (2021-11-01T07:08:46Z) - RnG-KBQA: Generation Augmented Iterative Ranking for Knowledge Base
Question Answering [57.94658176442027]
We present RnG-KBQA, a Rank-and-Generate approach for KBQA.
We achieve new state-of-the-art results on GrailQA and WebQSP datasets.
arXiv Detail & Related papers (2021-09-17T17:58:28Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.