Spaces:
Sleeping
Sleeping
Update services/kb_creation.py
Browse files- services/kb_creation.py +7 -2
services/kb_creation.py
CHANGED
|
@@ -228,8 +228,13 @@ def search_knowledge_base(query: str, top_k: int = 10) -> dict:
|
|
| 228 |
|
| 229 |
# -------- Semantic intent + Hybrid ranking --------
|
| 230 |
INTENT_PROTOTYPES = {
|
| 231 |
-
"steps": ["how to perform", "procedure", "workflow", "instructions",
|
| 232 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 233 |
"prereqs": ["pre-requisites", "requirements before starting", "setup needed"],
|
| 234 |
"purpose": ["overview", "purpose", "introduction", "what is this about"],
|
| 235 |
"neutral": ["general information", "context", "details"],
|
|
|
|
| 228 |
|
| 229 |
# -------- Semantic intent + Hybrid ranking --------
|
| 230 |
INTENT_PROTOTYPES = {
|
| 231 |
+
"steps": ["how to perform", "procedure", "workflow", "instructions",
|
| 232 |
+
"steps to accomplish", "operate", "process to follow],
|
| 233 |
+
"errors": ["error condition", "issue troubleshooting", "resolution steps",
|
| 234 |
+
"fix failure", "diagnose problem",
|
| 235 |
+
# ✅ NEW: permission/authorization/role access signals
|
| 236 |
+
"permission denied", "not authorized", "authorization required",
|
| 237 |
+
"role access missing", "access not allowed", "insufficient privileges"],
|
| 238 |
"prereqs": ["pre-requisites", "requirements before starting", "setup needed"],
|
| 239 |
"purpose": ["overview", "purpose", "introduction", "what is this about"],
|
| 240 |
"neutral": ["general information", "context", "details"],
|