用大模型+上下文提示,让普通人也能轻松查询制造知识图谱。
Enhancing Manufacturing Knowledge Access with LLMs and Context-aware Prompting
- 通过注入知识图谱结构信息,提升大模型生成准确查询的能力。
- 在博世产线系统数据集上,正确率提升超40%。
- 适合想快速获取制造数据的工程师与非技术人员。
知识图谱(KG)已革新制造业的数据管理方式,通过共享的结构化概念模式整合异构数据源。然而,非专家用户常因需编写复杂SPARQL查询而难以利用其能力。随着大语言模型(LLMs)的发展,自然语言到SPARQL的自动转换成为可能,但如何向模型提供足够的领域上下文仍是一大挑战。本文评估了多种利用LLM作为中介从知识图谱中检索信息的策略,聚焦于制造领域,包括博世产线信息系统知识图谱(Bosch Line Information System KG)与工业4.0核心信息模型(I40 Core Information Model)。我们对比了不同方式将图谱上下文输入给LLM的效果,并分析其将实际问题转化为正确SPARQL查询的能力。结果表明,仅提供恰当的图谱模式上下文,即可显著提升大模型生成完整且准确查询的性能。这种上下文感知提示技术有助于模型聚焦于相关本体部分,降低幻觉风险。我们预期该方法能推动复杂数据仓库的普惠访问,助力制造场景中的智能决策。
原文摘要 · Abstract (English)
Knowledge graphs (KGs) have transformed data management within the manufacturing industry, offering effective means for integrating disparate data sources through shared and structured conceptual schemas. However, harnessing the power of KGs can be daunting for non-experts, as it often requires formulating complex SPARQL queries to retrieve specific information. With the advent of Large Language Models (LLMs), there is a growing potential to automatically translate natural language queries into the SPARQL format, thus bridging the gap between user-friendly interfaces and the sophisticated architecture of KGs. The challenge remains in adequately informing LLMs about the relevant context and structure of domain-specific KGs, e.g., in manufacturing, to improve the accuracy of generated queries. In this paper, we evaluate multiple strategies that use LLMs as mediators to facilitate information retrieval from KGs. We focus on the manufacturing domain, particularly on the Bosch Line Information System KG and the I40 Core Information Model. In our evaluation, we compare various approaches for feeding relevant context from the KG to the LLM and analyze their proficiency in transforming real-world questions into SPARQL queries. Our findings show that LLMs can significantly improve their performance on generating correct and complete queries when provided only the adequate context of the KG schema. Such context-aware prompting techniques help LLMs to focus on the relevant parts of the ontology and reduce the risk of hallucination. We anticipate that the proposed techniques help LLMs to democratize access to complex data repositories and empower informed decision-making in manufacturing settings.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。