2026-09-02 19:41:13 +08:00

2.9 KiB
Raw Blame History

Architecture Decision Records

  • ADR-001: API First + Admin Console — Accepted
  • ADR-002: Modular monolith + workers + MCP gateway for V1 — Accepted
  • ADR-003: PostgreSQL + object storage are canonical — Superseded by ADR-012
  • ADR-004: Mochow is initial retrieval backend but replaceable — Superseded by ADR-010
  • ADR-005: Provider abstraction for embedding/reranker/parser/LLM — Accepted
  • ADR-006: RAG + Knowledge Compilation — Accepted
  • ADR-007: ACL before/during retrieval — Accepted
  • ADR-008: MCP hides infrastructure details — Accepted
  • ADR-009: Baidu BOS is the primary object-storage provider; local storage remains for tests and local development — Accepted
  • ADR-010: OceanBase Vector is the primary rebuildable retrieval index behind VectorStore; PostgreSQL remains canonical — Superseded by ADR-012
  • ADR-011: Qianfan bge-large-zh plus bce-reranker-base is the initial Demo model baseline — Accepted
  • ADR-012: OceanBase MySQL relational tables + BOS are canonical; OceanBase vector tables remain rebuildable indexes — Accepted

Architecture migration boundary

ARCH-006 的只读环境核验确认,目标平台没有独立 PostgreSQL,OceanBase MySQL 模式同时承载 关系数据和向量数据。因此 ADR-012 取代 ADR-003/010 中的 PostgreSQL 部署假设:OceanBase 关系表保存 canonical metadata,BOS 保存不可变源文件,OceanBase 专用向量表仍只保存可由 canonical Chunk 重建的检索行。共用数据库实例不改变两类数据的所有权边界,也不允许业务层 绕过 VectorStore 直接依赖 pyobvector。

目标 test 集群为 OceanBase 4.3.5.4 MySQL 模式。ARCH-006 已用只读 EXPLAIN 验证 VECTOR_INDEX(... pre_filter) 产生 VECTOR INDEX ADAPTIVE SCAN (PRE-FILTER);版本下限与 运行检查据此调整为 4.3.5.4。生产升级和重新验收仍由运维流程控制。

Public knowledge delivery boundary

PLAN-002 将当前交付阶段限定为企业受控网络内的单一公共知识可见域,并加入 Kubernetes/Helm 集群交付任务。这是部署范围和实施顺序调整,不是新的架构选型:继续采用 ADR-002 的模块化 单体 API、独立 Worker 和 MCP Gateway,以及架构既定的 Celery/RabbitMQ;OceanBase/BOS 边界继续遵循 ADR-012。

ADR-007 仍为 Accepted。当前阶段只是延后用户/组/角色和 Document ACL;开始接收任何非公共 知识前,必须先实现 Permission Resolver 和检索前/检索中 ACL 下推。公共知识库也不等于匿名 公网开放,Admin 写操作只允许经受控网络或统一接入网关访问,MCP 使用最小只读服务身份。

The migration retains the Demo's Dense Top20 → Reranker Top5 behavior and current lightweight Parser scope. Top50 retrieval, distance thresholds, dual-query RRF, Marker/Pandoc and LLM-derived index content require separate product and evaluation decisions.