π€ AI Summary
This work addresses the challenges of high construction costs and difficulties in language grounding for natural language query interfaces over enterprise private knowledge graphs, particularly underperforming in short-query and schema-paraphrasing scenarios. The authors propose KG2Cypher, a novel data-centric Text-to-Cypher framework that automatically generates high-quality textβCypher pairs from the knowledge graph itself. The approach integrates candidate-aware supervised fine-tuning (SFT) data generation, category-conditional schema prompting, entity retrieval, and efficient LoRA-based fine-tuning, complemented by an LLM-driven automatic evaluation pipeline and human validation. Evaluated on Korean enterprise use cases, the method achieves execution F1 scores of 0.950 and 0.920 for broadcast program and company queries, respectively, and attains 95.2% exact match accuracy, 99.9% execution rate, and 0.964 F1 on an 11-way classification task.
π Abstract
Enterprise Knowledge Graphs (KGs) are increasingly used for internal search, analytics, and question answering, but building natural-language interfaces for private enterprise graphs remains costly. We present KG2Cypher, a data-centric pipeline for building enterprise text-to-Cypher systems from existing KGs. KG2Cypher first constructs an executable Cypher query from observed graph facts and then uses LLMs to generate its associated natural-language question. The resulting Text-Cypher pairs are validated with an LLM judge and human validation, and are converted into candidate-aware SFT data. The trained generator is served with class-conditioned schema prompting, entity retrieval, and LoRA-based inference. We evaluate KG2Cypher in Korean enterprise settings, where short search-style queries and schema paraphrases make language grounding difficult. LoRA SFT improves execution-result F1 from 0.806 to 0.950 on broadcast-program queries and from 0.70 to 0.92 on company queries. In an 11-class setting, KG2Cypher achieves 95.2% exact match, 99.9% execution rate, and 0.964 execution-result F1.