{"id":"data2-pivot-returns-by-reason-table","audience":"operations","category":"spreadsheets","track":"data","technique":"format","level":"beginner","title":"Summarize returns by reason in a sorted table","free":false,"task":"Your ops lead wants the returns reasons summarized. Make one markdown table with columns Reason, Count and % of total, sorted from the most to the least common, with a Total row at the end. Merge reasons that mean the same thing, round percents to one decimal, plain text apart from the table, under 80 words, and put nothing before or after the table.","materialLabel":"Returns log summary (attached to your prompt automatically)","material":"Returns by reason - October (Linden Home Goods)\n\nReason | Count\nWrong size | 46\nDamaged | 14\nDamaged in transit | 4\nLate delivery | 12\nChanged mind | 30\nOther | 9\n\nNotes:\n- \"Damaged\" and \"Damaged in transit\" are the same reason entered two ways by different warehouse staff.\n- The returns desk processed 115 returns in October, which matches the sum of the counts above.\n- The ops lead wants to see which reason to fix first.\n- Percent of total = count / 115 x 100.","rules":[{"type":"plainText"},{"type":"maxWords","max":80}],"mistakes":[{"title":"Leaving reasons split","why":"The AI lists Damaged and Damaged in transit separately.","fix":"Add: \"Merge them into Damaged (14 + 4 = 18).\"","checks":["r0"]},{"title":"No sort order","why":"The AI keeps the log order.","fix":"Add: \"Sort from highest to lowest count.\"","checks":["r1"]},{"title":"Missing the Total row or extra text","why":"The AI adds insights and skips the total.","fix":"Add: \"Last row: Total | 115 | 100.0%. Output only the table.\"","checks":["r2"]},{"title":"Leaving the format to chance","why":"The AI picks its own length and layout unless told the exact shape.","fix":"Add: \"Plain text, no bold or headings.\"","checks":["plainText"]},{"title":"Trusting the AI to count words","why":"AI is bad at counting. Ask for a total word limit and it often lands over it.","fix":"Cap each part instead, for example \"each line under 15 words.\"","checks":["maxWords"]}],"promptHints":[{"label":"Names the columns","patterns":["reason ?\\||columns?","% of total"]},{"label":"Says to merge","patterns":["merge","combine","same reason"]},{"label":"Asks for a sort","patterns":["sort"]},{"label":"Gives the percent rule","patterns":["/ ?115","one decimal"]},{"label":"Asks for a total row","patterns":["total row","100\\.0"]}],"hint":"Say which rows to merge, how to sort, and how to compute the percent. Then say nothing else may appear.","mission":"Summarize returns by reason.","musts":["Merge duplicate reasons","Sorted high to low","Total row"],"rubricLabels":["Damaged and Damaged in transit are merged into one row called Damaged with a count of 18","The rows are sorted by count high to low: Wrong size 46 (40.0%), Changed mind 30 (26.1%), Damaged 18 (15.7%), Late delivery 12 (10.4%), Other 9 (7.8%)","The table ends with a Total row of 115 and 100.0%, and has no text before or after the table"]}