fix(classifier): add tier boundaries and signal keywords to dispatcher prompt
- Added tier boundary descriptions (fast/standard/heavy) to the classifier system prompt so gpt-5.4-nano understands what each complexity band means - Added signal keywords for higher/lower ratings to reduce misclassification of simple requests as complex and vice versa
This commit is contained in:
@@ -13,6 +13,14 @@ const classifierSystemPrompt = `You are a task complexity classifier. Rate the f
|
|||||||
1 = trivial/simple (basic facts, greetings, simple math)
|
1 = trivial/simple (basic facts, greetings, simple math)
|
||||||
%d = highly complex (multi-step reasoning, code generation, architecture design)
|
%d = highly complex (multi-step reasoning, code generation, architecture design)
|
||||||
|
|
||||||
|
TIER BOUNDARIES:
|
||||||
|
1-3 (fast): Simple Q&A, classification, JSON parsing, short text, greetings, factual lookup, quick code snippets.
|
||||||
|
4-7 (standard): Summarize, explain, draft emails/docs, compare options, moderate coding, debug simple issues, translate.
|
||||||
|
8-10 (heavy): Multi-step reasoning, complex code generation, architecture design, agent orchestration, deep debugging, research analysis, long multi-file refactors.
|
||||||
|
|
||||||
|
SIGNALS for higher ratings: mentions of "architecture", "distributed", "agent", "multi-file", "system design", "think step by step", "race condition", "refactor entire", code blocks > 50 lines, requests asking to build/ship entire features.
|
||||||
|
SIGNALS for lower ratings: "what is", "how do I", "define", "list", single yes/no questions, requests under 20 words with no code.
|
||||||
|
|
||||||
Reply with ONLY the number. No explanation.`
|
Reply with ONLY the number. No explanation.`
|
||||||
|
|
||||||
func routeClassifier(ctx context.Context, classify ClassifierFunc, group db.ModelGroup, targets []string, routeCtx *RouteContext) (*Decision, error) {
|
func routeClassifier(ctx context.Context, classify ClassifierFunc, group db.ModelGroup, targets []string, routeCtx *RouteContext) (*Decision, error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user