{"id":"cx-refund-decision-json-partial","audience":"customer-support","category":"support-work","technique":"constraints","track":"support","level":"advanced","title":"Return a refund decision as small JSON with a partial approval","free":false,"task":"Decide Rhea's refund against the policy and return one JSON code block and nothing else. Keys: decision (exactly one of \"approve\", \"partial\", \"deny\"), amount_usd (a number), reason (12 words or fewer). At most 6 lines of code.","materialLabel":"Your material (attached to your prompt automatically)","material":"POLICY\n- Duplicate charges are refunded in full when reported within 60 days of the charge.\n- Monthly plans are never refunded for months already used, whether or not the customer used the product.\n- Annual plans: refund for unused full months only.\n\nTICKET #4402 (Nov 6) from Rhea Das\nPlan: Monthly, $29 per month, for 7 months.\nCharges seen in her statement: $29 on Oct 3 appears twice (duplicate).\nHer message: \"I was charged twice on Oct 3, please refund the extra one. Also, I barely used the product these past 6 months, so please refund those $174 too.\"\n\nAgent note: 'She seems nice. Maybe refund all of it?'","rules":[{"type":"codeBlocks","count":1},{"type":"maxCodeLines","max":6}],"mistakes":[{"title":"Refunding everything","why":"The agent note makes the AI generous and it approves $203.","fix":"Say: \"The policy decides, not the agent's feelings.\"","checks":["r1"]},{"title":"Overlong reason","why":"The AI writes a paragraph in the reason field.","fix":"Say: \"reason: 12 words or fewer.\"","checks":["r2"]},{"title":"Extra text","why":"The AI adds an explanation outside the JSON.","fix":"Say: \"One JSON code block, nothing else.\"","checks":["r0"]},{"title":"Skipping the code block shape","why":"The AI splits output into several code blocks or none.","fix":"Say \"exactly one code block and nothing else\".","checks":["codeBlocks"]},{"title":"Letting the code sprawl","why":"The AI adds extra lines and comments.","fix":"Say \"at most N lines of code\".","checks":["maxCodeLines"]}],"promptHints":[{"label":"Asks for one code block","patterns":["code block","```"]},{"label":"Caps the code length","patterns":["lines"]},{"label":"Names the keys and values","patterns":["decision","amount_usd","partial"]},{"label":"Follows the policy","patterns":["policy","duplicate","monthly"]}],"hint":"A decision object needs fixed keys, allowed values and a short reason. Tell the AI the policy outranks sympathy.","rubricLabels":["The output is exactly one JSON code block with the keys decision, amount_usd and reason, and nothing outside it","decision is \"partial\" and amount_usd is 29 (not 203 or 174)","reason is 12 words or fewer and refers to the duplicate charge being refunded and the monthly months not being refunded"]}