{"id":"cx-defect-lot-pattern-flag-table","audience":"product-managers","category":"support-work","technique":"verification","track":"support","level":"intermediate","title":"Count tickets by lot code and flag the lot to escalate","free":false,"task":"Count the tickets by lot code, treating different spellings of the same lot as one and leaving out the ticket with no readable lot. Output a table with the header \"Lot | Tickets | Flag\" sorted from most tickets to fewest, Flag being Yes if the lot has 3 or more tickets. Then a last line \"Escalate: L-###\" (or \"Escalate: none\"). Plain text, under 50 words.","materialLabel":"Your material (attached to your prompt automatically)","material":"KETTLE COMPLAINTS (switch sticks), lot codes from the base label\n#1: lot L-221\n#2: lot L-305\n#3: lot l-221 (typed in lowercase)\n#4: lot L-118\n#5: lot L-221\n#6: customer sent a photo but the label is unreadable\n#7: lot L-305\n#8: lot L-118\n#9: lot L-221\n\nNOTES\nA lot with 3 or more complaints goes to quality for a batch check. We can't flag a lot based on a ticket whose lot we cannot read. The base label is printed on the underside of the kettle. Lot codes always start with L and a dash, followed by three digits, though customers sometimes type them in lowercase. Quality meets on Thursdays to decide on batch checks, so flags sent before Wednesday noon are reviewed that week.","rules":[{"type":"plainText"},{"type":"maxWords","max":50}],"mistakes":[{"title":"Counting lowercase as a separate lot","why":"The AI treats l-221 as its own lot.","fix":"Say: \"Treat spellings of the same lot as one.\"","checks":["r1"]},{"title":"Counting the unreadable ticket","why":"The AI assigns #6 to a lot.","fix":"Say: \"Leave out tickets with no readable lot.\"","checks":["r1"]},{"title":"No summary line","why":"The AI stops at the table.","fix":"Give the last-line format.","checks":["r2"]},{"title":"Getting markdown back","why":"AI adds bold and headings by default, which show up as stray symbols where this is pasted.","fix":"Say \"plain text, no bold, no headings, no asterisks\".","checks":["plainText"]},{"title":"Trusting the AI to count words","why":"AI is bad at counting and usually runs long, so a vague \"keep it short\" lands well over the limit.","fix":"Cap each part instead of the total, for example \"each line under 15 words\".","checks":["maxWords","r0"]}],"promptHints":[{"label":"Gives the header","patterns":["lot \\| tickets \\| flag"]},{"label":"Merges spellings","patterns":["same lot","lowercase","spellings"]},{"label":"States the flag threshold","patterns":["3 or more","3\\+"]},{"label":"Asks for plain text","patterns":["plain","no bold","no markdown","no formatting","no headings"]},{"label":"Sets a length limit","patterns":["\\d+\\s*words","word (limit|count)","under \\d+"]}],"hint":"Give the header, say how to merge spellings and exclude unreadable tickets, and state the flag threshold.","rubricLabels":["The first row is \"Lot | Tickets | Flag\" and the rows are sorted with L-221 first","L-221 has 4 tickets and Flag Yes, L-305 has 2 and No, L-118 has 2 and No (ticket #6 is not counted)","The last line is exactly \"Escalate: L-221\""]}