Founders

How to Compare Two Codebook Versions on the Same Batch

Antonio Evans9 min read

A split-screen scene: on the left, a printed codebook page with a boundary rule highlighted in yellow; on the right, the same page without the rule.
Key points

Key points

  1. 1Running two codebook versions on the same frozen batch, with the same model and parameters, isolates the definition change as the only variable that moved.
  2. 2Report disagreement per theme, not as one overall agreement score, so you can see whether the change touched only the boundary it was written for.
  3. 3List every transcript that flipped, then sort the flips into "boundary cases the new rule targets" and "themes nobody edited."
  4. 4Adopt the new version only when all flips sit on the boundary cases; reject and investigate when a flip reaches a theme you did not touch.

Freeze the batch before you touch the codebook

A codebook comparison is only interpretable if the data, the coder, and the settings are fixed. Start by writing the batch to an immutable snapshot: a folder or dataset version holding the exact transcripts, in the exact form they were coded, with a hash or checksum recorded next to it. If the batch can change between runs, you cannot separate a definition effect from a data effect.

Transcript form matters more than most teams expect. A verbatim transcript keeps every pause and filler word, an intelligent transcript drops them and tidies grammar, and an edited transcript goes further, as the transcription overview from Delve explains. If version A was coded on verbatim text and version B on cleaned text, any disagreement is partly a transcription artifact. Pick one transcript form, record it, and hold it constant.

Two practical rules keep the batch honest:

  • Freeze the unit of analysis. If version A codes speaker turns and version B codes paragraphs, you have changed two things at once. Fix the unit, then change the definition.
  • Pick a batch you know. Include transcripts you have already coded by hand, so you have a reference for what the "right" answer looks like on the cases that matter most.

For a model-assisted run, log the transcript identifiers, the chunking scheme, the exact instructions, the temperature or sampling settings, and the time of the run. A codebook comparison with an unlogged prompt is not reproducible, and reproducibility is the whole point.

Version both codebooks as documents, not as memory

A codebook is an operational document: it lists each code, its definition, and examples of how to apply it, and it is what lets a second analyst code new data the same way, according to Koji's codebook guide. Treat each version as a file with a name and a change log, not as a set of edits held in someone's head.

The Delve guide to building a codebook recommends clear definitions plus examples, and adds non-examples: instances that look close to a code but do not belong. Non-examples are exactly where boundary rules live. When someone proposes "count a complaint as X only if it names a specific feature," that sentence belongs in the exclusion criteria of the new version, alongside the old definition it replaces.

Use a small change record per version:

FieldVersion A (old)Version B (new)
Version labelCodebook A, lockedCodebook B, boundary rule added
Codes changednoneone code, plus one new boundary rule
Codes untouchedall othersall others (asserted, then checked)
Change rationalebaselinerule written for boundary cases seen in review
Statusfrozencandidate, pending comparison

The "codes untouched" row is the claim you are about to test. Write it down before you run anything, because it becomes the decision rule later: if a flip lands in a theme you listed as untouched, the new version has broken something you did not intend to change.

Version control discipline pays off elsewhere too. An essay on annotation drift recommends treating guidelines like code, attaching a guideline version to every label, and re-labeling a small anchor set after each spec change to quantify its impact. That anchor set is your frozen batch, and the impact measure is the comparison you are about to run.

Run both versions under identical conditions

The experiment has one independent variable: the codebook. Everything else stays put. Same transcripts, same order, same unit boundaries, same model, same parameters, same instructions for everything that is not the definition itself.

If you code with a large language model, be aware that the model is not a neutral instrument. A study of open-source models used on patient interviews found that deductive runs produced more codes than inductive ones, that roughly 45 percent of model-generated codes carried meaningful context, and that 22 to 39 percent were duplicative, as reported in the International Journal of Qualitative Methods. Duplication and thin context matter for your comparison: a code that appears twice in one transcript under version B but once under version A may have been "flipped" by repetition, not by the new rule.

Model behavior also shifts with prompt framing. Work on anchoring bias in large language models found that model answers are sensitive to biased hints and that simple prompt techniques were not enough to remove the effect. In practice this means: do not rewrite the instructions in version B beyond the definition you are testing. If you also "improve" the prompt, you cannot attribute the flips to the codebook.

A minimal run manifest, which you can keep as a plain file next to the results:

batch_id:        batch-01-frozen
transcripts:     48 files, checksum recorded
transcript_form: intelligent
unit:            single speaker turn
codebook_A:      sha256: <hash>
codebook_B:      sha256: <hash>
model_settings:  identical across runs
instructions:    identical except the changed definition
run_A_time:      recorded
run_B_time:      recorded

