• Vũ Hoàng Anh's avatar
    feat(lead-stage): hard pattern detection for price comparison queries · 7659d548
    Vũ Hoàng Anh authored
    - Added hard_patterns.py: detect patterns (cheaper_than, more_expensive_than, similar_to) and extract reference product
    - product_search_engine.py: integrate pattern detection, auto-set price_max/min based on reference price
    - lead_search_tool.py: added user_insight parameter
    - graph.py: pass user_insight to tool, removed product_ids filter (always return full tool result)
    - prompts.py: added family/group intent examples, emphasize product_ids must include all items
    - stylist_engine.py: added occasion and rule_id to matches, save to DB properly
    - Added scripts: regenerate_matches.py and test_insert_one.py
    
    Impact:
    - Query 'rẻ hơn' auto sets price_max = ref_price * 0.95
    - Query 'đắt hơn' auto sets price_min = ref_price * 1.05
    - UI receives complete product list from tool (not truncated by AI)
    7659d548
test_insert_one.py 7.6 KB