Text2Cypher: Bridging Natural Language and Graph Databases

Makbule Gulcin Ozsoy, Leila Messallem, Jon Besga, Gianandrea Minneci
12/13/2024
cs.LG

No confident code implementation found for this paper.

Abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{ozsoy2024textcypher,
  title  = {Text2Cypher: Bridging Natural Language and Graph Databases},
  author = {Makbule Gulcin Ozsoy and Leila Messallem and Jon Besga and Gianandrea Minneci},
  year   = {2024},
  eprint = {2412.10064},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.10064v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2412.10064.svg)](https://codeofpaper.com/paper/2412.10064)

Discussion