Towards Evaluating Large Language Models for Graph Query Generation
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) are revolutionizing the landscape of Generative Artificial Intelligence (GenAI), with innovative LLM-backed solutions emerging rapidly. However, when applied to database technologies, specifically query generation for graph databases and Knowledge Graphs (KGs), LLMs still face significant challenges. While research on LLM-driven query generation for Structured Query Language (SQL) exists, similar systems for graph databases remain underdeveloped. This paper presents a comparative study addressing the challenge of generating Cypher queries a powerful language for interacting with graph databases using open-access LLMs. We rigorously evaluate several LLM agents (OpenAI ChatGPT 4o, Claude Sonnet 3.5, Google Gemini Pro 1.5, and a locally deployed Llama 3.1 8B) using a designed few-shot learning prompt and Retrieval Augmented Generation (RAG) backed by Chain-of-Thoughts (CoT) reasoning. Our empirical analysis of query generation accuracy reveals that Claude Sonnet 3.5 outperforms its counterparts in this specific domain. Further, we highlight promising future research directions to address the identified limitations and advance LLM-driven query generation for graph databases.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 11 of its 21 references that are in the map. First posted on arXiv 13 Nov 2024.
Builds on
11 of 21 references.
References · 11
- 2022Generate rather than Retrieve: Large Language Models are Strong Context Generatorscited by 296
- 2023Query Rewriting for Retrieval-Augmented Large Language Modelscited by 211
- 2023Query2doc: Query Expansion with Large Language Modelscited by 146
- 2022Prompting Is Programming: A Query Language for Large Language Modelscited by 110
- 2024AgentLite: A Lightweight Library for Building and Advancing Task-Oriented LLM Agent Systemcited by 53
- 2024WorkBench: a Benchmark Dataset for Agents in a Realistic Workplace Settingcited by 47
- 2024Copilot Evaluation Harness: Evaluating LLM-Guided Software Programmingcited by 13
- 2021How to Query Language Models?cited by 11
- 2022Reinforcement Learning and Bandits for Speech and Language Processing: Tutorial, Review and Outlookcited by 10
- 2024Synthetic Query Generation using Large Language Models for Virtual Assistantscited by 9
- 2023Context-Driven Interactive Query Simulations Based on Generative Large Language Modelscited by 3
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Graph Query Generation with Constraint-guided Large Language Agents
- 2026A Human-in-the-Loop, LLM-Centered Architecture for Knowledge-Graph Question Answering
- 2025GraphRAFT: Retrieval Augmented Fine-Tuning for Knowledge Graphs on Graph Databases
- 2024NAT-NL2GQL: A Novel Multi-Agent Framework for Translating Natural Language to Graph Query Language
- 2026LLMs+Graphs: Toward Graph-Native, Synergistic AI Systems
- 2026GraphSeek: Next-Generation Graph Analytics with LLMs
- 2026UltRAG: a Universal Simple Scalable Recipe for Knowledge Graph RAG
- 2023LLMs for Knowledge Graph Construction and Reasoning: Recent Capabilities and Future Opportunities