1.2 KiB
1.2 KiB
V52 - Capability Mode + Business Intent Separation
Bug V51
wevia-chat V50 orchestrator-first avait faux positifs intents quand queries mentionnaient HCP/ethica dans contexte capability (React, schema, etc). LLM system prompt trop restrictif = refus de generer SVG.
Fix V52 - 3-Tier Routing
- CAPABILITY detection first (keywords: react|jsx|tsx|mermaid|svg|pdf|cahier|python...) → LLM deep mode with "DOIS generer" prompt
- BUSINESS INTENT (orchestrator data) requires business keyword + intent match → combien|status|etat|nombre|liste
- FALLBACK LLM pour smalltalk
E2E Validated (real tests)
- React/TS/SVG/Mermaid/Python: capability mode works
- combien HCP Maroc: orchestrator -> 146694 (real Ethica)
- status vistex: orchestrator -> vault contacts
- Hello: LLM fallback smalltalk
Files
- /var/www/html/api/wevia-chat.php (7011 bytes, V52 promoted)
- GOLD: wevia-chat.php.GOLD-20260417-224218-pre-v52-capability
- GOLD v50 aussi preserved pour rollback 2-deep
For next Claude
- Capability keywords list extensible in $capability_keywords array
- Business intent requires BOTH intent fire AND query keyword
- 3 GOLD backups chain: v50, v52 preserves progression