Commit Graph

4 Commits

Author SHA1 Message Date
Macky
4bff7db098 fix(persona): openers must ASK or say สนใจ — never 'ลองดู/ลอง/แค่มาดู'
- persona_prompts OPENER RULE: openers must be a direct question OR declare
  interest ('สนใจ/สอบถาม'); explicitly forbid 'ลองดู / ลอง / มาลอง / แค่มาดู /
  กดดู / แวะดู' (trying/browsing) phrasing which Thai customers don't use
- fix_openers.py: rewrite browse/try openers into a polite natural interest
  opener ('สวัสดีครับ/ค่ะ สนใจสอบถามสินค้าครับ ขอรายละเอียดได้ไหม'), leaving
  openers that already ask a question or say สนใจ untouched
2026-08-19 10:19:29 +07:00
Macky
7fcef45649 fix(persona): forbid dismissive openers + fix script for '..' and negative tails
- persona_prompts OPENER RULE: never open with dots/ellipsis and never end
  an opener by dismissing/belittling the product (but ไม่คิดจะซื้อ, แค่มาดูเล่น,
  ก็แค่มาเมิน, ไม่ได้จะซื้อ...) — Thai openers stay politely interested
- fix_openers.py: strip leading dots("..") and remove trailing dismissive
  clauses ('ตามไม่คิดจะซื้อหรอกนะ' etc.) so existing personas are normalized
  to a natural interest opener; update docstring
2026-08-19 10:12:56 +07:00
Macky
165cd840cf fix(script): bootstrap sys.path so 'app' imports regardless of cwd in fix_openers 2026-08-19 10:05:45 +07:00
Macky
9b79e0c53e feat(script): one-time fix_existing personas' openers to natural Thai
Deterministic, conservative: only rewrites openers that lead with a casual
interjection (เฮ้/เอ้/เอ่อ/เอ๊ะ/อืม/เออ/นี่ๆ/ว่าไง/hey/hi/hiya/yo) or a bare
politeness word (ครับ/ค่ะ). Leaves natural Thai and English openers untouched.
Prints before -> after. Run in the container console:
  cd /app/backend && python3 scripts/fix_openers.py
2026-08-19 09:30:35 +07:00