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

@@ -560,5 +560,6 @@ df['creatinine'] = pd.to_numeric(df['creatinine'], errors='coerce')

View File

@@ -975,5 +975,6 @@ export const aiController = new AIController();

View File

@@ -1309,5 +1309,6 @@ npm install react-markdown

View File

@@ -217,5 +217,6 @@ FMA___基线 | FMA___1个月 | FMA___2个月

View File

@@ -375,5 +375,6 @@ formula = "FMA总分0-100 / 100"

View File

@@ -209,5 +209,6 @@ async handleFillnaMice(request, reply) {

View File

@@ -181,5 +181,6 @@ method: 'mean' | 'median' | 'mode' | 'constant' | 'ffill' | 'bfill'

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

View File

@@ -468,5 +468,6 @@ ${fields.map((f, i) => `${i + 1}. ${f.name}${f.desc}`).join('\n')}