Skip to content

Hypergraph is more powerful. Transform unstructured text into structured knowledge with LLMs. Graphs, hypergraphs, and spatio-temporal extractions — with one command.

chore: clean up empty code change sections in the changes log

yifanfeng97c82122719ded
diff --git a/README.md b/README.md
index be6df86..2d8462b 100644
--- a/README.md
+++ b/README.md
@@ -14,22 +14,16 @@ Transform documents into **knowledge abstracts** — with just one command.
[📖 English Version](./README.md) · [中文版](./README_ZH.md)
----
-
## 🚀 What is Hyper-Extract?
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 summaries. 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**.
![Hero & Workflow](docs/assets/hero-v2.jpg)
-*A seamless pipeline from messy documents to neat structured nodes.*
-
----
-
## ✨ Core Features
- 🔷 **8 Auto-Types:** From basic `AutoModel`/`AutoList` to advanced `AutoGraph`, `AutoHypergraph`, and `AutoSpatioTemporalGraph`.
-- 🧠 **10+ Extraction Engines:** Out-of-the-box support for cutting-edge retrieval paradigms like `graph_rag`, `light_rag`, and `cog_rag`.
+- 🧠 **10+ Extraction Engines:** Out-of-the-box support for cutting-edge retrieval paradigms like `graph_rag`, `light_rag`, and `hyper_rag`.
- 📝 **Declarative YAML Templates:** Zero-code extraction definition. Includes 80+ presets across 6 domains.
- 🔄 **Incremental Evolution:** Feed new documents on the fly to continuously map out and expand the extracted knowledge.
@@ -46,7 +40,8 @@ uv pip install hyper-extract
### 2. The Command Line Way
Extract, search, and manage directly from CLI.
-*(Note: By default, the CLI relies on `gpt-4o-mini` as the foundation model and `text-embedding-3-small` for embeddings to balance performance and speed.)*
+
+> By default, the CLI uses `gpt-4o-mini` and `text-embedding-3-small`.
```bash
he config init -k YOUR_API_KEY
@@ -65,42 +60,50 @@ ka = Template.create("finance/event_timeline")
# Extract and auto-parse the document
result = ka.parse(annual_report_text)
-# result.timeline yields beautifully parsed list of Event objects!
```
> 🔗 For detailed CLI usage, see [CLI Guide](./hyperextract/cli/README.md)
----
+<details>
+<summary><b>🛠️ How to define a Knowledge Template (YAML)?</b></summary>
+<br>
+
+Zero-code approach to define what to extract from incoming texts:
+
+```yaml
+name: Event Timeline
+description: Extract financial events and their temporal relations.
+type: TemporalGraph
+schema:
+ nodes:
+ - type: Event
+ properties:
+ - name: description
+ type: string
+ edges:
+ - type: Timeline
+ source: Event
+ target: Event
+ properties:
+ - name: relation
+ type: string
+```
+</details>
## 🧩 Deep Dive: The 8 Auto-Types
Our framework embraces complexity without making you write boilerplate code.
-4
-![Knowledge Structures Matrix](docs/assets/8-types-v2.jpg)
-
-| Auto-Type | Best For | Real-World Example |
-|-----------|----------|--------------------|
-| **Model** | Structured reports | Financial summaries |
-| **List** | Ordered items | Meeting actions |
-| **Set** | Deduplicated queries | Product catalogs |
-| **Graph** | Binary relationships | Social networks |
-| **Hypergraph** | Multi-party events | Contract disputes |
-| **TemporalGraph** | Time sequencing | News timelines |
-| **SpatialGraph** | Geolocation | Delivery routes |
-| **SpatioTemporalGraph**| Time & Space hybrid | Historical battles |
----
+![Knowledge Structures Matrix](docs/assets/8-types-v3.jpg)
## 🛠️ Architecture Overview
-The system is built on a robust triad: **Auto-Types** (Multi-typed knowledge structures definition), **Templates** (Declarative extraction schema), and **Methods** (The LLM Execution strategy).
+The system is built on a robust triad: **Auto-Types** (Multi-typed structures), **Methods** (The Execution strategy), and **Templates** (Declarative schema).
-![Architecture](docs/assets/architecture-v4.png)
+![Architecture](docs/assets/architecture-v5.jpg)
-- **Design Guide**: [Template Design Guide](./hyperextract/templates/DESIGN_GUIDE.md)
-- **Preset Templates**: [presets directory](./hyperextract/templates/presets/)
-
----
+* **Design Guide**: [Template Design Guide](./hyperextract/templates/DESIGN_GUIDE.md)
+* **Preset Templates**: [presets directory](./hyperextract/templates/presets/)
## 📈 Comparison with Other Libraries
@@ -113,25 +116,15 @@ The system is built on a robust triad: **Auto-Types** (Multi-typed knowledge str
| Domain Templates | ❌ | ❌ | ❌ | ❌ | ✅ |
| CLI Tool | ❌ | ❌ | ❌ | ❌ | ✅ |
| Multi-language | Partial | ❌ | ❌ | ❌ | ✅ |
-| Visualization | Partial | ❌ | ❌ | ❌ | ✅ |
-
----
## 📚 Related Documentation
-| Documentation | Description |
-|---------------|-------------|
-| [CLI Guide](./hyperextract/cli/README.md) | Complete CLI reference |
-| [Template Gallery](./hyperextract/templates/) | 38+ domain templates |
-| [Example Code](./examples/) | Python API examples |
-| [Full Documentation](./docs/) | Architecture & implementation |
+* [CLI Guide](./hyperextract/cli/README.md)
+* [Template Gallery](./hyperextract/templates/)
+* [Example Code](./examples/)
+* [Full Documentation](./docs/)
----
-
-## 🤝 Contributing
+## 🤝 Contributing & License
Contributions are welcome! Please submit Issues and PRs.
-
-## 📄 License
-
-Apache-2.0
+Licensed under **Apache-2.0**.
diff --git a/README_ZH.md b/README_ZH.md
index 97fe8f8..b6949ea 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -14,22 +14,16 @@
[📖 English Version](./README.md) · [中文版](./README_ZH.md)
----
-
## 🚀 什么是 Hyper-Extract?
Hyper-Extract 是一个智能的、由大语言模型(LLM)驱动的知识提取与演进框架。它极大地简化了将杂乱不堪的文本转化为持久化、强类型的知识摘要的过程。无论从基础的**集合(Collection/List)**和**结构化模型(Model)**,还是到高阶复杂的**知识图谱(Knowledge Graph)**、**超图(Hypergraph)**,甚至是**时空图谱(Spatio-Temporal Graph)**,它都能轻松拿捏。
![Hero & Workflow](docs/assets/hero-v2.jpg)
-*从混沌杂乱的文档到清晰条理结构化知识节点的无缝管线。*
-
----
-
## ✨ 核心亮点
- 🔷 **8大自动数据结构(Auto-Types):** 从基础的 `AutoModel`/`AutoList` 到高阶的 `AutoGraph`, `AutoHypergraph`, 以及 `AutoSpatioTemporalGraph`(时空图)。
-- 🧠 **10+ 前沿提取引擎:** 开箱即用整合了业界顶尖的检索范式,例如 `graph_rag`, `light_rag`, 和 `cog_rag`。
+- 🧠 **10+ 前沿提取引擎:** 开箱即用整合了业界顶尖的检索范式,例如 `graph_rag`, `light_rag`, 和 `hyper_rag`。
- 📝 **声明式 YAML 模板:** 零代码定义提取策略。内置覆盖 6 大领域的 80+ 预设模板。
- 🔄 **知识增量演进:** 支持动态喂入新文档(Feed),让提取的知识图谱自动补全和扩展。
@@ -45,8 +39,9 @@ uv pip install hyper-extract
### 2. CLI 命令行玩法
-仅仅几行命令即可完整体验提取、搜索和管理知识库:
-*(注:默认使用 `gpt-4o-mini` 作为基础大模型,`text-embedding-3-small` 作为向量模型,兼顾高性价比与速度)*
+仅仅几行命令体验最纯粹的知识图谱交互。
+
+> 默认采用兼顾性价比的组合:`gpt-4o-mini` + `text-embedding-3-small`。
```bash
he config init -k YOUR_API_KEY
@@ -60,47 +55,55 @@ he feed ./output/ new_document.md
```python
from hyperextract import Template
-# 加载内置的 YAML 模板
+# 一行加载内置的 YAML 模板策略
ka = Template.create("finance/event_timeline")
-# 一键解析文档
+# 解析提取
result = ka.parse(annual_report_text)
-# result.timeline 将优雅地输出提取后的 Event 对象列表!
```
-> 🔗 想了解完整的命令流,请查阅 [CLI 指南](./hyperextract/cli/README.md)
-
----
-
-## 🧩 深入探究:8 种核心知识结构
-
-不需要写繁琐的清洗代码,你的架构需求框架都能支持。
+> 🔗 更多高阶命令,请参阅 [CLI 指南](./hyperextract/cli/README.md)
+
+<details>
+<summary><b>🛠️ 如何定义知识模板(YAML)?</b></summary>
+<br>
+
+无需编写长篇代码,只需使用优雅的 YAML 结构直接声明你想要的信息形态:
+
+```yaml
+name: Event Timeline
+description: 提取金融动态及其时间依赖关系。
+type: TemporalGraph
+schema:
+ nodes:
+ - type: Event
+ properties:
+ - name: description
+ type: string
+ edges:
+ - type: Timeline
+ source: Event
+ target: Event
+ properties:
+ - name: relation
+ type: string
+```
+</details>
-![Knowledge Structures Matrix](docs/assets/8-types-v2.jpg)
+## 🧩 深入探究:8 种核心抽象类型
-| 自动类型 (Auto-Type) | 最佳应用场景 | 典型案例 |
-|-----------|----------|--------------------|
-| **Model** | 结构化报告提取 | 财务报表摘要 |
-| **List** | 顺序化列表 | 会议待办事项 |
-| **Set** | 去重的集合 | 产品目录梳理 |
-| **Graph** | 二元关系网络 | 社交媒体网络实体 |
-| **Hypergraph** | 多方复杂关系 | 合同纠纷事件提取 |
-| **TemporalGraph** | 时间序列图谱 | 新闻历史时间线 |
-| **SpatialGraph** | 空间地理位置 | 物理设备拓扑图 |
-| **SpatioTemporalGraph**| 时空双维度图谱 | 包含时间地理的战役记录 |
+拒绝样板代码,纯干货聚焦数据本身。
----
+![Knowledge Structures Matrix](docs/assets/8-types-v3.jpg)
## 🛠️ 系统架构揭秘
-系统底座基于稳固的铁三角架构:**Auto-Types** (多类型知识结构定义)、**Templates** (声明式提取 Schema)、以及 **Methods** (基于 LLM 的灵活执行策略)。
+系统底座基于坚实的铁三角架构:**Auto-Types** (提取结构)、**Methods** (执行策略)、以及 **Templates** (声明式配置)。
-![Architecture](docs/assets/architecture-v4.png)
+![Architecture](docs/assets/architecture-v5.jpg)
-- **设计指南**: [模板设计指南](./hyperextract/templates/DESIGN_GUIDE.md)
-- **内置模板**: [预设模板目录](./hyperextract/templates/presets/)
-
----
+* **设计指南**: [模板设计指南](./hyperextract/templates/DESIGN_GUIDE.md)
+* **内置模板**: [预设模板目录](./hyperextract/templates/presets/)
## 📈 与其他流行库的对比
@@ -112,26 +115,16 @@ result = ka.parse(annual_report_text)
| 超图提取 | ❌ | ❌ | ❌ | ❌ | ✅ |
| 领域模板驱动 | ❌ | ❌ | ❌ | ❌ | ✅ |
| 交互式 CLI | ❌ | ❌ | ❌ | ❌ | ✅ |
-| 多语言完美支持 | 部分支持 | ❌ | ❌ | ❌ | ✅ |
-| 命令行可视化 | 部分支持 | ❌ | ❌ | ❌ | ✅ |
-
----
+| 多语言支持 | 部分支持 | ❌ | ❌ | ❌ | ✅ |
## 📚 项目参考文档
-| 文档名称 | 功能说明 |
-|------|------|
-| [CLI 命令行指南](./hyperextract/cli/README.md) | 所有 he 命令的完整参考 |
-| [模板画廊](./hyperextract/templates/) | 38+ 内置垂直领域模板大全 |
-| [示例代码示例](./examples/) | Python API 对接的 demo 实例 |
-| [完整架构文档](./docs/) | 项目完整原理与架构解读 |
-
----
-
-## 🤝 欢迎贡献参与
-
-热情欢迎社区成员提交 Issues 和 PRs。让项目变得更好!
+* [CLI 命令行指南](./hyperextract/cli/README.md)
+* [模板画廊](./hyperextract/templates/)
+* [示例代码示例](./examples/)
+* [完整架构文档](./docs/)
-## 📄 开源协议
+## 🤝 参与贡献与协议
-Apache-2.0
+热烈欢迎社区提交 Issues 和 PRs。
+项目基于 **Apache-2.0** 协议开源。
diff --git a/docs/assets/8-types-v3.jpg b/docs/assets/8-types-v3.jpg
new file mode 100644
index 0000000..b556ecd
Binary files /dev/null and b/docs/assets/8-types-v3.jpg differ
diff --git a/docs/assets/architecture-v5.jpg b/docs/assets/architecture-v5.jpg
new file mode 100644
index 0000000..2d36c87
Binary files /dev/null and b/docs/assets/architecture-v5.jpg differ
diff --git a/docs/assets/hero-v3.jpeg b/docs/assets/hero-v3.jpeg
new file mode 100644
index 0000000..7d31b4f
Binary files /dev/null and b/docs/assets/hero-v3.jpeg differ
diff --git a/docs/assets/hero-v3.jpg b/docs/assets/hero-v3.jpg
new file mode 100644
index 0000000..bf4ca75
Binary files /dev/null and b/docs/assets/hero-v3.jpg differ