arXiv:2412.07412cs.CLcs.AI2024-12被引 5

用大模型直接生成知识图谱,提升结构准确性和生成效率

Generating Knowledge Graphs from Large Language Models: A Comparative Study of GPT-4, LLaMA 2, and BERT

  • 用GPT-4、LLaMA 2等大模型从非结构化数据直接构建知识图谱
  • GPT-4在语义一致性和结构准确性上最优,F1-score达0.89
  • 适合需要快速构建高质量图谱的开发者和研究者

知识图谱(KGs)是图检索增强生成系统(GraphRAG)功能的关键,这类系统在需要结构化推理和语义理解的任务中表现优异。然而,传统方法在准确性和可扩展性方面存在局限,导致为GraphRAG构建知识图谱仍具挑战。本文提出一种新方法,利用GPT-4、LLaMA 2(13B)和BERT等大语言模型,直接从非结构化数据生成知识图谱,跳过传统流水线。通过精确率、召回率、F1分数、图编辑距离和语义相似性等指标评估模型生成高质量知识图谱的能力。结果表明,GPT-4在语义保真度和结构准确性上表现最佳,其F1-score达到0.89;LLaMA 2在轻量级、领域特定图谱构建中优势明显;BERT则揭示了实体-关系建模中的关键挑战。本研究证实大模型能有效简化知识图谱创建流程,提升GraphRAG在真实场景中的可用性,并为后续发展奠定基础。

原文摘要 · Abstract (English)

Knowledge Graphs (KGs) are essential for the functionality of GraphRAGs, a form of Retrieval-Augmented Generative Systems (RAGs) that excel in tasks requiring structured reasoning and semantic understanding. However, creating KGs for GraphRAGs remains a significant challenge due to accuracy and scalability limitations of traditional methods. This paper introduces a novel approach leveraging large language models (LLMs) like GPT-4, LLaMA 2 (13B), and BERT to generate KGs directly from unstructured data, bypassing traditional pipelines. Using metrics such as Precision, Recall, F1-Score, Graph Edit Distance, and Semantic Similarity, we evaluate the models' ability to generate high-quality KGs. Results demonstrate that GPT-4 achieves superior semantic fidelity and structural accuracy, LLaMA 2 excels in lightweight, domain-specific graphs, and BERT provides insights into challenges in entity-relationship modeling. This study underscores the potential of LLMs to streamline KG creation and enhance GraphRAG accessibility for real-world applications, while setting a foundation for future advancements.

知识图谱大模型GraphRAG生成

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