ToolFlowKit
Research / practical guide

Open-Text Survey Analysis: Build a Codebook Before Asking AI

The questionnaire has a hundred different ways of saying almost the same thing, plus responses that do not fit the expected categories. Define the coding rules before asking AI to count themes. That gives you an analysis another person can inspect and revise.

Create a codebook from a varied sample, test it on held-out responses, review uncertain and multi-topic answers, then report counts with the question and denominator attached. Keep nonresponses distinct from a negative answer.

In this guide
  1. Which denominator belongs under the theme chart?
  2. Check the completed record
  3. Review the categories before interpreting the result
  4. Define the question and unit being counted
  5. Build and test the labels
  6. Generate proposed codes with evidence
  7. Give the team a report they can inspect

Which denominator belongs under the theme chart?

In an authored practice set, four people answer a question about ordering and a fifth leaves it blank. Two answers mention shipping and two mention payment, with one answer mentioning both; the fourth answer is unrelated. There are four theme assignments across three relevant answers. Theme counts and the number of respondents are different totals, and the blank response should be tracked under the chosen denominator policy.

Before producing a chart, write whether percentages refer to all respondents, people who answered this question, or coded mentions. Multi-label theme percentages can overlap. Do not force a chart to total one hundred percent by quietly deleting a secondary theme.

Keep the existing five source responses with this summary. There are four assignments across three relevant answers, not four distinct people with a theme. A multi-label chart need not sum to 100%. The denominator should answer the reporting question and remain the same when another person reproduces the table.

Fictional practice responses: labels describe these records, not a customer population
IDPractice answerAssigned labels
S01Shipping took longer than expected.Shipping
S02Shipping and the payment step were confusing.Shipping; payment
S03I could not finish the payment step.Payment
S04I like the color choices.Out of scope for this ordering question
S05Blank responseMissing answer

Check the completed record

Completed practice review
QuantityPractice countMeaning
All respondents5Includes one blank response
Answered this question4Three theme-relevant answers plus one unrelated
Shipping labels22/4 answered or 2/5 all respondents; state the choice
Payment labels2One answer also has shipping; labels overlap

Review the categories before interpreting the result

Inspect examples from every label as well as the uncertain group. A clean table can conceal a rule that consistently misclassifies sarcasm, mixed views, or short answers. Save changes to the codebook and rerun the affected assignments when the definition changes.

Treat the resulting counts as a description of this response set. Voluntary feedback, missing answers, and the wording of the question can affect what it represents. Use follow-up research when a theme could support several different explanations.

Define the question and unit being counted

Keep the exact survey question and the population that was invited or chose to respond. Decide whether you are counting respondents, response records, or coded mentions. Preserve a stable response ID and remove identifying details unnecessary for the analysis.

Do not combine answers to different questions simply because they share a word. A comment about price in a purchase-barrier question has a different context from a comment about price in a satisfaction question. Record which question and response set each table represents.

Build and test the labels

  1. Read a varied set of responses and draft labels with short definitions.
  2. Add an inclusion example, an exclusion example, and a rule for multi-topic responses to each label.
  3. Keep codes for unclear, out of scope, and missing answers when those distinctions matter.
  4. Apply the codebook to a different response subset and inspect disagreements before coding the full set.
  5. Review uncertain assignments and keep the codebook version beside the final coded table.
  6. Report the denominator, duplicate rule, and whether one response can contribute to several themes.

Generate proposed codes with evidence

Reusable structure
Apply this CODEBOOK VERSION: [version + definitions].
SURVEY QUESTION AND RESPONSE SET: [state]
MULTI-LABEL, MISSING, AND DUPLICATE RULES: [state]
RESPONSES WITH IDS: [paste]

Return each response ID, proposed labels, supporting text, and uncertainty. Keep mixed answers multi-labeled under the supplied rules. Flag new themes instead of silently changing the codebook. Count respondents and assignments separately. Explain the denominator for any percentage. Do not infer a respondent's identity, motive, or demographics.

Give the team a report they can inspect

Include the question, response window, coding method, theme counts, supporting examples, and open questions. Keep the coded table available so a decision-maker can inspect what contributed to the headline rather than relying on the summary alone.

Further reading and implementation examples