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

@@ -52,3 +52,4 @@ export default apiClient;

View File

@@ -251,3 +251,4 @@ export async function logout(): Promise<void> {

View File

@@ -17,3 +17,4 @@ export * from './api';

View File

@@ -41,3 +41,4 @@ export async function fetchUserModules(): Promise<string[]> {

View File

@@ -121,3 +121,4 @@ export default ModulePermissionModal;

View File

@@ -32,3 +32,4 @@ export default AdminModule;

View File

@@ -197,3 +197,4 @@ export const TENANT_TYPE_NAMES: Record<TenantType, string> = {

View File

@@ -81,3 +81,4 @@ export default AgentCard;

View File

@@ -11,3 +11,4 @@ export { ChatWorkspace } from './ChatWorkspace';

View File

@@ -175,3 +175,4 @@ export const BRAND_COLORS = {

View File

@@ -213,3 +213,4 @@

View File

@@ -570,5 +570,6 @@ export default FulltextDetailDrawer;

View File

@@ -163,5 +163,6 @@ export const useAssets = (activeTab: AssetTabType) => {

View File

@@ -153,5 +153,6 @@ export const useRecentTasks = () => {

View File

@@ -352,5 +352,6 @@ export default DropnaDialog;

View File

@@ -437,5 +437,6 @@ export default MetricTimePanel;

View File

@@ -323,5 +323,6 @@ export default PivotPanel;

View File

@@ -123,5 +123,6 @@ export function useSessionStatus({

View File

@@ -115,5 +115,6 @@ export interface DataStats {

View File

@@ -111,5 +111,6 @@ export type AssetTabType = 'all' | 'processed' | 'raw';

View File

@@ -300,3 +300,4 @@ export default KnowledgePage;

View File

@@ -55,3 +55,4 @@ export interface BatchTemplate {

View File

@@ -133,3 +133,4 @@ export default function AgentModal({ visible, taskCount, onClose, onConfirm }: A

View File

@@ -53,3 +53,4 @@ export default function BatchToolbar({ selectedCount, onRunBatch, onClearSelecti

View File

@@ -76,3 +76,4 @@ export default function FilterChips({ filters, counts, onFilterChange }: FilterC

View File

@@ -66,3 +66,4 @@ export default function Header({ onUpload }: HeaderProps) {

View File

@@ -120,3 +120,4 @@ export default function ReportDetail({ report, onBack }: ReportDetailProps) {

View File

@@ -48,3 +48,4 @@ export default function ScoreRing({ score, size = 'medium', showLabel = true }:

View File

@@ -83,3 +83,4 @@ export default function Sidebar({ currentView, onViewChange, onSettingsClick }:

View File

@@ -25,3 +25,4 @@ export { default as TaskDetail } from './TaskDetail';

View File

@@ -294,3 +294,4 @@ export default function Dashboard() {

View File

@@ -243,3 +243,4 @@

View File

@@ -344,3 +344,4 @@ export default TenantListPage;

View File

@@ -253,3 +253,4 @@ export async function fetchModuleList(): Promise<ModuleInfo[]> {

View File

@@ -472,3 +472,4 @@ export default AIStreamChat;

View File

@@ -172,3 +172,4 @@ export default ConversationList;

View File

@@ -24,3 +24,4 @@ export type {

View File

@@ -316,3 +316,4 @@ export default useAIStream;

View File

@@ -245,3 +245,4 @@ export default useConversations;

View File

@@ -66,5 +66,6 @@ export { default as Placeholder } from './Placeholder';

View File

@@ -46,5 +46,6 @@ interface ImportMeta {