nex_docus/docs/sdd/specs/DV-0007-rag-chat/spec.md

27 lines
918 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# DV-0007知识库 RAG 对话 规格Spec
- **状态**Implemented
- **关联 ADR**ADR-0004, ADR-0005
## 目标
基于向量检索 + LLM 生成可溯源的问答对话。
## 范围
- **In**:会话/消息管理、检索 + 生成、流式、中断、引用支撑句。
- **Out**:多轮复杂 Agent仅单轮检索增强 + 指代历史)。
## 用户故事
> 作为用户,我希望问知识库问题并看到带引用的可验证答案。
## 功能需求FR
| ID | 需求 | 验收要点 |
| --- | --- | --- |
| FR-12 | 向量检索 + LLM 生成 + 会话管理 + 流式 | 答案带 [n] 引用;检索按文件去重;历史仅注入最近用户问题 |
| FR-19 | 引用支撑句对齐 + 消息规范化 | [n] 按出现顺序回填 quote_occurrences旧数据只读兼容 |
## 非功能需求NFR
| ID | 需求 |
| --- | --- |
| NFR-10 | 引用对齐/embedding 失败降级 |