Skip to content

Commit cb8e232

Browse files
AryanBVclaude
andcommitted
feat: Phase 1 Quick Wins - product type modifiers and LLM edge cases
Implements Phase 1 of classifier redesign: Query Parser (query-parser.service.ts): - Add PRODUCT_TYPE_MODIFIERS constant (35 modifiers) - Processing state: instant, soluble, roasted, etc. - Form indicators: powder, beans, leaves, frozen, etc. - Coffee/tea varieties: arabica, robusta, green tea, etc. - Function indicators: for vehicles, automotive, etc. - Update parseQuery() to extract productTypeModifiers LLM Navigator (llm-navigator.service.ts): - Add shouldExcludeByModifier() for strict filtering - Coffee exclusion: instant/extract vs roasted/raw - Variety exclusion: Arabica vs Robusta - Update filterOptionsByKeywordsSimple() with modifier filtering - Add critical edge cases to LLM prompt: - Coffee classification (Ch.09 vs Ch.21) - Function over material rules - Variety and grade handling - "Other" category rules Data files added: - chapter-triggers.json (chapter prediction rules) - elimination-rules.json (eliminative logic rules) Cleanup: - Remove obsolete write-chapter-predictor.js script Test results: - ✅ "instant coffee" correctly routes to Ch.21 - ⚠️ "brake pads" needs Phase 2 work for function-over-material 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent d7f531d commit cb8e232

5 files changed

Lines changed: 1132 additions & 209 deletions

File tree

backend/scripts/write-chapter-predictor.js

Lines changed: 0 additions & 195 deletions
This file was deleted.

0 commit comments

Comments
 (0)