Review survey questions for leading wording and missing options
Have Claude review draft survey questions for leading wording and missing options, then check by script that planted defects were caught and fixed.
When drafting customer satisfaction surveys, subtle flaws such as leading adjectives, double-barreled questions, or missing options can distort the collected data. Feeding a checklist to Claude isolates only defective questions into a structured table, and a verification script cross-checks the findings against expected defects. The pattern of extracting isolated revisions into a table mirrors proofread change table.
[1] Prepare the draft survey file. Below is a 10-question satisfaction survey for a local fitness facility, with five deliberate design defects: a leading question (Q2), a double-barreled question (Q4), an unbalanced scale (Q6), missing exhaustiveness options (Q7), and overlapping numerical intervals (Q9).
Q1. How often do you visit our fitness center?- 1) 1-2 times a week 2) 3-4 times a week 3) 5+ times a week 4) 1-3 times a monthQ2. How satisfied are you with our center's spacious and pleasant weight training zone?- 1) Very satisfied 2) Satisfied 3) Neutral 4) Dissatisfied 5) Very dissatisfiedQ3. What time of day do you primarily use the center?- 1) Morning (06:00-12:00) 2) Afternoon (12:00-18:00) 3) Evening (18:00-23:00)Q4. Are the locker room cleanliness and shower water pressure satisfactory?- 1) Strongly agree 2) Agree 3) Neutral 4) Disagree 5) Strongly disagreeQ5. What is your primary fitness goal?- 1) Weight loss 2) Muscle gain 3) General fitness 4) Rehabilitation & postureQ6. Please rate the friendliness of our trainers.- 1) Very satisfied 2) Satisfied 3) Neutral 4) Somewhat dissatisfiedQ7. Which cardio machine do you primarily use?- 1) Treadmill 2) Stationary bike 3) Stair climberQ8. Where do you usually check center notices and events?- 1) Facility bulletin board 2) Mobile messaging channel 3) Official social mediaQ9. On average, how long is your workout per visit?- 1) Less than 30 minutes 2) 30 minutes - 1 hour 3) 1 hour - 2 hours 4) 2 hours or moreQ10. Do you intend to renew your membership or recommend us to others?- 1) Definitely yes 2) Probably yes 3) Neutral 4) Probably not 5) Definitely not[2] Construct the review prompt. In accordance with Anthropic's prompt engineering guide, XML tags isolate instructions, review criteria, and raw input text. This self-correction chain forces the model to evaluate questions against explicit rules and exclude defect-free questions from the output table.
You are an expert survey designer and reviewer. Review the provided draft survey questions against the checklist, identify only the defective questions, and output the revised versions as a table. <checklist>1. Leading Question: Check for flattering adjectives, assumptions, or phrasing that nudges respondents toward a positive answer.2. Double-Barreled Question: Check if a single question asks about two distinct attributes or experiences at once.3. Unbalanced Scale: Check if rating scale options are asymmetric (e.g., more positive options than negative) or lack neutral balance.4. Missing Option: Check if multiple-choice options lack essential alternatives, such as "Other" or "Not applicable / Do not use".5. Overlapping Range: Check if numerical or time intervals overlap at boundary values, causing ambiguity.</checklist> <rules>- Exclude defect-free questions and output only defective questions as a Markdown table: | ID | Defect_Type | Flaw_Explanation | Revised_Question |- Defect_Type: [Leading Question, Double-Barreled Question, Unbalanced Scale, Missing Option, Overlapping Range].- Flaw_Explanation: 1-2 concise sentences explaining the issue. Revised_Question: complete revised question.- Output only the table without surrounding remarks.</rules> <survey_questions>(10 draft questions)</survey_questions>[3] Execute the prompt and inspect the output. The execution turns off tools and global instructions for a clean single-turn run.
$ claude -p --model claude-sonnet-5-5 --max-turns 1 --tools "" --setting-sources "" --strict-mcp-config < run/survey_bias.en.1.prompt.txt > run/survey_bias.en.1.out.txtRaw output from run/survey_bias.en.1.out.txt:
| ID | Defect_Type | Flaw_Explanation | Revised_Question ||---|---|---|---|| Q2 | Leading Question | The adjectives "spacious and pleasant" presuppose a positive experience and nudge respondents toward a favorable rating. | How satisfied are you with our center's weight training zone?<br>1) Very satisfied 2) Satisfied 3) Neutral 4) Dissatisfied 5) Very dissatisfied || Q3 | Overlapping Range | Boundary times 12:00 and 18:00 belong to two options at once, and 23:00-06:00 is not covered. | What time of day do you primarily use the center?<br>1) Morning (06:00-11:59) 2) Afternoon (12:00-17:59) 3) Evening (18:00-22:59) 4) Late night / early morning (23:00-05:59) || Q4 | Double-Barreled Question | It asks about locker room cleanliness and shower water pressure in one item, so a respondent who feels differently about each cannot answer accurately. | Q4a. The locker room is clean.<br>Q4b. The shower water pressure is satisfactory.<br>(Each: 1) Strongly agree 2) Agree 3) Neutral 4) Disagree 5) Strongly disagree) || Q6 | Unbalanced Scale | The scale has three positive options and only one mild negative option ("Somewhat dissatisfied"), with no "Dissatisfied" or "Very dissatisfied". | Please rate your satisfaction with the friendliness of our trainers.<br>1) Very satisfied 2) Satisfied 3) Neutral 4) Dissatisfied 5) Very dissatisfied || Q7 | Missing Option | The list omits other machines and people who do not use cardio machines, so they are forced into an inaccurate answer. | Which cardio machine do you primarily use?<br>1) Treadmill 2) Stationary bike 3) Stair climber 4) Other (please specify) 5) I do not use cardio machines || Q8 | Missing Option | There is no option for other channels or for respondents who do not check notices at all. | Where do you usually check center notices and events?<br>1) Facility bulletin board 2) Mobile messaging channel 3) Official social media 4) Other (please specify) 5) I do not check notices and events || Q9 | Overlapping Range | "1 hour" appears in both option 2 and option 3, and "2 hours" appears in both option 3 and option 4. | On average, how long is your workout per visit?<br>1) Less than 30 minutes 2) 30 minutes to less than 1 hour 3) 1 hour to less than 2 hours 4) 2 hours or more || Q10 | Double-Barreled Question | It asks about renewal intent and recommendation intent together, which are distinct attitudes that may differ for one respondent. | Q10a. Do you intend to renew your membership?<br>Q10b. Do you intend to recommend us to others?<br>(Each: 1) Definitely yes 2) Probably yes 3) Neutral 4) Probably not 5) Definitely not) |All five intentional defects (Q2, Q4, Q6, Q7, Q9) were captured. In addition, Claude flagged Q3 (overlapping hours and missing late night interval), Q8 (missing option for other channels or non-checkers), and Q10 (double-barreled inquiry combining renewal and recommendation), totaling 8 flagged questions. Q1 and Q5 were left out of the table as clean questions.
[4] Compare with a second run (run/survey_bias.en.2.out.txt). Across both runs, 8 questions (Q2, Q3, Q4, Q6, Q7, Q8, Q9, Q10) were flagged in common. The second run also flagged Q1 under Missing Option, pointing out that members visiting less than once a month had no suitable choice and that options were not ordered logically. For Q3, the first run classified the issue as Overlapping Range, while the second run categorized it as Missing Option due to the missing midnight window.
[5] Write a verification script. For each of the 5 planted defects (Q2, Q4, Q6, Q7, Q9) it checks that:
- the question is in the table with the expected defect type
- the revision actually removes the defect:
Q2no longer has the leading words (spacious, pleasant);Q4is split in two;Q6has both "Very satisfied" and "Very dissatisfied";Q7has an "Other" or "do not use" option;Q9cuts its boundaries with "less than" in 3 or more places
Questions flagged outside the 5 planted are only listed as INFO. Whether a revision reads well, or whether the scale numbering is right, is not checked.
#!/usr/bin/env python3"""usage: python check_survey_en.py <result.txt>Checks that the 5 planted defects are in the table, labeled with the right type, and thateach revision actually removes that defect."""import re, sys lines = [l.strip() for l in open(sys.argv[1], encoding="utf-8") if l.strip().startswith("|")]rows = [[c.strip() for c in l.strip("|").split("|")] for l in lines[2:]]if not rows: print("FAIL: no table"); sys.exit(1) ids = [r[0] for r in rows]errs = [f"{i} appears twice" for i in sorted(set(ids)) if ids.count(i) > 1]errs += [f"{r[0]}: {len(r)} columns" for r in rows if len(r) != 4]by_id = {r[0]: r for r in rows if len(r) == 4} # question -> (expected defect type, what the revision must show, test)rules = { "Q2": ("Leading Question", "the leading words (spacious, pleasant) are gone", lambda s: "spacious" not in s.lower() and "pleasant" not in s.lower()), "Q4": ("Double-Barreled Question", "the question is split in two (Q4a/Q4b or Q4-1/Q4-2)", lambda s: len(re.findall(r"Q4[-a-z]\d?\b", s)) >= 2), "Q6": ("Unbalanced Scale", "both extremes 'Very satisfied' and 'Very dissatisfied' are present", lambda s: "Very satisfied" in s and "Very dissatisfied" in s), "Q7": ("Missing Option", "an 'Other' or 'do not use' option is present", lambda s: "Other" in s or "do not use" in s.lower()), "Q9": ("Overlapping Range", "boundaries are cut with 'less than' (3 or more places)", lambda s: s.lower().count("less than") >= 3),}for qid, (kind, what, ok) in rules.items(): r = by_id.get(qid) if not r: errs.append(f"{qid}: not in the table"); continue if r[1] != kind: errs.append(f"{qid}: defect type {r[1]!r} (expected {kind!r})") if not ok(r[3]): errs.append(f"{qid}: revision fails - {what}") for e in errs: print("FAIL:", e)extra = [i for i in ids if i not in rules]print(f"INFO: questions flagged outside the 5 planted: {extra}")print(f"SUMMARY: {len(rows)} questions flagged, {len(errs)} errors")sys.exit(1 if errs else 0)Run it on the first English execution. The second run passed the same way.
$ python run/check_survey_en.py run/survey_bias.en.1.out.txtINFO: questions flagged outside the 5 planted: ['Q3', 'Q8', 'Q10']SUMMARY: 8 questions flagged, 0 errors[6] Test the script against hand-edited bad inputs (not model output). All 4 exit with code 1: test_bad_missing_target.en.txt (Q2 missing, Q6 and Q7 not fixed), test_bad_scale.en.txt (Q6 revision without both extremes), test_bad_type.en.txt (wrong defect type for Q2) and test_bad_split.en.txt (Q4 not split). The scale case:
$ python run/check_survey_en.py run/test_bad_scale.en.txtFAIL: Q6: revision fails - both extremes 'Very satisfied' and 'Very dissatisfied' are presentINFO: questions flagged outside the 5 planted: ['Q3', 'Q8', 'Q10']SUMMARY: 8 questions flagged, 1 errors[7] Practical trade-offs require human editorial judgment:
- Splitting questions alters survey length: For
Q4andQ10, Claude appropriately splits double-barreled items into two sub-questions (Q4a/Q4b,Q10a/Q10b). Expanding questions increases respondent drop-off, so survey managers must decide whether to retain both sub-questions or drop the less relevant attribute. - Mathematical rigor versus mobile readability: In
Q3andQ9, Claude introduces explicit boundaries ("30 minutes to less than 1 hour"). While strictly disjoint, concise conversational ranges such as "30-59 min" and "1-2 hours" may prove easier to read on mobile screens, and that is a choice for the survey owner. - A miscount in the explanation: for
Q6both English runs wrote "three positive options", but the draft has two positive options and one neutral. The revised scale is fine; the explanation sentence is wrong, so read the Flaw_Explanation column too. - Coverage varies:
Q5(no "Other" goal option) was flagged in both Korean runs of the same survey but in neither English run, and only the second English run flaggedQ1. The list of extra flags changes between runs, so read theINFOlist.