用多智能体系统将自然语言转为Cypher查询,实现对属性图的智能访问。
Multi-Agent GraphRAG: A Text-to-Cypher Framework for Labeled Property Graphs
- 设计多智能体框架,自动将自然语言转为可执行的Cypher查询。
- 在CypherBench和IFC建筑数据集上验证,查询准确率显著提升。
- 适合工业数字孪生、智能运维等需要图数据交互的实际场景。
尽管检索增强生成(RAG)方法通常从非结构化文档中提取信息,但新兴的GraphRAG范式旨在利用知识图谱等结构化数据。现有研究多聚焦于资源描述框架(RDF)知识图谱,依赖三元组表示和SPARQL查询。然而,Cypher与标记属性图(LPG)数据库在GraphRAG流水线中作为可扩展推理引擎的潜力尚未被充分探索。为此,我们提出多智能体GraphRAG,一个用于文本到Cypher查询生成的模块化大模型智能体系统,作为面向基于LPG图数据的自然语言接口。该原型系统采用大模型工作流实现自动化的Cypher查询生成与执行,以Memgraph为后端图数据库。通过迭代的内容感知修正与归一化机制,并结合聚合反馈循环,确保生成查询在语义和语法上的优化。我们在涵盖多个通用领域的CypherBench图数据集上进行评估,同时展示了该工作流在来自IFC(行业基础类)数据的属性图上的性能表现,该图代表了一个建筑的数字孪生。这表明该方法能有效连接人工智能与真实世界应用,在规模化下支持工业数字自动化场景。
原文摘要 · Abstract (English)
While Retrieval-Augmented Generation (RAG) methods commonly draw information from unstructured documents, the emerging paradigm of GraphRAG aims to leverage structured data such as knowledge graphs. Most existing GraphRAG efforts focus on Resource Description Framework (RDF) knowledge graphs, relying on triple representations and SPARQL queries. However, the potential of Cypher and Labeled Property Graph (LPG) databases to serve as scalable and effective reasoning engines within GraphRAG pipelines remains underexplored in current research literature. To fill this gap, we propose Multi-Agent GraphRAG, a modular LLM agentic system for text-to-Cypher query generation serving as a natural language interface to LPG-based graph data. Our proof-of-concept system features an LLM-based workflow for automated Cypher queries generation and execution, using Memgraph as the graph database backend. Iterative content-aware correction and normalization, reinforced by an aggregated feedback loop, ensures both semantic and syntactic refinement of generated queries. We evaluate our system on the CypherBench graph dataset covering several general domains with diverse types of queries. In addition, we demonstrate performance of the proposed workflow on a property graph derived from the IFC (Industry Foundation Classes) data, representing a digital twin of a building. This highlights how such an approach can bridge AI with real-world applications at scale, enabling industrial digital automation use cases.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。