arXiv:2608.26117cs.DBcs.AI2026-08

用大模型驱动多智能体自动将关系数据库转为图数据库,提升查询效率与可解释性。

From SQL to Knowledge Graphs: An LLM-Driven Multi-Agent Approach with Data Schema Improvement

论文配图:From SQL to Knowledge Graphs: An LLM-Driven Multi-Agent Approach with Data Schema Improvement
图 1 · 摘自论文原文
  • 通过多智能体协作迭代优化图数据库模式设计
  • 在BFSI数据集上实现85.6%问答准确率,较SQL高出12.12%
  • 转换后查询延迟降低约3倍,适合复杂数据分析场景

关系型数据库(RDBMS)存在多跳查询慢、缺乏可视化解释等局限。相比之下,图数据库具有更直观高效的结构,适用于大规模数据。现有转换方法多依赖传统加载命令和Cypher查询,而利用大模型生成高效图模式以减少歧义的研究仍不足。本文提出一种新型算法,采用大模型驱动的ETL智能体标准化表与列名后存入数据集市;通过多智能体系统中ETL、分析与图智能体间的循环讨论,迭代优化最终模式设计。系统确保最终图数据库满足准确性、可依据性和忠实性三标准。该流程实现了端到端自动转换。实验基于1,081个BFSI数据集样本,在三个复杂度层级下验证:CypherAgent在图数据库上实现85.6%问答准确率,比PostgreSQL上SQLAgent高12.12%;同时查询延迟降低约3倍。

原文摘要 · Abstract (English)

RDBMS (Relational Database Management System) databases face several limitations, including slow execution with multi-hop queries and a lack of explainability by graphical interpretations. In contrast, Graph database offers a more intuitive and efficient data schema that performs faster execution on large datasets. Most existing RDBMS conversion pipelines focus on running traditional loading commands and relying on Cypher queries. However, the efficiency of using an LLM to generate an effective graph data schema, significantly reducing the ambiguity of the graph database, remains underexplored in the current research literature. This paper presents a novel algorithm that bridges RDBMS and graph database by using a novel LLM-powered ETL agent to standardize table and column names before saving them to the Data Mart. A Multi-Agent System generates a looping discussion between ETL, Analyzer, and Graph agents to optimize the final design through an iterative process of suggesting and scoring the graph database schema. We ensure that the final graph database meets three criteria before being accepted for data conversion: Accuracy, Groundedness, and Faithfulness. This system demonstrates an effective pipeline to automatically convert a tabular database into a graph database through a comprehensive end-to-end process. Our study highlights notable efficiency in using the converted graph database, which is measured on 1,081 samples of the BFSI dataset across three levels of complexity (easy, medium, and hard). Specifically, CypherAgent achieves an 85.6% accuracy for Q&A tasks using a Graph database, which is 12.12% higher than the accuracy achieved by an SQLAgent on the RDBMS database type PostgreSQL, for all queries. Additionally, the Graph database demonstrates faster performance, reducing latency by approximately 3 times.

图数据库多智能体LLM应用数据转换

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。