Repeat each run at least twice if your model has any sampling variance, and report how often a transcript disagrees with itself across repeats. Self-disagreement sets a noise floor: a flip between codebook versions that is no larger than the noise floor is not evidence of anything.

Compare assignments theme by theme

Now the comparison itself. Build a table keyed by transcript and theme, with one row per transcript-theme pair, holding the assignment under version A and under version B. Then compute three things per theme:

  1. Count of transcripts coded in A only. The theme lost ground.
  2. Count coded in B only. The theme gained ground.
  3. Count coded under both. Stable, but check the excerpt boundaries.

The difference between counts 1 and 2 is the net change for the theme; the sum is the gross change, which is what you report. Report both. A theme can have a net change of zero while twenty transcripts moved in and twenty moved out, and that churn is a finding.

Agreement statistics exist for exactly this kind of table. Percent agreement, Cohen's kappa, Krippendorff's alpha, and Gwet's AC1 and AC2 each answer slightly different questions, and the inter-coder agreement review in the American Journal of Qualitative Research walks through when each is appropriate. For a codebook comparison, two cautions apply. First, kappa can collapse when one code dominates a theme, which is common in qualitative data; report raw counts next to any coefficient so readers can see what the number is built on. Second, some researchers argue that agreement statistics are a poor fit when the goal is internal consistency rather than replication across teams, a point raised in the same review of inter-coder agreement practice. The Delve guide to intercoder reliability makes the complementary point: the purpose of the exercise is to show that the coding system is clear and transferable, not to produce a trophy score.

A template for the per-theme table:

ThemeEdited in B?BothA onlyB onlyGross flipsVerdict
Theme 1yes, boundary rule added9156flips on target boundary
Theme 2no12202investigate
Theme 3no14000stable
Theme 4yes, clarification only7011flips on clarified case
Theme 5no10336investigate

Read this table as a reviewer would. Theme 3 is clean. Theme 1 moved exactly where the new rule was aimed, which is what success looks like. Theme 4 moved a little, on a case the clarification covers. Themes 2 and 5 moved in directions nobody predicted, and Theme 5 moved in both directions at once, which usually signals an unstable definition rather than a corrected one.

List the transcripts that flipped

Counts tell you where change happened. Transcripts tell you what changed. Keep a flip log with one row per transcript-theme pair where the assignment differs, and include the excerpt that triggered the difference.

For each flip, record the transcript identifier, the theme, the assignment under A, the assignment under B, and the exact span of text. Then classify the flip:

  • On-target flip. The excerpt contains the pattern the new rule was written to handle. Example: version A coded "they never told me the price until the invoice arrived" as a general complaint; version B's new rule says complaints that name a specific missing disclosure get their own code, so the transcript moves.
  • Off-target flip. The excerpt does not involve the new rule at all, yet the assignment moved. This is the red flag.
  • Ambiguous flip. The excerpt could go either way and the coders disagree on the classification. Keep these separate rather than forcing a call, because a cluster of ambiguous flips usually means the new definition is not yet operational.

The Koji codebook guide is a useful rule of thumb here: if a definition is missing its exclusion criteria or its example quote, a second coder will read it differently. An off-target flip is often the model reading a vague definition differently, not the model making an error.

Two checks catch most problems before they reach the report:

  • Read every on-target flip. Confirm the excerpt actually matches the rule, rather than trusting the assignment. It takes an hour for a batch of fifty; skipping it is how a broken rule gets adopted.
  • Read a sample of stable assignments. Pick ten transcript-theme pairs coded under both versions and check them by hand. If some of those are wrong in both versions, your comparison is measuring agreement between two flawed readings, not the effect of the change.

If you are running many versions or need a second pair of eyes at scale, a line of business review is the natural way to get expert judgement on the borderline calls; Quanta Consulting runs a free discovery call where you can describe the batch and the rule you are testing.

Apply the decision rule

The rule is short enough to post next to the results:

  • Adopt the new version if every flip is an on-target flip on the boundary cases the rule was written for, and no theme you marked as untouched moved.
  • Reject and investigate if any flip lands in an untouched theme, or if on-target and off-target flips are mixed beyond what the change log can explain.
  • Revise and rerun if the flips are mostly ambiguous, or if the new definition produces self-disagreement above the noise floor across repeated runs.

Run the rule against the table from the previous section. Theme 1 flips are on-target, so they support adoption. Theme 4's single flip matches the clarification. Themes 2 and 5 have flips that version B's change log does not explain, so this codebook is rejected pending investigation, even though the theme the author cared about moved exactly as intended. That is the whole point of looking per theme: a change that does its job can still damage something else.

