SkillAgentSearch skills...

DeepKE

[EMNLP 2022] An Open Toolkit for Knowledge Graph Extraction and Construction

Install / Use

/learn @zjunlp/DeepKE

README

<p align="center"> <a href="https://github.com/zjunlp/deepke"> <img src="pics/logo.png" width="400"/></a> <p> <p align="center"> <a href="http://deepke.zjukg.cn"> <img alt="Documentation" src="https://img.shields.io/badge/demo-website-blue"> </a> <a href="https://pypi.org/project/deepke/#files"> <img alt="PyPI" src="https://img.shields.io/pypi/v/deepke"> </a> <a href="https://github.com/zjunlp/DeepKE/blob/master/LICENSE"> <img alt="GitHub" src="https://img.shields.io/github/license/zjunlp/deepke"> </a> <a href="http://zjunlp.github.io/DeepKE"> <img alt="Documentation" src="https://img.shields.io/badge/doc-website-red"> </a> <a href="https://colab.research.google.com/drive/1vS8YJhJltzw3hpJczPt24O0Azcs3ZpRi?usp=sharing"> <img alt="Open In Colab" src="https://colab.research.google.com/assets/colab-badge.svg"> </a> </p> <p align="center"> <b> English | <a href="https://github.com/zjunlp/DeepKE/blob/main/README_CN.md">简体中文</a> </b> </p> <h1 align="center"> <p>A Deep Learning Based Knowledge Extraction Toolkit<br>for Knowledge Graph Construction</p> </h1>

DeepKE is a knowledge extraction toolkit for knowledge graph construction supporting cnSchemalow-resource, document-level and multimodal scenarios for entity, relation and attribute extraction. We provide documents, online demo, paper, slides and poster for beginners.

If you encounter any issues during the installation of DeepKE and DeepKE-LLM, please check Tips or promptly submit an issue, and we will assist you with resolving the problem!

Table of Contents

<br>

What's New

  • June, 2025 We integrate the MCP service tools into DeepKE, enabling knowledge extraction through large language models (LLMs) as tool callers for lightweight models.
  • December, 2024 We open source the OneKE knowledge extraction framework, supporting multi-agent knowledge extraction across various scenarios.
  • April, 2024 We release a new bilingual (Chinese and English) schema-based information extraction model called OneKE based on Chinese-Alpaca-2-13B.
  • Feb, 2024 We release a large-scale (0.32B tokens) high-quality bilingual (Chinese and English) Information Extraction (IE) instruction dataset named IEPile, along with two models trained with IEPile, baichuan2-13b-iepile-lora and llama2-13b-iepile-lora.
  • Sep 2023 a bilingual Chinese English Information Extraction (IE) instruction dataset called InstructIE was released for the Instruction based Knowledge Graph Construction Task (Instruction based KGC), as detailed in here.
  • June, 2023 We update DeepKE-LLM to support knowledge extraction with KnowLM, ChatGLM, LLaMA-series, GPT-series etc.
  • Apr, 2023 We have added new models, including CP-NER(IJCAI'23), ASP(EMNLP'22), PRGC(ACL'21), PURE(NAACL'21), provided event extraction capabilities (Chinese and English), and offered compatibility with higher versions of Python packages (e.g., Transformers).
  • Feb, 2023 We have supported using LLM (GPT-3) with in-context learning (based on EasyInstruct) & data generation, added a NER model W2NER(AAAI'22).
<details> <summary><b>Previous News</b></summary> </details>

Prediction Demo

There is a demonstration of prediction. The GIF file is created by Terminalizer. Get the code. <img src="pics/demo.gif" width="636" height="494" align=center>

<br>

Model Framework

<h3 align="center"> <img src="pics/architectures.png"> </h3>
  • DeepKE contains a unified framework for named entity recognition, relation extraction and attribute extraction, the three knowledge extraction functions.
  • Each task can be implemented in different scenarios. For example, we can achieve relation extraction in standard, low-resource (few-shot), document-level and multimodal settings.
  • Each application scenario comprises of three components: Data including Tokenizer, Preprocessor and Loader, Model including Module, Encoder and Forwarder, Core including Training, Evaluation and Prediction.
<br>

Quick Start

DeepKE-LLM

In the era of large models, DeepKE-LLM utilizes a completel

Related Skills

View on GitHub
GitHub Stars4.4k
CategoryEducation
Updated3d ago
Forks744

Languages

Python

Security Score

100/100

Audited on Mar 25, 2026

No findings