@@ -45,7 +45,19 @@ classifier:
4545#
4646# How it works:
4747# 1. Router connects to MCP server at startup
48- # 2. Calls 'list_categories' tool: MCP returns {"categories": ["business", "law", ...]}
48+ # 2. Calls 'list_categories' tool and MCP returns:
49+ # {
50+ # "categories": ["math", "science", "technology", "history", "general"],
51+ # "category_system_prompts": {
52+ # "math": "You are a mathematics expert. When answering math questions...",
53+ # "science": "You are a science expert. When answering science questions...",
54+ # "technology": "You are a technology expert..."
55+ # },
56+ # "category_descriptions": {
57+ # "math": "Mathematical and computational queries",
58+ # "science": "Scientific concepts and queries"
59+ # }
60+ # }
4961# 3. For each request, calls 'classify_text' tool which returns:
5062# {
5163# "class": 3,
@@ -55,14 +67,28 @@ classifier:
5567# }
5668# 4. Router uses the model and reasoning settings from MCP response
5769#
70+ # PER-CATEGORY SYSTEM PROMPT INJECTION:
71+ # - The MCP server provides SEPARATE system prompts for EACH category
72+ # - Each category gets its own specialized instructions and context
73+ # - The router stores these prompts and injects the appropriate one per query
74+ # - Use classifier.GetCategorySystemPrompt(categoryName) to retrieve for a specific category
75+ # - Examples:
76+ # * Math category: "You are a mathematics expert. Show step-by-step solutions..."
77+ # * Science category: "You are a science expert. Provide evidence-based answers..."
78+ # * Technology category: "You are a tech expert. Include practical code examples..."
79+ # - This allows domain-specific expertise per category
80+ #
5881# BENEFITS:
5982# - MCP server makes intelligent routing decisions per query
6083# - No hardcoded routing rules needed in config
6184# - MCP can adapt routing based on query complexity, content, etc.
62- # - Centralized routing logic in MCP server
85+ # - Centralized routing logic and per-category system prompts in MCP server
86+ # - Category descriptions available for logging and debugging
87+ # - Domain-specific LLM behavior for each category
6388#
6489# FALLBACK:
6590# - If MCP doesn't return model/use_reasoning, uses default_model below
91+ # - If MCP doesn't return category_system_prompts, router can use default prompts
6692# - Can also add category-specific overrides here if needed
6793#
6894categories : []
@@ -75,8 +101,6 @@ vllm_endpoints:
75101 - name : endpoint1
76102 address : 127.0.0.1
77103 port : 8000
78- models :
79- - openai/gpt-oss-20b
80104 weight : 1
81105 health_check_path : /health
82106
0 commit comments