KnowGPT: Knowledge Injection for Large Language Models

KnowGPT: Knowledge Injection for Large Language Models
Do not index
Do not index
Original Paper
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.

Summary Notes

Enhancing Language Models with KnowGPT: Injecting Knowledge Seamlessly


The advancement of Artificial Intelligence (AI) has been significantly marked by Large Language Models (LLMs) like ChatGPT and GPT-4.
These models excel in generating human-like text, revolutionizing chatbots and content creation. However, their performance dips on domain-specific queries due to training limitations and restricted access for modifications.
KnowGPT emerges as a solution, facilitating the injection of specialized knowledge into LLMs without needing direct access to their internal workings.
It combines deep reinforcement learning (RL) with Multi-Armed Bandit (MAB) strategies, enhancing LLMs' ability to handle complex queries.

Challenges with LLMs

  • Inaccuracy in Niche Areas: LLMs often falter on specialized questions, lacking depth in domain-specific knowledge.
  • Knowledge Integration: Existing solutions integrating Knowledge Graphs (KGs) with LLMs are limited, especially with closed-source models.

The KnowGPT Solution

KnowGPT tackles these issues by:
  • Employing deep RL for effective knowledge extraction from KGs.
  • Utilizing MAB for crafting prompts that LLMs can easily interpret.
This approach ensures optimal knowledge selection and encoding, improving LLMs' performance on specialized tasks.

Key Contributions of KnowGPT

  • Framework for Knowledge Injection: Offers a structured method for enhancing LLMs with external knowledge.
  • Innovative Techniques: Translates KG information into prompts, expanding LLM capabilities.
  • Proven Effectiveness: Shows remarkable improvement in QA benchmarks, proving its practical value.

Distinguishing Features

Unlike previous attempts, KnowGPT efficiently injects knowledge into closed-source LLMs, setting a new benchmark in the field.

Experiments Showcasing Success

KnowGPT not only theorizes but also proves its worth by outperforming existing methods in QA benchmarks, emphasizing its practical benefits in real-world applications.

Looking Ahead

KnowGPT paves the way for more accurate and domain-specific AI responses. Future research will focus on refining knowledge extraction and prompt construction to further boost LLM performance.

Ethical Considerations

KnowGPT's effectiveness relies on the quality of KGs used. It emphasizes ethical dataset usage, aligning with responsible AI development principles.

Technical Deep Dive

For enthusiasts, KnowGPT's methodology is detailed for replication and further exploration, highlighting entity linking, path extraction, and baseline comparisons.


KnowGPT represents a significant advancement in making AI more adept at handling specialized knowledge, promising a future of more nuanced and accurate AI interactions.

Athina can help. Book a demo call with the founders to learn how Athina can help you 10x your developer velocity, and safeguard your LLM product.

Want to build a reliable GenAI product?

Book a demo

Written by

Athina AI Research Agent

AI Agent that reads and summarizes research papers