Graph Query Generation with Constraint-guided Large Language Agents
On the map: LLM agents and tool use → Web, search, and research agents
Abstract (arXiv)
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.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Web, search, and research agents, one of 16 directions in LLM agents and tool use. Builds on 21 of its 53 references that are in the map. First posted on arXiv 9 Apr 2026.
Builds on
21 of 53 references.
References · 21
- 2023StructGPT: A General Framework for Large Language Model to Reason over Structured Datacited by 343
- 2023Reasoning on Graphs: Faithful and Interpretable Large Language Model Reasoningcited by 328
- 2024G-Retriever: Retrieval-Augmented Generation for Textual Graph Understanding and Question Answeringcited by 223
- 2020Beyond I.I.D.: Three Levels of Generalization for Question Answering on Knowledge Basescited by 171
- 2024Graph Chain-of-Thought: Augmenting Large Language Models by Reasoning on Graphscited by 119
- 2021Case-based Reasoning for Natural Language Queries over Knowledge Basescited by 107
- 2022UniKGQA: Unified Retrieval and Reasoning for Solving Multi-hop Question Answering Over Knowledge Graphcited by 103
- 2021Improving Multi-hop Knowledge Base Question Answering by Learning Intermediate Supervision Signalscited by 101
- 2022Compositional Semantic Parsing with Large Language Modelscited by 95
- 2021RnG-KBQA: Generation Augmented Iterative Ranking for Knowledge Base Question Answeringcited by 86
- 2022TIARA: Multi-grained Retrieval for Robust Question Answering over Large Knowledge Basescited by 59
- 2022Don't Generate, Discriminate: A Proposal for Grounding Language Models to Real-World Environmentscited by 57
9 more
- 2023FlexKBQA: A Flexible LLM-Powered Framework for Few-Shot Knowledge Base Question Answeringcited by 51
- 2022ArcaneQA: Dynamic Program Induction and Contextualized Encoding for Knowledge Base Question Answeringcited by 48
- 2020A Review on Fact Extraction and Verificationcited by 29
- 2024CypherBench: Towards Precise Retrieval over Full-scale Modern Knowledge Graphs in the LLM Eracited by 16
- 2022GraphQ IR: Unifying the Semantic Parsing of Graph Query Languages with One Intermediate Representationcited by 13
- 2023Code-Style In-Context Learning for Knowledge-Based Question Answeringcited by 13
- 2023Bring Your Own KG: Self-Supervised Program Synthesis for Zero-Shot KGQAcited by 11
- 2023A Comprehensive Evaluation of Neural SPARQL Query Generation from Natural Language Questionscited by 9
- 2023Bridging graph data models: RDF, RDF-star, and property graphs as directed acyclic graphscited by 1
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2024Towards Evaluating Large Language Models for Graph Query Generation
- 2026KGVoyager: Knowledge Graph Agnostic Question Answering via Agentic Navigation
- 2026MARS: Multi-hop Adaptive Retrieval and SPARQL Generation for KGQA
- 2025From Graph Retrieval to Schema Realization: Counterfactual Validation for Text-to-SPARQL over Heterogeneous Knowledge Graphs
- 2026RouterKGQA: Specialized--General Model Routing for Constraint-Aware Knowledge Graph Question Answering
- 2025GraphRAFT: Retrieval Augmented Fine-Tuning for Knowledge Graphs on Graph Databases
- 2025RJE: A Retrieval-Judgment-Exploration Framework for Efficient Knowledge Graph Question Answering with LLMs
- 2026Constrained Entity Selection under Partial Knowledge for LLM-Based Knowledge Graph QA