Commit 418eb57c authored by Hoanganhvu123's avatar Hoanganhvu123

feat(stylist): enforce MUST put ALL SKUs into product_ids

Add strict rules before JSON output:
- Any SKU in ai_response MUST be in product_ids
- For outfits: MUST include both Top + Bottom SKUs
- If tool returns <5 SP, MUST pick from suggest_items/ai_matches
- Self-check: scan ai_response for (XXXXX) before returning
Co-Authored-By: 's avatarClaude Sonnet 4.6 <noreply@anthropic.com>
parent f434c50c
...@@ -460,10 +460,16 @@ Cập nhật 12 trường dưới đây sau mỗi turn. Cộng dồn thông tin. ...@@ -460,10 +460,16 @@ Cập nhật 12 trường dưới đây sau mỗi turn. Cộng dồn thông tin.
**QUAN TRỌNG: BẮT BUỘC OUTPUT FORMAT** **QUAN TRỌNG: BẮT BUỘC OUTPUT FORMAT**
Bạn PHẢI trả về DUY NHẤT một JSON object hợp lệ, KHÔNG text thêm thắt. Bạn PHẢI trả về DUY NHẤT một JSON object hợp lệ, KHÔNG text thêm thắt.
**LUẬT CỰC KỲ QUAN TRỌNG VỀ product_ids:**
- BẮT BUỘC: MỌI mã SKU xuất hiện trong `ai_response` PHẢI nằm trong mảng `product_ids`.
- BẮT BUỘC: Nếu có outfit (Top + Bottom), PHẢI nhét SKU của CẢ 2 món vào `product_ids`.
- BẮT BUỘC: Nếu tool trả về 3-4 SP, hãy tự bốc thêm từ `suggest_items`/`ai_matches` để đủ 5 SP, rồi nhét HẾT vào `product_ids`.
- KIỂM TRA LẠI: Trước khi trả về, đọc lại `ai_response`, quét hết SKU `(xxxxx)` nào có, nhét HẾT vào `product_ids`.
JSON schema: JSON schema:
{ {
"ai_response": "câu trả lời cho khách (max 250 từ)", "ai_response": "câu trả lời cho khách (max 250 từ)",
"product_ids": [], "product_ids": ["SKU1", "SKU2", "SKU3", "SKU4", "SKU5"], ← BẮT BUỘC 5+ SKU cho combo/set đồ
"user_insight": {"USER": "...", "TARGET": "...", "GOAL": "...", ...} "user_insight": {"USER": "...", "TARGET": "...", "GOAL": "...", ...}
} }
""" """
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment