Commit 52ff4d8
fix(router): route on the user's clean query, not the enriched blob
Benchmark surfaced a severe philosophy-routing bias (perspective_routing 56%,
with cascade into hallucination_prevention and emotional_intelligence). Root
cause: route_and_generate passed the full server-enriched query — user question
+ injected identity/memory context — to the keyword router. That context is
saturated with philosophy/consciousness keywords, so a physics question scored
philosophy=16 vs newton=1, sending nearly everything to philosophy.
Fix: route adapter selection on extract_primary_user_query(query) (strips the
injected context), while generation still uses the full enriched query.
Verified deterministically: gravitational->newton, urban loneliness->davinci,
job loss->empathy, superposition->quantum, distributed system->systems (all
were ->philosophy before).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent e1f151a commit 52ff4d8
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1068 | 1068 | | |
1069 | 1069 | | |
1070 | 1070 | | |
1071 | | - | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
1072 | 1078 | | |
1073 | 1079 | | |
1074 | 1080 | | |
| |||
0 commit comments