A worked number makes the stakes concrete. Suppose the batch has 48 transcripts and the old version coded 9 under Theme 1. The new rule adds 5 and removes 1, so Theme 1 now has 13. If the study reported "9 of 48" in an earlier deliverable, adopting the new version silently changes that figure to 13. Anyone reusing the old number needs to know, so record the change in the codebook's revision note alongside the flip log. This is the audit trail that the inter-coder agreement review describes as part of establishing codebook changes.

When the batch is large or you want to run the comparison for several candidate versions at once, Quanta Inference puts text models behind a single OpenAI-compatible API with prepaid pricing in US dollars, which makes repeated identical runs straightforward to schedule and log.

What to write in the report

Keep the report to one page plus a flip log, and lead with the decision:

  1. Decision and rule. One sentence: adopted, rejected, or revise, and the exact condition that determined it.
  2. Per-theme table. Both versions' assignment counts, gross flips, and net change.
  3. Flip log summary. Counts of on-target, off-target, and ambiguous flips, with the transcript identifiers attached.
  4. Stability note. Self-disagreement rate across repeated runs, so readers know the noise floor.
  5. Revised figures. Any theme totals that change in later deliverables, stated plainly.

A useful sanity check on the report: hand it to someone who did not run the comparison and ask them which theme moved and why. If they cannot answer from the table alone, the table is doing too little work. The collaborative thematic analysis guidance from Delve offers a related tool: a shared space for memos attached to codes and excerpts, which doubles as the audit trail for exactly this kind of version-to-version decision.

One more habit pays for itself: rerun the comparison whenever the boundary rule is edited again. A codebook comparison is a snapshot, and the second edit is the one that tends to break things, because it arrives after everyone has stopped paying attention.

FAQ

FAQ

Why must the model and parameters be identical in both runs?

Because the comparison is only meaningful if the codebook is the only thing that changed. Any difference in model, prompt, chunking, or sampling adds a second explanation for every flip. If a run cannot be repeated with identical settings, treat its output as a suggestion and hand-check the flips before deciding. The anchoring bias findings suggest model answers are sensitive to framing, so untracked prompt edits are a real risk to this design.

What counts as a "theme you did not touch"?

A theme is untouched if neither its definition nor its examples nor its exclusion criteria changed between versions. List those themes before the run and then verify the claim with the per-theme table. A single flip in a theme on that list is enough to reject the change, even if the flip looks harmless, because it means the edit had reach the change log did not anticipate.

How many transcripts do I need in the frozen batch?

Enough that each edited theme appears several times, so a rule that works has something to work on. A batch of forty to fifty transcripts is usually workable for a handful of themes. If a theme appears only once or twice, the comparison cannot tell you much about it, and you should say so in the report rather than reporting an agreement score over very few cases.

Should I use percent agreement or kappa?

Report raw counts first, then a coefficient only if readers expect one, and say which you used and why. Agreement statistics can behave badly when one code dominates a theme, and some methodologists argue they are the wrong tool when the goal is internal consistency rather than replication across teams. Raw counts plus the flip log are informative regardless of which coefficient you choose.

What if the new version flips transcripts in both directions within one theme?

Flips in both directions on the same theme usually mean the new definition is ambiguous rather than corrected. Check the ambiguous flips first: if they cluster on similar excerpts, tighten the inclusion and exclusion criteria and rerun. If the flip count is at or below the noise floor from repeated runs, it may simply be sampling variance, and the honest conclusion is that the change made no measurable difference.

Sources

Sources

  1. Essential Guide to Coding Qualitative Data - Delve Tool
  2. How to Build a Qualitative Research Codebook (With ...
  3. How to Create A Codebook for Thematic Analysis
  4. The Myth of “Clean Labels” in ML. Why annotation drift ...
  5. Large Language Models in Qualitative Analysis
  6. Anchoring bias in large language models: an experimental study
  7. inter-coder-agreement-in-qualitative-coding-considerations ...
  8. Intercoder Reliability in Qualitative Research
  9. Collaborative Thematic Analysis in Qualitative Research
About the author

About the author

Antonio Evans
Antonio Evans

Antonio Evans is the founder of Quanta Intelligence and a fractional CTO who builds HIPAA-ready AI systems for health and life-science companies. Before that he was technical co-founder of FriendsEAT for twenty years, CEO of Socialdraft, and a data engineer at IBM. Antonio lives with his dog Santino in Lisbon, Portugal.

All articles