SamiKoen commited on
Commit
abca286
·
1 Parent(s): 916ea95

Use exact same GPT-5 prompt from working BF space

Browse files

- Copy identical prompt structure from BF space
- Include GOBIK brand rules
- Include product type understanding
- Keep same examples and format

Files changed (1) hide show
  1. smart_warehouse_complete.py +18 -7
smart_warehouse_complete.py CHANGED
@@ -188,21 +188,32 @@ def get_warehouse_stock_smart_complete(user_message):
188
  # GPT-5 prompt with enhanced instructions
189
  smart_prompt = f"""User is asking: "{user_message}"
190
 
191
- CRITICAL: Find products where the NAME contains "{user_message.upper()}".
192
- For example, if user asks "madone sl 6", find products where name contains "MADONE SL 6".
193
- DO NOT return products with different names even if they seem similar.
194
-
195
  If user asks about specific size (S, M, L, XL, XXL, SMALL, MEDIUM, LARGE, X-LARGE), return only that size.
196
  If user asks generally (without size), return ALL variants of the product.
197
  {warehouse_filter}
198
 
 
 
 
 
 
 
 
 
 
 
199
  Products list (with warehouse availability):
200
  {json.dumps(products_summary, ensure_ascii=False, indent=2)}
201
 
202
- Return ONLY index numbers of products where the name contains "{user_message.upper()}".
203
- Return as comma-separated list (e.g., "5,8,12,15").
204
  If no products found, return ONLY: -1
205
- DO NOT return empty string or any explanation, ONLY numbers or -1"""
 
 
 
 
 
206
 
207
  headers = {
208
  "Content-Type": "application/json",
 
188
  # GPT-5 prompt with enhanced instructions
189
  smart_prompt = f"""User is asking: "{user_message}"
190
 
191
+ Find ALL products that match this query from the list below.
 
 
 
192
  If user asks about specific size (S, M, L, XL, XXL, SMALL, MEDIUM, LARGE, X-LARGE), return only that size.
193
  If user asks generally (without size), return ALL variants of the product.
194
  {warehouse_filter}
195
 
196
+ IMPORTANT BRAND AND PRODUCT TYPE RULES:
197
+ - GOBIK: Spanish textile brand we import. When user asks about "gobik", return ALL products with "GOBIK" in the name.
198
+ - Product names contain type information: FORMA (jersey/cycling shirt), TAYT (tights), İÇLİK (base layer), YAĞMURLUK (raincoat), etc.
199
+ - Understand Turkish/English terms:
200
+ * "erkek forma" / "men's jersey" -> Find products with FORMA in name
201
+ * "tayt" / "tights" -> Find products with TAYT in name
202
+ * "içlik" / "base layer" -> Find products with İÇLİK in name
203
+ * "yağmurluk" / "raincoat" -> Find products with YAĞMURLUK in name
204
+ - Gender: UNISEX means for both men and women. If no gender specified, it's typically men's.
205
+
206
  Products list (with warehouse availability):
207
  {json.dumps(products_summary, ensure_ascii=False, indent=2)}
208
 
209
+ Return ONLY index numbers of ALL matching products as comma-separated list (e.g., "5,8,12,15").
 
210
  If no products found, return ONLY: -1
211
+ DO NOT return empty string or any explanation, ONLY numbers or -1
212
+
213
+ Examples of correct responses:
214
+ - "2,5,8,12,15,20" (multiple products found)
215
+ - "45" (single product found)
216
+ - "-1" (no products found)"""
217
 
218
  headers = {
219
  "Content-Type": "application/json",