A Benchmark to Understand the Role of Knowledge Graphs on Large Language Model's Accuracy for Question Answering on Enterprise SQL Databases

📄 arXiv: 2311.07509v1 📥 PDF

作者: Juan Sequeda, Dean Allemang, Bryon Jacob

分类: cs.AI, cs.CL, cs.DB

发布日期: 2023-11-13

备注: 34 pages


💡 一句话要点

提出知识图谱提升LLM在企业SQL数据库问答准确性

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 知识图谱 大型语言模型 SQL数据库 问答系统 企业应用 准确性提升

📋 核心要点

  1. 现有方法在企业SQL数据库问答中准确性不足,缺乏针对企业环境的有效基准。
  2. 本研究提出了一个包含企业SQL模式和知识图谱的基准,以评估LLM的问答能力。
  3. 实验结果显示,使用知识图谱后,GPT-4的问答准确率从16%提升至54%,显著提高了系统性能。

📝 摘要(中文)

大型语言模型(LLMs)在企业SQL数据库问答中的应用前景广阔,但其准确性尚不明确,尤其缺乏针对企业环境的Text-to-SQL基准。本研究旨在评估LLM在企业问题和SQL数据库中的问答准确性,并探讨知识图谱(KGs)在提升准确性方面的作用。我们引入了一个基准,包含保险领域的企业SQL模式、各种企业查询以及定义知识图谱的本体和映射。研究发现,使用GPT-4直接对SQL数据库进行零-shot问答时,准确率为16%;而在知识图谱表示下,准确率提升至54%。因此,投资知识图谱能显著提高LLM驱动的问答系统的准确性。

🔬 方法详解

问题定义:本研究旨在解决大型语言模型在企业SQL数据库问答中的准确性问题,现有方法缺乏针对企业环境的有效基准,导致准确性不高。

核心思路:通过引入知识图谱,提供业务上下文,增强LLM的问答能力,从而提升准确性。研究设计了一个包含企业SQL模式和知识图谱的基准,以便进行系统评估。

技术框架:整体架构包括三个主要模块:企业SQL模式、企业查询集以及知识图谱的本体和映射。首先,构建保险领域的SQL模式,然后设计多样化的企业查询,最后整合知识图谱以提供上下文信息。

关键创新:本研究的创新点在于结合知识图谱与LLM进行问答,显著提升了问答准确性。与传统方法相比,知识图谱为LLM提供了更丰富的上下文信息,改善了模型的理解能力。

关键设计:在实验中,使用了GPT-4作为基础模型,采用零-shot学习策略进行问答。知识图谱的构建涉及定义本体和映射关系,以确保信息的准确传递和上下文的有效利用。实验通过对比分析验证了知识图谱的有效性。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果表明,使用GPT-4进行零-shot问答时,准确率为16%;而在知识图谱的支持下,准确率提升至54%。这一显著提升验证了知识图谱在增强LLM问答能力中的重要作用,展示了其在企业应用中的潜力。

🎯 应用场景

该研究的潜在应用领域包括企业智能分析、客户支持系统和数据驱动决策等。通过提升LLM在SQL数据库问答中的准确性,企业能够更高效地获取信息,优化业务流程,增强决策能力,未来可能对企业数据管理和分析产生深远影响。

📄 摘要(原文)

Enterprise applications of Large Language Models (LLMs) hold promise for question answering on enterprise SQL databases. However, the extent to which LLMs can accurately respond to enterprise questions in such databases remains unclear, given the absence of suitable Text-to-SQL benchmarks tailored to enterprise settings. Additionally, the potential of Knowledge Graphs (KGs) to enhance LLM-based question answering by providing business context is not well understood. This study aims to evaluate the accuracy of LLM-powered question answering systems in the context of enterprise questions and SQL databases, while also exploring the role of knowledge graphs in improving accuracy. To achieve this, we introduce a benchmark comprising an enterprise SQL schema in the insurance domain, a range of enterprise queries encompassing reporting to metrics, and a contextual layer incorporating an ontology and mappings that define a knowledge graph. Our primary finding reveals that question answering using GPT-4, with zero-shot prompts directly on SQL databases, achieves an accuracy of 16%. Notably, this accuracy increases to 54% when questions are posed over a Knowledge Graph representation of the enterprise SQL database. Therefore, investing in Knowledge Graph provides higher accuracy for LLM powered question answering systems.