{"id":"ops-facilities-ticket-json-from-email","audience":"operations","category":"operations-work","track":"operations","technique":"format","level":"intermediate","title":"Turn a rambling facilities email into a ticket as JSON","free":false,"task":"Facilities tickets are entered from JSON. Write a prompt for exactly one code block holding a JSON object with exactly these keys: location, issue, urgency, safety_hazard, reported_by, phone_ext, other_issues. Urgency is low, medium or high, and is high whenever water or damage is near electrical equipment. The ticket covers the main problem only; list the other problems in other_issues as short strings. No text outside the block.","materialLabel":"Your material (attached to your prompt automatically)","material":"From: Jamal Ortiz, Accounts Payable\nSubject: break room stuff\n\nHi facilities,\n\nThe dishwasher in the 3rd floor east break room started leaking this morning around 8:15 and water is spreading across the floor toward the power strip where the microwave is plugged in. I put some towels down but they're soaked already. That's the main thing.\n\nNot urgent, but the break room door has been sticking for weeks, and the printer on 3 is out of toner again.\n\nIf you need me my extension is 5512.\n\nThanks,\nJamal","rules":[{"type":"codeBlocks","count":1},{"type":"maxCodeLines","max":16},{"type":"maxProseWords","max":5}],"promptHints":[{"label":"Lists the exact keys","patterns":["location","safety_hazard","phone_ext","other_issues"]},{"label":"Defines urgency","patterns":["urgency","high","electrical"]},{"label":"Separates main from other issues","patterns":["main (problem|issue)","other_issues"]},{"label":"Asks for a JSON code block","patterns":["json","code block"]}],"mistakes":[{"title":"Downgrading urgency","why":"The AI trusts 'not urgent' in the email.","fix":"Say: \"urgency is high when water or damage is near electrical equipment.\"","checks":["r1"]},{"title":"Mixing issues together","why":"The AI puts the door and printer into the main issue.","fix":"Say: \"issue = the main problem only; the rest go in other_issues.\"","checks":["r2"]},{"title":"Invented or missing keys","why":"The AI adds fields like priority or building.","fix":"List the exact keys and say \"exactly these keys\".","checks":["r0"]},{"title":"Extra text around the code","why":"The AI adds explanations, extra blocks or comments around the output.","fix":"Say \"exactly one code block, nothing else\" and cap the rows.","checks":["codeBlocks","maxCodeLines","maxProseWords"]}],"hint":"List the keys, define urgency and say what goes in other_issues.","mission":"Turn the rambling facilities email into one clean ticket.","musts":["Water near electrical is high","Main problem only","Others in other_issues"],"rubricLabels":["The output is one code block with a JSON object containing exactly the keys location, issue, urgency, safety_hazard, reported_by, phone_ext and other_issues","location is the 3rd floor east break room, urgency is \"high\" and safety_hazard is true because the water is spreading toward a power strip (the sender calling the other items not urgent does not lower it)","reported_by is Jamal Ortiz, phone_ext is 5512, and other_issues lists the sticking door and the printer toner but not the leak"]}