M2-07 RAG Chat Module #27
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
目标
设计知习 RAG 对话模块,为 C 端用户提供基于知识库的 AI 问答能力,支持多轮对话、引用来源展示和对话持久化。
本 Issue 只做模块架构设计,不直接实现代码。
背景说明
RAG Chat 是知习知识库主链路的最后一环——用户在知识库中上传资料、解析索引、确认知识点后,可以通过自然语言对话向知识库提问。回答必须基于知识库内容,并带引用来源(citation),让用户能追溯到原始资料。
注意:RAG Chat 的回答范围严格限定在当前知识库或指定来源集内,不做开放式网络搜索。
模块职责
本模块负责:
本模块不负责:
候选数据对象
RAG 问答流程设计
用户发送消息
→ Content Safety 检测用户输入
→ Vector 语义检索(携带知识库 filter)
→ rerank 检索结果
→ 组装上下文(chunk 内容 + citation 信息)
→ AI Gateway 调用 LLM 生成回答
→ Content Safety 检测 AI 输出
→ 保存 ChatMessage + ChatCitation
→ 返回给用户
基础设施依赖判断
API 设计
CAPI:
AAPI:
Domain Event 设计
交付检查
验收标准
禁止事项
不建议当前阶段实现