feat(iit-manager): Integrate Dify knowledge base for hybrid retrieval

Completed features:
- Created Dify dataset (Dify_test0102) with 2 processed documents
- Linked test0102 project with Dify dataset ID
- Extended intent detection to recognize query_protocol intent
- Implemented queryDifyKnowledge method (semantic search Top 5)
- Integrated hybrid retrieval (REDCap data + Dify documents)
- Fixed AI hallucination bugs (intent detection + API field path)
- Developed debugging scripts
- Completed end-to-end testing (5 scenarios passed)
- Generated comprehensive documentation (600+ lines)
- Updated development plans and module status

Technical highlights:
- Single project single knowledge base architecture
- Smart routing based on user intent
- Prevent AI hallucination by injecting real data/documents
- Session memory for multi-turn conversations
- Reused LLMFactory for DeepSeek-V3 integration

Bug fixes:
- Fixed intent detection missing keywords
- Fixed Dify API response field path error

Testing: All scenarios verified in WeChat production environment

Status: Fully tested and deployed
This commit is contained in:
2026-01-04 15:44:11 +08:00
parent b47079b387
commit dfc472810b
162 changed files with 3093 additions and 62 deletions

View File

@@ -632,5 +632,6 @@ import { logger } from '../../../../common/logging/index.js';

View File

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

View File

@@ -345,5 +345,6 @@ const initialMessages = defaultMessages.length > 0 ? defaultMessages : [{

View File

@@ -633,5 +633,6 @@ http://localhost:5173/data-cleaning/tool-c

View File

@@ -421,5 +421,6 @@ Docs: docs/03-业务模块/DC-数据清洗整理/06-开发记录/DC模块重建

View File

@@ -294,5 +294,6 @@ ConflictDetectionService // 冲突检测(字段级对比)

View File

@@ -458,5 +458,6 @@ Tool B后端代码**100%复用**了平台通用能力层,无任何重复开发

View File

@@ -235,5 +235,6 @@ $ node scripts/check-dc-tables.mjs