An intelligent, LLM-powered knowledge extraction and evolution framework with semantic search capabilities
Project description
Smart Knowledge Extraction CLI
Transform documents into structured knowledge with one command.
๐ English Version ยท ไธญๆ็
"Stop reading. Start understanding."
"ๅๅซๆๆกฃ็ฆ่๏ผ่ฎฉไฟกๆฏไธ็ฎไบ็ถ"
๐ฐ What's New
- ๐ MCP Server โ Query your knowledge abstracts from Claude Desktop and IDE agents with
he-mcp. (PR #40) - ๐ง Anthropic Claude Support โ Use
claude-opus-4-8,claude-sonnet-4-6, andclaude-haiku-4-5directly as your LLM provider. (PR #38) - ๐ Obsidian Export โ Turn any graph into an Obsidian vault with Markdown notes linked by
[[wikilinks]]. (PR #37) - ๐งน
he cleanโ Remove a KA's index or the whole knowledge abstract in one command. (PR #39) - ๐ง Reliability Fixes โ True mean for multi-chunk embeddings, capped OpenAI-compatible batch sizes, and resolved multi-word
llm_*merge strategies. (PRs #35, #36, #41)
See the full changelog in the GitHub releases.
Hyper-Extract is an intelligent, LLM-powered knowledge extraction and evolution framework. It radically simplifies transforming highly unstructured texts into persistent, predictable, and strongly-typed Knowledge Abstracts. It effortlessly extracts information into a wide spectrum of formatsโranging from simple Collections (Lists/Sets) and Pydantic Models, to complex Knowledge Graphs, Hypergraphs, and even Spatio-Temporal Graphs.
โจ Core Features
| ๐ท 8 Knowledge Structures | From simple Lists to advanced Graphs, Hypergraphs, and Spatio-Temporal Graphs |
| ๐ง 10+ Extraction Engines | GraphRAG, LightRAG, Hyper-RAG, KG-Gen, and more โ ready to use |
| ๐ 80+ YAML Templates | Zero-code extraction across Finance, Legal, Medical, TCM, Industry, and General domains |
| ๐ Incremental Evolution | Feed new documents anytime to expand and refine your knowledge base |
| ๐ค Obsidian Export | Turn any extracted graph into an Obsidian vault โ Markdown notes linked by [[wikilinks]] |
๐ฏ What Can You Do With It?
๐ Researcher โ Turn papers into knowledge graphs
Feed a 20-page academic paper, get an interactive graph of key concepts, authors, and citations.
he parse paper.pdf -t general/academic_graph -o ./paper_kb/
he show ./paper_kb/
๐ฆ Financial Analyst โ Extract entities from earnings reports
Automatically identify companies, executives, financial metrics, and their relationships from unstructured reports.
he parse earnings.md -t finance/earnings_graph -o ./finance_kb/
he search ./finance_kb/ "What are the key risk factors?"
๐ Local Deployment โ Keep data on-premise with vLLM
Run Qwen3.5-9B + bge-m3 locally via vLLM. No data leaves your machine.
from hyperextract import create_client
llm, emb = create_client(
llm="vllm:Qwen3.5-9B@http://localhost:8000/v1",
embedder="vllm:bge-m3@http://localhost:8001/v1",
api_key="dummy",
)
๐ Supported Platforms & Models
Hyper-Extract relies on the LLM's structured output capability (json_schema or Function Calling).
| Platform | Verified Models |
|---|---|
| OpenAI | gpt-4o, gpt-4o-mini, gpt-5 |
| Anthropic | claude-opus-4-8, claude-sonnet-4-6, claude-haiku-4-5 |
| ้ฟ้ไบ็พ็ผ | qwen-plus, qwen-turbo, deepseek-r1 |
| Local vLLM | Qwen3.5-9B (GPTQ-Marlin) |
Embedding models (semantic search) work with any OpenAI-compatible endpoint: text-embedding-3-small, text-embedding-v4 (Bailian), bge-m3 (local vLLM).
Anthropic note: Claude is used for the LLM (set
ANTHROPIC_API_KEY). Anthropic has no embeddings API, so pair it with an OpenAI-compatible embedder:from hyperextract import create_client llm, emb = create_client(llm="anthropic", embedder="openai:text-embedding-3-small")Requires the extra:
pip install 'hyperextract[anthropic]'.
๐ Full guide: Provider System & Local Model Support
โก 30-Second Quick Start
# Install
uv tool install hyperextract
# Configure API key
he config init -k YOUR_OPENAI_API_KEY
# Extract knowledge from a document
he parse examples/en/tesla.md -t general/biography_graph -o ./output/ -l en
# Query it
he search ./output/ "What are Tesla's major achievements?"
# Visualize
he show ./output/
# Export to an Obsidian vault (Markdown notes + [[wikilinks]])
he export obsidian ./output/ -o ./vault/
๐ Python API (click to expand)
uv pip install hyperextract
from hyperextract import Template
ka = Template.create("general/biography_graph")
with open("examples/en/tesla.md") as f:
result = ka.parse(f.read())
result.show()
๐ More examples: examples/en
๐ Why Hyper-Extract?
| Feature | GraphRAG | LightRAG | KG-Gen | ATOM | Hyper-Extract |
|---|---|---|---|---|---|
| Knowledge Graph | โ | โ | โ | โ | โ |
| Temporal Graph | โ | โ | โ | โ | โ |
| Spatial Graph | โ | โ | โ | โ | โ |
| Hypergraph | โ | โ | โ | โ | โ |
| Domain Templates | โ | โ | โ | โ | โ |
| Interactive CLI | โ | โ | โ | โ | โ |
| Multi-language | โ | โ | โ | โ | โ |
๐งฉ Supported Knowledge Structures
From simple to complex โ pick the right structure for your data:
Example โ AutoGraph visualization:
๐ What's under the hood? (Architecture & Templates)
Hyper-Extract follows a three-layer architecture:
- Auto-Types โ 8 strongly-typed data structures (Model, List, Set, Graph, Hypergraph, Temporal Graph, Spatial Graph, Spatio-Temporal Graph)
- Methods โ Extraction algorithms: KG-Gen, GraphRAG, LightRAG, Hyper-RAG, Cog-RAG, and more
- Templates โ 80+ presets across 6 domains. Zero-code setup.
Template example (Graph type):
language: en
name: Knowledge Graph
type: graph
tags: [general]
description: 'Extract entities and their relationships.'
output:
entities:
fields:
- name: name
type: str
- name: type
type: str
- name: description
type: str
relations:
fields:
- name: source
type: str
- name: target
type: str
- name: type
type: str
identifiers:
entity_id: name
relation_id: '{source}|{type}|{target}'
๐ Documentation & Resources
| Resource | Link |
|---|---|
| Full Documentation | yifanfeng97.github.io/Hyper-Extract |
| CLI Guide | Command-line interface |
| Provider System | Model compatibility & local deployment |
| Template Gallery | 80+ presets |
| Examples | Working code |
๐ MCP Server
Expose your knowledge abstracts to MCP-capable assistants (Claude Desktop, IDE agents) via the Model Context Protocol โ read + export only.
pip install 'hyperextract[mcp]'
he-mcp # stdio MCP server
Tools: list_templates, info, search, ask (RAG), export_obsidian. Full guide: MCP Server docs.
๐ค Contributing & License
Contributions are welcome! Please submit Issues and PRs.
Licensed under Apache-2.0.
๐ Security
This project has been security assessed by MseeP.ai.
โญ Star History
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hyperextract-0.3.0.tar.gz.
File metadata
- Download URL: hyperextract-0.3.0.tar.gz
- Upload date:
- Size: 168.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ff1e63e8753854102a61454990ea80cfdc9c67338eb12e5001bc7fc015c3ae7
|
|
| MD5 |
da531585ac00da2fd8949a903c690fcd
|
|
| BLAKE2b-256 |
4c3eed05a908c1050864dddc58f2449f14063f489ea70d7488a142baebc34b5f
|
Provenance
The following attestation bundles were made for hyperextract-0.3.0.tar.gz:
Publisher:
publish.yml on yifanfeng97/Hyper-Extract
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hyperextract-0.3.0.tar.gz -
Subject digest:
8ff1e63e8753854102a61454990ea80cfdc9c67338eb12e5001bc7fc015c3ae7 - Sigstore transparency entry: 1868880622
- Sigstore integration time:
-
Permalink:
yifanfeng97/Hyper-Extract@119c98f30e75c20028d5070fc75eb98218f508e1 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/yifanfeng97
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@119c98f30e75c20028d5070fc75eb98218f508e1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file hyperextract-0.3.0-py3-none-any.whl.
File metadata
- Download URL: hyperextract-0.3.0-py3-none-any.whl
- Upload date:
- Size: 226.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3b3b694a09ce616deef22fed4e637be602cd8313d3d22fbaf172a8d9fd3d071
|
|
| MD5 |
127384edda0709e02ce7feef6853ec35
|
|
| BLAKE2b-256 |
77e546705c8b06b5846c8f486f06d91961a01bfca8bdb3fe62f11398f83d33d2
|
Provenance
The following attestation bundles were made for hyperextract-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on yifanfeng97/Hyper-Extract
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hyperextract-0.3.0-py3-none-any.whl -
Subject digest:
b3b3b694a09ce616deef22fed4e637be602cd8313d3d22fbaf172a8d9fd3d071 - Sigstore transparency entry: 1868880788
- Sigstore integration time:
-
Permalink:
yifanfeng97/Hyper-Extract@119c98f30e75c20028d5070fc75eb98218f508e1 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/yifanfeng97
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@119c98f30e75c20028d5070fc75eb98218f508e1 -
Trigger Event:
release
-
Statement type: