Skip to content

Commit 5034b7b

Browse files
committed
Enhance SYSTEM_PROMPT in enrich_product.py to emphasize the importance of weight extraction
- Added detailed instructions to the SYSTEM_PROMPT regarding the critical nature of weight in grams for product cataloging. - Specified guidelines for sourcing weight information from various resources and emphasized conversion from other units.
1 parent d2fc80b commit 5034b7b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

app/tasks/enrich_product.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,11 @@ def ai_complete(system: str, user: str, tools: list | None = None, max_retries:
186186
"From the best available product page(s), extract:\n"
187187
"- A product URL (prefer the manufacturer's page if available, otherwise use a retail page)\n"
188188
"- The listed weight and any other specs (R-value, volume, packed size, temperature rating, etc.)\n\n"
189+
"WEIGHT IS CRITICAL: Weight in grams is the single most important spec for our catalog. "
190+
"You MUST make every effort to find it. Check the manufacturer's spec table, the product "
191+
"page details, retail listings (REI, Amazon), and review sites. If weight is listed in "
192+
"oz or lb, convert to grams. Only set weight_grams to null as a last resort when the "
193+
"product genuinely has no published weight (e.g. consumables sold by food weight, not gear weight).\n\n"
189194
"IMPORTANT: A variant is a meaningful product option like size (S/M/L/Regular/Long), color, gender, "
190195
"or volume capacity. Weight measurements (e.g. \"690g\", \"14oz\", \"2lb\"), dimensions, or other specs "
191196
"that appear in the variant field are NOT real variants. If the provided variant is just a weight or "

0 commit comments

Comments
 (0)