M2-05 Vector & Retrieval 对接 #25
Closed
opened 2026-05-22 21:09:49 +08:00 by wangdl
·
1 comment
Labels
Clear labels
area:activity
活动/统计
area:admin
管理后台
area:admin-api
area:ai
AI/RAG
area:ai-runtime
AI Runtime / AI 分析体系相关
area:analytics
area:api
API 接口
area:auth
认证与授权
area:cos
对象存储
area:database
数据库/Migration
area:import
文件导入/解析
area:knowledge
知识库/知识点
area:learning-info
area:learning-session
area:quiz
测验/自测
area:reading-event
area:reading-progress
area:review
复习系统
area:security
安全相关
audit:api-admin-info
audit:api-info
audit:planned
已完成宏观规划,尚未代码审查
audit:reviewed
blocked-by:api-info-aggregation
blocked-by:api-info-core
blocked-by:api-info-ops
blocked-by:api-info-schema
blocked-by:processor
blocked-by:schema
priority:p0
最高优先级,阻塞发布
priority:p1
高优先级,里程碑必需
priority:p2
中优先级,后续版本
repo:api
API 仓库 Issue
status:blocked
被阻塞
status:done
已完成
status:partial
status:todo
type:aggregation
type:bug
缺陷修复
type:design
设计
type:docs
文档
type:feature
新功能
type:migration
type:refactor
重构
type:test
work:admin-api
work:aggregation
work:api
work:artifact
题目/卡片产物
work:audit
work:circuit-breaker
熔断
work:contract
work:design
架构/协议设计工作
work:docs
work:export
work:extend-existing
work:internal-api
Runtime 内部接口
work:job
Job 调度相关
work:new-module
work:new-table
work:ops
work:query
work:quota
额度/限流
work:schema
Prisma Schema 设计
work:security
work:service
Service 层实现
work:snapshot
Snapshot 构建
work:test
No Label
Milestone
No items
No Milestone
M2:知识库主链路闭环(P1)
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: wangdl/api-server#25
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking 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?
目标
将 M1-02 Vector & Retrieval Module 的设计与 M2 知识库主链路对接,确保 Ingestion 产出的 embedding 能正确写入 Qdrant,RAG Chat 的检索请求能正确组装上下文。
本 Issue 只做对接设计,Vector 模块自身和 Ingestion/RAG 模块的架构设计在各自的 Issue 中完成。
背景说明
M1-02 设计了 Vector & Retrieval 模块的接口(upsert/delete/search/rerank),M2-04 设计了 Ingestion 的导入流水线,M2-07 将设计 RAG Chat 的对话能力。本 Issue 负责确保这三个模块之间的接口契约一致、数据格式对齐、调用链路畅通。
对接内容
Ingestion → Vector 对接:
Vector → RAG Chat 对接:
数据一致性:
基础设施依赖
本 Issue 不引入新依赖,仅协调三个已有模块的接口。
Domain Event(对接相关)
验收标准
禁止事项
✅ M2-05 实施完成
交付内容
integration-types.tsVectorService.buildCitationContexts()接口契约
Ingestion → Vector: IndexableChunk 格式(id, sourceId, embedding, content, chunkIndex, pageNumber...)
Vector → RAG: CitationContext 格式(chunkId, sourceId, sourceTitle, content, pageNumber, sectionTitle, score)
数据一致性: VectorCleanupRequest(import_failed / source_deleted / reparse)
E2E
2 tests: VectorService collection accessible, count accessible.