{"id":"cx-duplicate-tickets-merge-json","audience":"customer-support","category":"support-work","technique":"format","track":"support","level":"advanced","title":"Group duplicate tickets into a JSON merge list","free":false,"task":"Find the duplicate tickets and return a JSON array in one code block and nothing else. Each item has \"keep\" (the oldest ticket id), \"merge\" (an array of the other ids) and \"reason\" (under 8 words). Only merge tickets from the same customer about the same issue. Leave tickets with no duplicate out of the array. Use at most 14 lines of code.","materialLabel":"Your material (attached to your prompt automatically)","material":"ID     | Customer  | Opened     | Subject\nT-5101 | acme-corp | Nov 1 9:05 | Can't export report to CSV\nT-5102 | zenfit    | Nov 1 9:40 | Can't export report to CSV\nT-5105 | acme-corp | Nov 1 14:20| Re: export button greyed out\nT-5110 | brightly  | Nov 2 8:15 | Invoice shows wrong tax rate\nT-5111 | acme-corp | Nov 2 8:30 | Add new user fails with error 500\nT-5113 | brightly  | Nov 2 11:00| Wrong VAT on invoice 2210\nT-5118 | zenfit    | Nov 3 10:10| Need to change billing email\nT-5120 | acme-corp | Nov 3 13:00| Export to CSV still broken, please escalate\n\nNotes: T-5105 body confirms same CSV export problem as T-5101. T-5113 body says VAT 20% should be 8%, same as T-5110. T-5102 is zenfit's own first report of its export problem.","rules":[{"type":"codeBlocks","count":1},{"type":"maxCodeLines","max":14}],"mistakes":[{"title":"Merging across customers","why":"T-5102 has the same subject as T-5101, so the AI merges two different customers.","fix":"Add: \"Only merge tickets from the same customer.\"","checks":["r2"]},{"title":"Listing tickets with no duplicate","why":"The AI includes every ticket, with an empty merge array for the singles.","fix":"Say: \"Leave out tickets that have no duplicate.\"","checks":["r2"]},{"title":"Missing subject-line variants","why":"Tickets T-5105 and T-5113 are worded differently, so the AI misses them.","fix":"Ask: \"Match by issue, not by exact subject. Read the notes.\"","checks":["r1"]},{"title":"Wrong shape","why":"The AI adds prose or a table around the JSON.","fix":"Say: \"One JSON code block, nothing else, keys keep, merge, reason.\"","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","maxCodeLines"]}],"promptHints":[{"label":"Asks for one code block","patterns":["code block","```"]},{"label":"Caps the code length","patterns":["lines"]},{"label":"Names the keys","patterns":["keep","merge","reason"]},{"label":"Sets the match rule","patterns":["same customer","oldest"]}],"hint":"Spell out the match rule (same customer, same issue), what to leave out, and the exact keys and shape.","rubricLabels":["Output is a single JSON code block containing an array, and every item has the keys keep, merge and reason","The acme-corp group keeps T-5101 and merges T-5105 and T-5120, and the brightly group keeps T-5110 and merges T-5113","T-5102 is not merged into the acme-corp group, T-5111 and T-5118 do not appear in any item, and every reason is under 8 words"]}