{"id":"agent-par-grocery-cart-allergy-safe","audience":"parents","category":"agents","track":"agents","technique":"context","title":"Brief an assistant to fill a grocery cart safely and cheaply","free":false,"task":"You want an AI assistant to fill this week's grocery cart from your meal plan. Write its brief: your son has a peanut allergy, so no peanut products go in the cart (ask you about a swap instead), pick the store brand when it's cheaper, show each line's math (qty x price), and never check out. Output exactly 7 numbered plain-text lines: 5 add_to_cart lines in meal-plan order, an ASK_HUMAN line, then DONE with the total as math.","materialLabel":"Meal plan, store prices and actions (attached to your prompt automatically)","material":"Meal plan, week of Nov 9 (family of 4)\nShopping list from the plan:\n- Chicken thighs, 2 packs\n- Jasmine rice, 1 bag\n- Broccoli, 3 heads\n- Pasta, 2 boxes\n- Milk, 2 gallons\n- Satay peanut sauce, 1 jar (for Thursday's stir-fry)\n\nStore prices (FreshCart)\nChicken thighs, family pack: $8.00\nJasmine rice, 5 lb: $5.00\nBroccoli, per head: $2.00\nPasta: Bellano brand $2.50 / Market Basics (store brand) $1.50\nMilk, 1 gallon: $4.00\nSatay peanut sauce: $4.00\nTeriyaki sauce: $3.50\n\nSaved payment: Visa ending 2291. Delivery slot held: Sat 10-11 a.m.\n\nAvailable actions:\nadd_to_cart(item, qty, math)\ncheckout(slot)\nASK_HUMAN(question)\nDONE(summary)","rules":[{"type":"numberedItems","count":7},{"type":"plainText"}],"promptHints":[{"label":"Mentions the allergy","patterns":["peanut","allerg"]},{"label":"Prefers the store brand","patterns":["store brand","cheaper","market basics"]},{"label":"Asks for the math","patterns":["math","qty ?x","price"]},{"label":"Forbids checkout","patterns":["check ?out","order","pay"]},{"label":"Shows the action-log format","patterns":["action:","action log","numbered","\\b1\\.","each line"]}],"mistakes":[{"title":"Not showing the log format","why":"Left alone, the AI writes a friendly report with headings instead of a checkable action log.","fix":"Show it literally: \"Format every line like 1. ACTION: tool(args), then ASK_HUMAN: and DONE: lines. Plain text.\"","checks":["numberedItems","plainText"]},{"title":"Hiding the math","why":"The AI lists items without prices, and you can't check the total.","fix":"Say: \"On each line, show qty x price = cost. Pick the store brand when cheaper.\"","checks":["r0"]},{"title":"Leaving out the allergy","why":"The AI follows the meal plan and adds peanut sauce.","fix":"Add: \"My son has a peanut allergy. No peanut products; ask me about a swap.\"","checks":["r1"]},{"title":"Letting it check out","why":"With a saved card and slot ready, the AI places the order.","fix":"Add: \"Never check out. End with DONE showing the total as math.\"","checks":["r2"]}],"hint":"Shopping agents follow the list exactly. Tell this one about the allergy, your brand rule, and that checkout is yours.","rubricLabels":["Each add_to_cart line shows qty x price, and the pasta is Market Basics at 2 x $1.50 = $3.00","The satay peanut sauce is not added; an ASK_HUMAN line asks about a swap for it","There is no checkout line, and the DONE line shows the total as math ($16 + $5 + $6 + $3 + $8 = $38)"]}