What is Hyper-Extract?
Hyper-Extract is a command-line tool that converts unstructured documents into structured knowledge. It sits in the Parsing & Ingestion category of the Retrieval & Knowledge (RAG) tools and is open-source, written in Python and licensed Apache-2.0. To get started: install the CLI.
Overview
Hyper-Extract is a command-line tool that converts unstructured documents into structured knowledge. You point it at a file, pick one of its YAML templates, and it produces a knowledge structure you can query: the project supports nine of them, from raw chunk corpora and simple lists up to graphs, hypergraphs and spatio-temporal graphs. The pitch on the repository is blunt — "Transform documents into structured knowledge with one command."
Extraction is pluggable rather than a single fixed algorithm. The project ships more than eleven extraction engines, including a zero-cost `chunk_rag` baseline plus GraphRAG, LightRAG, Hyper-RAG and KG-Gen, and more than eighty YAML templates covering finance, legal, medical, traditional Chinese medicine, industry and general domains. Ingestion goes beyond plain text: with the `ingest` extra it reads PDF, Word, PowerPoint, Excel, HTML and EPUB.
Around extraction sit the parts that make a knowledge base maintainable. Every fact is attributed to the source document it came from, so you can audit contributions with `he info --sources`, roll a document back, or upsert a newer version of a source and have the old facts retire. Results can be searched with tag scoping, visualised, or exported to an Obsidian vault as Markdown notes linked by wikilinks. Models are configured per provider — OpenAI and Alibaba Bailian supply both LLM and embeddings, while Anthropic, Google Gemini and DeepSeek are LLM-only and pair with an OpenAI-compatible embedder, or you can point everything at a local vLLM server.
What it does
- Nine knowledge structures, from chunk corpora and lists up to graphs, hypergraphs and spatio-temporal graphs
- Eleven-plus extraction engines including a zero-cost chunk_rag baseline, GraphRAG, LightRAG, Hyper-RAG and KG-Gen
- Over eighty YAML templates across finance, legal, medical, TCM, industry and general domains — no code to write
- Rich document ingestion for PDF, Word, PowerPoint, Excel, HTML and EPUB via the `ingest` extra
- Incremental evolution with provenance: audit which document contributed what, roll back a document, or upsert an updated source
- Obsidian export that turns an extracted graph into Markdown notes linked by wikilinks
- Provider-agnostic configuration for OpenAI, Anthropic, Google Gemini, DeepSeek, Alibaba Bailian or a local vLLM server
Getting started
Hyper-Extract needs Python 3.11+ and installs as a CLI called `he`. Install it, configure one model provider, then extract and query a document.
Install the CLI
The README installs it as a uv tool; pipx works too.
# Install uv first (if you haven't)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install Hyper-Extract CLI
uv tool install hyperextract
# or: pipx install hyperextractConfigure a provider
OpenAI and Bailian give you the LLM and embeddings in one key. Anthropic, Gemini and DeepSeek are LLM-only, so pair them with an OpenAI-compatible embedder. A local vLLM pair needs no cloud key.
# OpenAI (LLM + embeddings in one key)
he config init -p openai -k YOUR_OPENAI_API_KEY
# DeepSeek (LLM only — pair with an OpenAI embedder)
he config llm -p deepseek -k YOUR_DEEPSEEK_API_KEY
he config embedder -p openai -k YOUR_OPENAI_API_KEY
# Local vLLM (on-premise)
he config llm -p vllm -u http://localhost:8000/v1 -k dummy -m Qwen/Qwen3.5-9B
he config embedder -p vllm -u http://localhost:8001/v1 -k dummy -m BAAI/bge-m3Extract, query and visualise
Pick a template with `-t`, write the result to an output directory, then search or display it.
# 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/Keep it current and auditable
Feed an updated version of a source under the same name and the old facts roll back. Tags scope searches, and `he info --sources` shows which documents contributed what.
he feed ./output/ updated-tesla.md --source tesla.md
he tag ./output/ --source tesla.md --add biography
he search ./output/ "inventions" --tag biography
he info ./output/ --sourcesOr drive it from Python
The same templates are available through a small Python API.
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()Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Reach for it to turn a stack of papers or reports into a browsable knowledge graph instead of reading them end to end
- Reach for it when you want to compare extraction strategies — chunk baseline against GraphRAG, LightRAG or Hyper-RAG — without rewriting a pipeline for each
- Reach for it for domain extraction where a template already exists, across finance, legal, medical or industrial documents
- Reach for it when provenance matters: you need to know which source produced a fact, and to retire it when that source changes
How Hyper-Extract compares
Hyper-Extract alongside other open-source parsing & ingestion tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| MarkItDown | ★ 199k | A Microsoft Python utility that converts many file types, including Office docs and PDFs, into Markdown for LLMs. |
| MinerU | ★ 84.6k | A document extraction tool that converts PDFs and Office files into clean Markdown or JSON, with strong handling of complex layouts and CJK content. |
| Docling | ★ 71.2k | An IBM-originated document conversion pipeline that turns PDF, DOCX, PPTX, HTML, and more into structured, LLM-ready Markdown or JSON. |
| Marker | ★ 41.1k | A fast pipeline that converts PDFs and other documents to Markdown, JSON, or HTML while preserving tables, equations, and formatting. |
| OpenDataLoader PDF | ★ 30.4k | OpenDataLoader PDF turns any PDF into structured Markdown, JSON, or HTML with bounding boxes, and auto-tags untagged files into screen-reader-ready Tagged PDFs. |
| Repomix | ★ 29.5k | Repomix packs an entire repository into one file that is easy to feed to AI tools like Claude, ChatGPT, and Gemini. |
| Unstructured | ★ 15.8k | A library for ingesting and preprocessing many document types into clean, chunked elements ready for RAG pipelines. |
| Hyper-Extract | ★ 4.3k | Turn documents into graphs, hypergraphs or chunk corpora from one CLI |
