feat(pkb): Integrate pgvector and create Dify replacement plan

Summary:
- Migrate PostgreSQL to pgvector/pgvector:pg15 Docker image
- Successfully install and verify pgvector 0.8.1 extension
- Create comprehensive Dify-to-pgvector migration plan
- Update PKB module documentation with pgvector status
- Update system documentation with pgvector integration

Key changes:
- docker-compose.yml: Switch to pgvector/pgvector:pg15 image
- Add EkbDocument and EkbChunk data model design
- Design R-C-R-G hybrid retrieval architecture
- Add clinical data JSONB fields (pico, studyDesign, regimen, safety, criteria, endpoints)
- Create detailed 10-day implementation roadmap

Documentation updates:
- PKB module status: pgvector RAG infrastructure ready
- System status: pgvector 0.8.1 integrated
- New: Dify replacement development plan (01-Dify替换为pgvector开发计划.md)
- New: Enterprise medical knowledge base solution V2

Tested: PostgreSQL with pgvector verified, frontend and backend functionality confirmed
This commit is contained in:
2026-01-20 00:00:58 +08:00
parent 1ece9a4ae8
commit dfc0fe0b9a
289 changed files with 1897 additions and 41 deletions

View File

@@ -1044,5 +1044,6 @@ Redis 实例¥500/月

View File

@@ -502,5 +502,6 @@ import { ChatContainer } from '@/shared/components/Chat';

View File

@@ -210,3 +210,4 @@ VALUES ('user-mock-001', '13800000000', ..., 'tenant-mock-001', ...);

View File

@@ -422,3 +422,4 @@ frontend-v2/src/modules/pkb/

View File

@@ -284,3 +284,4 @@ npm run dev

View File

@@ -799,3 +799,4 @@ AIA智能问答模块

View File

@@ -942,5 +942,6 @@ CREATE INDEX idx_rvw_tasks_created_at ON rvw_schema.review_tasks(created_at);

View File

@@ -597,3 +597,4 @@ const typography = {

View File

@@ -909,3 +909,4 @@ app.use('/api/v1/knowledge', (req, res) => {

View File

@@ -223,3 +223,4 @@ rm -rf src/modules/pkb

View File

@@ -398,3 +398,4 @@ GET /api/v2/pkb/batch-tasks/batch/templates

View File

@@ -42,3 +42,4 @@ import pkbRoutes from './modules/pkb/routes/index.js';

View File

@@ -311,3 +311,4 @@ backend/

View File

@@ -522,3 +522,4 @@ const response = await fetch('/api/v2/pkb/batch-tasks/batch/execute', {