You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
Add knowledge base management feature and update configurations
- Introduced a new knowledge base management system that allows users to create, edit, and delete knowledge bases via a web interface.
- Implemented vector similarity search for intelligent Q&A matching, enhancing the response capabilities of the system.
- Added new configuration options for embedding API integration, including API base URL, key, model name, and similarity thresholds.
- Updated the CHANGELOG to reflect the new version 2.2.0 and document major updates and added features.
- Enhanced the README files to include detailed descriptions of the knowledge base functionality and its use cases.
- Incremented version numbers in both backend and frontend to 2.2.0 to signify the introduction of these features.
-**Smart Recognition**: Automatic detection of reasoning_content, thinking and other reasoning fields
394
395
-**Transparent Proxy**: Full OpenAI API compatibility, supports all reasoning models
395
396
397
+
## 🧠 Knowledge Base Responses Feature 🆕
398
+
399
+
Xiangxin AI Guardrails v2.2.0 introduces powerful knowledge base response functionality with vector similarity-based intelligent Q&A matching.
400
+
401
+
### 📚 Key Features
402
+
403
+
-**Intelligent Matching**: Vector similarity search for most relevant questions using embeddings
404
+
-**Automatic Responses**: Priority responses from knowledge base when risks are detected
405
+
-**Flexible Management**: Web interface for uploading, editing, and deleting knowledge bases
406
+
-**Tiered Permissions**: Support for user-level and global knowledge bases, admin-configurable global knowledge bases
407
+
-**File Format**: Support for JSONL format Q&A pair file uploads
408
+
409
+
### 🔄 Workflow
410
+
411
+
```
412
+
User Input → Security Detection → [Risk Detected] → Search Knowledge Base → Similar Question Found?
413
+
↓
414
+
Yes → Return Knowledge Base Answer
415
+
↓
416
+
No → Return Traditional Rejection Template
417
+
```
418
+
419
+
### 📝 Knowledge Base File Format
420
+
421
+
```jsonl
422
+
{"questionid": "q1", "question": "What is artificial intelligence?", "answer": "Artificial intelligence is technology that simulates human intelligence, including machine learning and deep learning branches."}
423
+
{"questionid": "q2", "question": "How to protect data privacy?", "answer": "Data privacy protection requires multiple technical measures including encryption, access control, and data anonymization."}
424
+
{"questionid": "q3", "question": "What are the uses of blockchain?", "answer": "Blockchain technology can be used in digital currency, supply chain management, identity authentication and many other fields."}
425
+
```
426
+
427
+
### 🔧 Embedding Service Configuration
428
+
429
+
The knowledge base response feature requires embedding model service support.
0 commit comments