docs: fix architecture boundaries - routing=unique input, LLM=unique output, memory=autonomous
Key corrections: - Routing subnet is the ONLY external input path; all images/text/voice must pass through it - LLM subnet is the ONLY external output path; natural language goes directly to user - Core is a purely internal layer, not directly exposed to users - Memory subnet is autonomous: Core only passes query tensors + new information tensors; how to update/delete/modify is entirely decided by memory subnet - Routing subnet uses sliding window mechanism: instant label tensor generation → Core, then after the round ends, Core schedules routing to process remaining raw data - Updated all ASCII diagrams, Mermaid diagrams, pseudo-code, and data flow charts - Added border rules table to all relevant docs
This commit is contained in:
@ -8,16 +8,30 @@
|
||||
|
||||
### 架构定位
|
||||
|
||||
记忆子网是整个 NextAgent 架构中**唯一与记忆内容交互的模块**。Core 不自作主张处理记忆——只负责将查询张量和新信息张量传递过来,**如何更新、删除、修改**由记忆子网自行完成。
|
||||
|
||||
```
|
||||
记忆更新参数张量 (来自 Core) 记忆检索请求张量 (来自 Core)
|
||||
│ │
|
||||
▼ ▼
|
||||
Core 传过来的两样东西
|
||||
│
|
||||
┌─────────┴────────────┐
|
||||
│ │
|
||||
查询张量 新信息张量
|
||||
(含意图/种子实体) (含本轮标签/结果)
|
||||
│ │
|
||||
└─────────┬────────────┘
|
||||
│
|
||||
▼
|
||||
┌───────────────────────────────────────────────────────────┐
|
||||
│ 记忆子网 │
|
||||
│ 记忆子网(自治) │
|
||||
│ │
|
||||
│ ┌────────────────────────────────────────────────────┐ │
|
||||
│ │ 记忆管理器 (Memory Manager) │ │
|
||||
│ │ 解析参数包 → 分发到对应存储层 → 返回结果 │ │
|
||||
│ │ 记忆管理器 (Memory Manager) │ │
|
||||
│ │ 自行决定: │ │
|
||||
│ │ → 如何解析查询 → 走图DB/向量DB/文本 │ │
|
||||
│ │ → 如何写入新信息 → MERGE/CREATE/更新 │ │
|
||||
│ │ → 如何更新已有记忆 → 增量/覆盖/合并 │ │
|
||||
│ │ → 如何删除 → 软删除/硬删除/归档 │ │
|
||||
│ │ → 如何关联 → 链路推理/图谱推理 │ │
|
||||
│ └──────┬────────────┬──────────────┬─────────────────┘ │
|
||||
│ │ │ │ │
|
||||
│ ▼ ▼ ▼ │
|
||||
@ -32,8 +46,8 @@
|
||||
│ │
|
||||
│ ┌────────────────────────────────────────────────────┐ │
|
||||
│ │ 张量编/解码层 │ │
|
||||
│ │ 接收:memory_query / memory_update 标准张量 │ │
|
||||
│ │ 输出:memory_result 标准张量 │ │
|
||||
│ │ 输入:查询张量 + 新信息张量(来自 Core) │ │
|
||||
│ │ 输出:记忆结果张量(返回给 Core) │ │
|
||||
│ └────────────────────────────────────────────────────┘ │
|
||||
└───────────────────────────────────────────────────────────┘
|
||||
```
|
||||
@ -133,9 +147,10 @@ LIMIT 10
|
||||
|
||||
| 项目 | 说明 |
|
||||
|------|------|
|
||||
| **输入1** | `memory_query` 张量(来自 Core,含查询意图和种子实体) |
|
||||
| **输入2** | `memory_update` 张量(来自 Core,含要写入的三元组和元数据) |
|
||||
| **输入1** | 查询张量(来自 Core,含查询意图、种子实体、上下文) |
|
||||
| **输入2** | 新信息张量(来自 Core,含本轮标签和子网结果;**不含具体写入指令**) |
|
||||
| **输出** | `memory_result` 张量(包含检索到的实体/关系/向量结果) |
|
||||
| **自治** | 记忆子网自行决定如何写入、更新、删除、修改记忆 |
|
||||
|
||||
## 训练目标
|
||||
|
||||
@ -284,9 +299,9 @@ class Neo4jGraph:
|
||||
| 信息一致性 | 同一信息多次检索结果是否一致 |
|
||||
| 记忆容量 | 在不显著降低性能前提下的最大存储量 |
|
||||
|
||||
## 记忆更新参数包张量格式
|
||||
## 新信息张量格式
|
||||
|
||||
Core 打包给记忆子网的 `memory_update` 张量格式:
|
||||
Core 传递给记忆子网的**新信息张量**(Core 不发送
|
||||
|
||||
```json
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user