# Text2Cypher: Bridging Natural Language and Graph Databases

arXiv: https://arxiv.org/abs/2412.10064 · HTML: https://mlsanity.com/paper/2412.10064/

## Key facts

- Cited by 30 papers in the map (data through 14 Oct 2026).
- Builds on 17 of its 37 references that are in the map.
- First posted on arXiv 13 Dec 2024.

## Builds on (most cited first, 17 of 17)

- [Training language models to follow instructions with human feedback](https://mlsanity.com/paper/2203.02155/) (2022)
- [Evaluating Large Language Models Trained on Code](https://mlsanity.com/paper/2107.03374/) (2021)
- [Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Task](https://mlsanity.com/paper/1809.08887/) (2018)
- [Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLs](https://mlsanity.com/paper/2305.03111/) (2023)
- [Compositional Semantic Parsing on Semi-Structured Tables](https://mlsanity.com/paper/1508.00305/) (2015)
- [DS-1000: A Natural and Reliable Benchmark for Data Science Code Generation](https://mlsanity.com/paper/2211.11501/) (2022)
- [LEVER: Learning to Verify Language-to-Code Generation with Execution](https://mlsanity.com/paper/2302.08468/) (2023)
- [GPT4Graph: Can Large Language Models Understand Graph Structured Data ? An Empirical Evaluation and Benchmarking](https://mlsanity.com/paper/2305.15066/) (2023)
- [RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQL](https://mlsanity.com/paper/2302.05965/) (2023)
- [Rethinking Benchmark and Contamination for Language Models with Rephrased Samples](https://mlsanity.com/paper/2311.04850/) (2023)
- [Variational Reasoning for Question Answering with Knowledge Graph](https://mlsanity.com/paper/1709.04071/) (2017)
- [JuICe: A Large Scale Distantly Supervised Dataset for Open Domain Context-based Code Generation](https://mlsanity.com/paper/1910.02216/) (2019)
- [SyntheT2C: Generating Synthetic Data for Fine-Tuning Large Language Models on the Text2Cypher Task](https://mlsanity.com/paper/2406.10710/) (2024)
- [Metasql: A Generate-then-Rank Framework for Natural Language to SQL Translation](https://mlsanity.com/paper/2402.17144/) (2024)
- [Nebula Graph: An open source distributed graph database](https://mlsanity.com/paper/2206.07278/) (2022)
- [S2CTrans: Building a bridge from SPARQL to Cypher](https://mlsanity.com/paper/2304.00531/) (2023)
- [Rel2Graph: Automated Mapping From Relational Databases to a Unified Property Knowledge Graph](https://mlsanity.com/paper/2310.01080/) (2023)

## Built on by (most cited first, 30 of 30)

- [Graph RAG-Tool Fusion](https://mlsanity.com/paper/2502.07223/) (2025)
- [BYOKG-RAG: Multi-Strategy Graph Retrieval for Knowledge Graph Question Answering](https://mlsanity.com/paper/2507.04127/) (2025)
- [Multi-agent systems for chemical engineering: A review and perspective](https://mlsanity.com/paper/2508.07880/) (2025)
- [GraphRAFT: Retrieval Augmented Fine-Tuning for Knowledge Graphs on Graph Databases](https://mlsanity.com/paper/2504.05478/) (2025)
- [Enhancing Text2Cypher with Schema Filtering](https://mlsanity.com/paper/2505.05118/) (2025)
- [STRuCT-LLM: Unifying Tabular and Graph Reasoning with Reinforcement Learning for Semantic Parsing](https://mlsanity.com/paper/2506.21575/) (2025)
- [Agent-as-a-Graph: Knowledge Graph-Based Tool and Agent Retrieval for LLM Multi-Agent Systems](https://mlsanity.com/paper/2511.18194/) (2025)
- [Text2Cypher Across Languages: Evaluating and Finetuning LLMs](https://mlsanity.com/paper/2506.21445/) (2025)
- [Theory-Level Autoformalization: From Isolated Statements to Unified Formal Knowledge Bases](https://mlsanity.com/paper/2607.13292/) (2026)
- [ZOGRASCOPE: A New Benchmark for Semantic Parsing over Property Graphs](https://mlsanity.com/paper/2503.05268/) (2025)
- [Grounding Large Language Models in Reaction Knowledge Graphs for Synthesis Retrieval](https://mlsanity.com/paper/2601.16038/) (2026)
- [Unlocking Electronic Health Records: A Hybrid Graph RAG Approach to Safe Clinical AI for Patient QA](https://mlsanity.com/paper/2602.00009/) (2025)
- [A Human-in-the-Loop, LLM-Centered Architecture for Knowledge-Graph Question Answering](https://mlsanity.com/paper/2602.05512/) (2026)
- [GraphWalk: Enabling Reasoning in Large Language Models through Tool-Based Graph Navigation](https://mlsanity.com/paper/2604.01610/) (2026)
- [Extending Confidence-Based Text2Cypher with Grammar and Schema Aware Filtering](https://mlsanity.com/paper/2605.10318/) (2026)
- [CYGNET: Cypher Gate for Neural Execution Triage and Cost Containment](https://mlsanity.com/paper/2606.04645/) (2026)
- [PIPE-Cypher: Automatic Enterprise Benchmark Generation for Text-to-Cypher Systems](https://mlsanity.com/paper/2606.08481/) (2026)
- [Achieving Precise Text-To-Cypher Via Grounded Knowledge Graph Data Generation](https://mlsanity.com/paper/2606.14325/) (2026)
- [Natural Language Interaction with Databases on Edge Devices in the Internet of Battlefield Things](https://mlsanity.com/paper/2506.06396/) (2025)
- [Multi-turn Natural Language to Graph Query Language Translation](https://mlsanity.com/paper/2508.01871/) (2025)
- [Skeletons Matter: Dynamic Data Augmentation for Text-to-Query](https://mlsanity.com/paper/2511.18934/) (2025)
- [Conversational No-code, Multi-agentic Disease Module Identification and Drug Repurposing Prediction with ChatDRex](https://mlsanity.com/paper/2511.21438/) (2025)
- [NGDBench: Towards Neural Graph Data Management](https://mlsanity.com/paper/2603.05529/) (2026)
- [LLM+Graph@VLDB'2025 Workshop Summary](https://mlsanity.com/paper/2604.02861/) (2026)
- [Toward Multi-Database Query Reasoning for Text2Cypher](https://mlsanity.com/paper/2605.10373/) (2026)
- [OmniRetrieval: Unified Retrieval across Heterogeneous Knowledge Sources](https://mlsanity.com/paper/2605.29250/) (2026)
- [Executable Schema Contracts: From Automatic Ingestion to Multi-Source Retrieval](https://mlsanity.com/paper/2606.05415/) (2026)
- [KG2Cypher: Data-Centric Pipeline for Building Enterprise Text-to-Cypher Systems](https://mlsanity.com/paper/2606.27742/) (2026)
- [What Drives Recovery in Agentic Text-to-Cypher? LAST-CQ: An LLM Agent Self-Refinement Framework](https://mlsanity.com/paper/2609.12746/) (2026)
- [CypherTurn: A Multi-Turn Benchmark for Conversational Text-to-Cypher Evaluation and the Autonomy Divergence](https://mlsanity.com/paper/2609.36987/) (2026)

## Abstract (arXiv)

Knowledge graphs use nodes, relationships, and properties to represent arbitrarily complex data. When stored in a graph database, the Cypher query language enables efficient modeling and querying of knowledge graphs. However, using Cypher requires specialized knowledge, which can present a challenge for non-expert users. Our work Text2Cypher aims to bridge this gap by translating natural language queries into Cypher query language and extending the utility of knowledge graphs to non-technical expert users. While large language models (LLMs) can be used for this purpose, they often struggle to capture complex nuances, resulting in incomplete or incorrect outputs. Fine-tuning LLMs on domain-specific datasets has proven to be a more promising approach, but the limited availability of high-quality, publicly available Text2Cypher datasets makes this challenging. In this work, we show how we combined, cleaned and organized several publicly available datasets into a total of 44,387 instances, enabling effective fine-tuning and evaluation. Models fine-tuned on this dataset showed significant performance gains, with improvements in Google-BLEU and Exact Match scores over baseline models, highlighting the importance of high-quality datasets and fine-tuning in improving Text2Cypher performance.
