yifanfeng97/Hyper-Extract

GitHub Trending (daily) Tools

Summary

Hyper-Extract is an open-source CLI tool that uses LLMs to extract structured knowledge from unstructured documents, supporting various output formats like knowledge graphs and hypergraphs.

Transform unstructured text into structured knowledge with LLMs. Graphs, hypergraphs, and spatio-temporal extractions โ€” with one command.
Original Article
View Cached Full Text

Cached at: 06/18/26, 11:40 PM

yifanfeng97/Hyper-Extract

Source: https://github.com/yifanfeng97/Hyper-Extract

Hyper-Extract Logo

Smart Knowledge Extraction CLI

Transform documents into structured knowledge with one command.

๐Ÿ“– English Version ยท ไธญๆ–‡็‰ˆ

PyPI Version Python Version License Status Docs


โ€œStop reading. Start understanding.โ€
โ€œๅ‘Šๅˆซๆ–‡ๆกฃ็„ฆ่™‘๏ผŒ่ฎฉไฟกๆฏไธ€็›ฎไบ†็„ถโ€


Hero & Workflow

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 StructuresFrom simple Lists to advanced Graphs, Hypergraphs, and Spatio-Temporal Graphs
๐Ÿง  10+ Extraction EnginesGraphRAG, LightRAG, Hyper-RAG, KG-Gen, and more โ€” ready to use
๐Ÿ“ 80+ YAML TemplatesZero-code extraction across Finance, Legal, Medical, TCM, Industry, and General domains
๐Ÿ”„ Incremental EvolutionFeed new documents anytime to expand and refine your knowledge base

๐ŸŽฏ 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).

PlatformVerified Models
OpenAIgpt-4o, gpt-4o-mini, gpt-5
้˜ฟ้‡Œไบ‘็™พ็‚ผqwen-plus, qwen-turbo, deepseek-r1
Local vLLMQwen3.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).

๐Ÿ“– 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/
๐Ÿ 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?

FeatureGraphRAGLightRAGKG-GenATOMHyper-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:

Knowledge Structures Matrix

Example โ€” AutoGraph visualization:

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.
Architecture

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

ResourceLink
Full Documentationyifanfeng97.github.io/Hyper-Extract
CLI GuideCommand-line interface
Provider SystemModel compatibility & local deployment
Template Gallery80+ presets
ExamplesWorking code

๐Ÿค Contributing & License

Contributions are welcome! Please submit Issues and PRs.
Licensed under Apache-2.0.

โญ Star History

Star History Chart

Similar Articles