refactor: RAG模块降级为实验性功能,默认关闭
This commit is contained in:
+1
-1
@@ -96,7 +96,7 @@ noma/
|
||||
│
|
||||
├── core_engine/ # 核心引擎
|
||||
│ ├── state_manager/ # 状态管理
|
||||
│ ├── memory_rag/ # 记忆 RAG
|
||||
│ ├── memory_rag/ # 上下文缓存(实验性向量检索默认关闭)
|
||||
│ └── configurators/ # IDE 适配器
|
||||
│
|
||||
├── agents/ # Agent 矩阵
|
||||
|
||||
@@ -130,7 +130,7 @@ python "${SCRIPTS_DIR}/noma.py" --project-root "{project_root}" extract-context
|
||||
|
||||
- 必须读取:`writing_guidance.guidance_items`
|
||||
- 推荐读取:`reader_signal` 与 `genre_profile.reference_hints`
|
||||
- 条件读取:`rag_assist`(当 `invoked=true` 且 `hits` 非空时,必须提炼成可执行约束,禁止只贴检索命中)
|
||||
- 条件读取:`rag_assist` — 实验性模块,默认关闭(`config.context_rag_assist_enabled=False`),始终返回 `{"invoked": false}`
|
||||
|
||||
### Step 0.6: 时间线读取(新增,必做)
|
||||
|
||||
|
||||
+11
-13
@@ -175,22 +175,20 @@ hook_strength: "strong"
|
||||
- 按地点/时间/视角切分场景
|
||||
- 每个场景生成摘要 (50-100字)
|
||||
|
||||
### Step G: 向量嵌入
|
||||
### Step G: 向量嵌入(已禁用)
|
||||
|
||||
> **状态**: 实验性模块,默认关闭。由 `config.context_rag_assist_enabled` 控制。
|
||||
> 结构化检索(index.db + state.json + wiki + summaries)已覆盖写作上下文需求。
|
||||
> 如需启用,将 `context_rag_assist_enabled` 设为 `True` 并配置嵌入模型。
|
||||
|
||||
```bash
|
||||
python -X utf8 "${SCRIPTS_DIR}/noma.py" --project-root "{project_root}" rag index-chapter \
|
||||
--chapter 100 \
|
||||
--scenes '[...]' \
|
||||
--summary "本章摘要文本"
|
||||
# 已禁用 - 跳过
|
||||
# python -X utf8 "${SCRIPTS_DIR}/noma.py" --project-root "{project_root}" rag index-chapter \
|
||||
# --chapter 100 \
|
||||
# --scenes '[...]' \
|
||||
# --summary "本章摘要文本"
|
||||
```
|
||||
|
||||
**父子索引规则**:
|
||||
- 父块: `chunk_type='summary'`, `chunk_id='ch0100_summary'`
|
||||
- 子块: `chunk_type='scene'`, `chunk_id='ch0100_s{scene_index}'`, `parent_chunk_id='ch0100_summary'`
|
||||
- `source_file`:
|
||||
- summary: `summaries/ch0100.md`
|
||||
- scene: `{chapter_file}#scene_{scene_index}`
|
||||
|
||||
### Step H: 风格样本评估
|
||||
|
||||
```python
|
||||
@@ -224,7 +222,7 @@ python -X utf8 "${SCRIPTS_DIR}/noma.py" --project-root "{project_root}" style ex
|
||||
- D2 同步 Wiki
|
||||
- E 写入章节摘要
|
||||
- F AI 场景切片
|
||||
- G RAG 向量索引
|
||||
- G RAG 向量索引(默认跳过,config 控制)
|
||||
- H 风格样本评估(若跳过写 0)
|
||||
- I 债务利息(若跳过写 0)
|
||||
- TOTAL 总耗时
|
||||
|
||||
@@ -245,7 +245,7 @@ class DataModulesConfig:
|
||||
context_writing_score_persist_enabled: bool = True
|
||||
context_writing_score_include_reader_trend: bool = True
|
||||
context_writing_score_trend_window: int = 10
|
||||
context_rag_assist_enabled: bool = True
|
||||
context_rag_assist_enabled: bool = False # 实验性RAG模块,默认关闭
|
||||
context_rag_assist_top_k: int = 4
|
||||
context_rag_assist_min_outline_chars: int = 40
|
||||
context_rag_assist_max_query_chars: int = 120
|
||||
|
||||
Reference in New Issue
Block a user