摘要
大型语言模型(Large Language Models,LLM)已经成为现今主流的研究热点,而垂直领域行业大模型则成为落地应用的关键点,以医疗为代表的大型语言模型有着可解释性、可靠性、高安全性等要求。针对这类问题,提出MedKGGPT模型,一个基于ChatGLM的模型,并提出一种面向医疗领域的知识图谱(Knowledge Graphs,KGs)和LLM相结合的框架。框架主要包含两个部分:首先,通过KG三元组中的实体和关系,提出了一种基于KG结构数据的提示工程方法,使得LLM更加具有医学领域的专用知识,提高LLM的可解释性;其次,提出一种利用KG来对齐LLM的方法,将LLM的输出与KG的相关知识进行比较,验证LLM输出结果的一致性和准确性,从而增强了LLM在医疗领域的安全性。实验结果表明,最终生成的MedKGGPT模型能够输出更加具有安全性的结果,说明KG能够有效增强LLM的可解释性,为LLM应用在医疗领域提供了帮助。
Large Language Models(LLMs)have become a mainstream research focus,while large models in vertical industries have become the key to practical applications.LLMs,represented by the medical field,require interpretability,reliability,and high security.To address these issues,we propose the MedKGGPT,a model based on ChatGLM,and a framework that combines Knowledge Graphs(KGs)and LLMs specifically for the medical field.The framework mainly contains two parts.Firstly,through the entities and relationships in the triples of the KGs,we propose a prompt engineering method based on the structural data of the KGs,which makes the LLM more specialized in medical knowledge and improves the LLM's interpretability.Secondly,we propose a method of aligning the LLM with the KGs.This involves comparing the output of the LLM with the related knowledge in the KGs,verifying the consistency and accuracy of the LLM output,thereby enhancing the security of the LLM in the medical field.Experimental results demonstrate that the final MedKGGPT can output more secure results.It is indicated that KGs can effectively enhance the interpretability of the LLM,providing assistance for the application of LLMs in the medical field.
作者
顾鹏辉
李涛
高阳
GU Peng-hui;LI Tao;GAO Yang(School of Computer Science and Technology,Wuhan University of Science and Technology,Wuhan 430065,China;Hubei Province Key Laboratory of Intelligent Information Processingand Real-time Industrial System,Wuhan University of Science and Technology,Wuhan 430065,China)
出处
《计算机技术与发展》
2024年第6期178-184,共7页
Computer Technology and Development
基金
武汉市重点研发计划(2022012202015070)
武汉东湖新技术开发区“揭榜挂帅”项目(2022KJB126)。