refactor: RAG模块降级为实验性功能,默认关闭

This commit is contained in:
2026-06-24 22:59:02 +08:00
parent 63da7e2d3c
commit cf4e6a4fc0
6 changed files with 142 additions and 59 deletions
+1 -1
View File
@@ -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
View File
@@ -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 总耗时