Generative Large Language Models (LLMs), such as ChatGPT, offer interactive APIs that can answer common questions at a human-expert level. However, these models often give inaccurate or incorrect responses when faced with questions requiring domain-specific or professional-specific knowledge not covered in their training corpus. Furthermore, many state-of-the-art LLMs are not open-source, making it challenging to inject knowledge with model APIs only. In this work, we introduce KnowGPT, a black-box knowledge injection framework for LLMs in question answering. KnowGPT leverages deep reinforcement learning (RL) to extract relevant knowledge from Knowledge Graphs (KGs) and use Multi-Armed Bandit (MAB) to construct the most suitable prompt for each question. Our extensive experiments on three benchmark datasets showcase that KnowGPT significantly enhances the existing methods. Notably, KnowGPT achieves an average improvement of 23.7% over ChatGPT and an average improvement of 2.9% over GPT-4. Additionally, KnowGPT attains a 91.6% accuracy on the OpenbookQA official leaderboard, which is comparable to human-level performance.
翻译:生成式大语言模型(LLM),如ChatGPT,通过交互式API能以人类专家水平回答常见问题。然而,当面临需要训练语料未涵盖的领域特定或专业特定知识的问题时,这些模型往往给出不准确或错误的回答。此外,许多最先进的LLM并非开源,这使得仅通过模型API注入知识变得困难。在本工作中,我们提出KnowGPT——一种面向LLM问答的黑盒知识注入框架。KnowGPT利用深度强化学习从知识图谱(KG)中提取相关知识,并采用多臂赌博机(MAB)为每个问题构建最合适的提示。在三个基准数据集上的大量实验表明,KnowGPT显著提升了现有方法的表现。值得注意的是,KnowGPT相比ChatGPT平均提升23.7%,相比GPT-4平均提升2.9%。此外,KnowGPT在OpenbookQA官方排行榜上达到91.6%的准确率,与人类水平相当。