{"id":"cs-pulse-survey-reverse-scored-json","audience":"customer-success","category":"support-work","technique":"constraints","track":"support","level":"advanced","title":"Score a reverse-worded pulse question and return JSON","free":false,"task":"Return one code block with a JSON object with exactly the keys scores, n and average. The statement is negatively worded, so reverse-score: Strongly agree = 1, Agree = 2, Neutral = 3, Disagree = 4, Strongly disagree = 5. scores lists the numbers in the order received, skipping blank answers. n is how many scores. average is the mean to one decimal. Write no more than 6 words outside the block.","materialLabel":"Your material (attached to your prompt automatically)","material":"PULSE SURVEY - day 30 - Statement: \"It is hard to find what I need in the product.\"\nAnswers from Dunmore Logistics admins (in the order received):\n1. Agree\n2. Strongly disagree\n3. Neutral\n4. Disagree\n5. (left blank)\n6. Strongly agree\n\nContext: Dunmore Logistics went live 30 days ago with 14 admins invited. The day-30 pulse has three statements and this is the third. The survey tool exports answers as text, one per row, and shows 6 rows, but only 5 contain an answer. Two of the responses came from the same depot. The customer's operations lead asked for a quick number she can put in her Friday update.","rules":[{"type":"codeBlocks","count":1},{"type":"maxCodeLines","max":6},{"type":"maxProseWords","max":6}],"mistakes":[{"title":"Scoring it the normal way","why":"The AI gives Strongly agree a 5.","fix":"Say: \"The statement is negative, so reverse-score: Strongly agree = 1.\"","checks":["r1"]},{"title":"Counting the blank","why":"The AI treats a blank as 0 or counts 6 responses.","fix":"Say: \"Skip blank answers; n counts only real answers.\"","checks":["r1","r2"]},{"title":"Adding prose","why":"The AI explains the scoring.","fix":"Say: \"One code block, no more than 6 words outside.\"","checks":["r0","codeBlocks","maxProseWords"]},{"title":"Letting the block sprawl","why":"The AI pretty-prints and adds extra lines.","fix":"Say \"keep the block under N lines\".","checks":["maxCodeLines"]}],"promptHints":[{"label":"Gives the keys","patterns":["scores","average","n"]},{"label":"States reverse scoring","patterns":["reverse","strongly agree = 1","negative"]},{"label":"Skips blanks","patterns":["blank","skip"]},{"label":"Asks for one decimal","patterns":["one decimal","mean"]},{"label":"Asks for one code block","patterns":["code block","json","csv"]},{"label":"Keeps the block short","patterns":["lines","one line","compact"]},{"label":"Limits text outside the block","patterns":["no (intro|notes|text|words)","only the","nothing (else|outside)"]}],"hint":"Reverse-scored items are a classic trap. State the mapping, the blank rule and the exact keys.","mission":"Score the negatively worded survey question and average the answers.","musts":["Reverse the scale","Skip blank answers","Average to one decimal"],"rubricLabels":["The code block holds one JSON object with exactly the keys scores, n and average","scores is [2, 5, 3, 4, 1] in that order, with the blank answer skipped, and n is 5","average is 3.0 (the sum 15 divided by 5), written as a number"]}