Text Analysis at Scale with Open Language Models

Workflows, validation, and practical lessons

Andrew Katz

Virginia Tech, IDEEAS Lab

Working group, European Survey Research Association AI Special Interest Group, 18 November 2026

You have 2,794 university AI policies. Who decides whether students can use AI?

1,514 (54.2%) leave it to the individual instructor1,280 do not

Each dot is one policy document from one of 326 US research universities.

Coded by an open-weights model on one workstation.

Do you trust that?

The goal: do what a careful team of human coders would do, at a scale no team can afford

A human analyst The workflow

writes memos while reading extracts summary points

recalls the few codes that seem relevant retrieves the nearest existing codes

adds a code only when nothing fits decides: new code or not?

groups codes into themes clusters codes and names themes

Building it meant a series of decisions, each with a logic and a lesson

1Summary points
3Embed and cluster first
4Fewer duplicates
5Human benchmark
Chunk
Extract
Embed
Cluster
Code or not?
Theme
Human coderscompare
2Open-weights models make every maroon judgment

Decision 1: what should the model read at once?

1Summary points
3Embed and cluster first
4Fewer duplicates
5Human benchmark
Chunk
Extract
Embed
Cluster
Code or not?
Theme
Human coderscompare
2Open-weights models make every maroon judgment
The obvious optionGive the model whole documents
What we choseBreak responses into atomic points, guided by the research question

Like an analyst writing memos, the model first breaks each response into atomic points

Decision 1: summary points

“I’m really excited about returning to the office, but I have to admit that I’m worried about how hybrid work arrangements will affect my career advancement. If we’re not in the office regularly, I’ll miss out on watercooler conversations with clients and colleagues, which can lead to new business opportunities. … they tend to get stuck in their own little bubbles … I’m hoping that our company will find a way to balance flexibility with face-to-face interaction …”

  1. 1Excited about returning to the office
  2. 2Concerned about career advancement in hybrid work
  3. 3Fears missing networking with clients and colleagues
  4. 4Believes remote work can lead to isolation
  5. 5Hopes the company balances flexibility with face-to-face time

Return-to-office simulated study; Katz, Coloyan Fleming & Main (2026), Table 4.

Decomposing expands the data on purpose, then each later step contracts it

Decision 1: summary points

One dot per item. Counts from the return-to-office study (Katz et al. 2026); which dot goes where is illustrative.

A policy clause breaks down the same way: one rule, with its parts

Decision 1: summary points

“Temple policy prohibits the use of generative AI tools in a class, unless the instructor explicitly grants permission.”

Who students

Rule may not

Action use generative AI tools in a class

Unless the instructor explicitly grants permission

Human gold label: the instructor decides.

Temple University policy page, from the 45-document human gold set; components follow Crawford & Ostrom’s institutional grammar.

Asking for fewer things at once helped our production model, but not every model

Decision 1: summary points
70% 80% 90% 100% Decision accuracy vs. human gold set: one 13-question prompt → two focused prompts Gemma 4 31B, 4-bit (production) 89 → 93% Gemma 4 31B, bf16 84 → 93% Qwen 3.6 35B 84 → 87% Qwen 3 30B 73 → 76% DeepSeek V4 Flash 84 → 78%

For the production model, precision on “the instructor decides” rose from 87% to 96%, with recall held at 100%.

University AI policy corpus, prompt-decomposition experiment, 45-document gold set (2026).

Extraction is where untrusted text meets your prompt, and models follow planted instructions

Decision 1: summary points

Original prompt 7 of 7 followed the planted instruction

Hardened prompt 0 of 7, and the real content still extracted

Of 6,017 policy pages, 18 contained a line starting Text:, the template’s own data marker.

pygatos hardened extraction prompts (2026); failures were on 2 of 4 models tested.

Decision 2: which model, and where does it run?

1Summary points
3Embed and cluster first
4Fewer duplicates
5Human benchmark
Chunk
Extract
Embed
Cluster
Code or not?
Theme
Human coderscompare
2Open-weights models make every maroon judgment
The obvious optionCall a hosted proprietary model
What we choseRun open-weights models on local hardware

Which open model you pick matters less than you’d think

Decision 2: open-weights models
40% 60% 80% 100% Decision accuracy vs. human gold set (n = 45) Production: Gemma 4 31B, 4-bit, running on one workstation an 80B model ties production worse 53 open-weights model configurations, sorted by accuracy. Bars are 95% bootstrap intervals.

University AI policy corpus, experiment register: paired bootstrap against production, 10,000 resamples (2026).

Running locally makes reproducibility your job

Decision 2: open-weights models

Pin the file, not the model name

A different quantization of the same model changed 8.0% of extracted values.

Log what was actually sent

temperature or 0.7

In Python, 0.0 counts as false. Every step set to temperature 0 ran at 0.7, while the run logs recorded 0.

Decision 3: how should similar ideas find each other?

1Summary points
3Embed and cluster first
4Fewer duplicates
5Human benchmark
Chunk
Extract
Embed
Cluster
Code or not?
Theme
Human coderscompare
2Open-weights models make every maroon judgment
The obvious optionAsk the model about each point on its own
What we choseEmbed and cluster, so the model judges groups of similar points

Clustering puts the same idea, from different universities, side by side

Decision 3: embed and cluster first

4,000 summary points from 115 universities, in the order they were extracted

Grouped by meaning into 400 clusters; nearby clusters say related things

  • “The guidance is presented as a ‘quick guide’ rather than a formal policy document”Boise State
  • “The compiled guidance is offered for the reader’s reference, rather than framed as a requirement”Virginia Tech
  • “The guidelines are characterized as ‘basic’, suggesting introductory, non-exhaustive guidance rather than a comprehensive policy”Michigan
  • “The guidelines supplement established policies”Maryland
  • “The guide includes additional unspecified information (“and more”)”Virginia
≈4,750 points: one model call each
≈515 clusters: one call each

4,000 summary points from 115 universities’ AI policies, clustered for this slide with a small open embedding model.Counts from a separate study, of return-to-office policies.

Bigger embedding models weren’t reliably better, and a keyword baseline came close

Decision 3: embed and cluster first
10M 100M 1B 10B Embedding model size (parameters) 0.30 0.35 0.40 0.45 Held-out F1 vs. human codes keyword baseline (TF-IDF) MiniLM bge-m3 Qwen3-Embedding 0.6B bge-en-icl Qwen3-Embedding 8B Nemotron 8B

auto-qda-v1 benchmark: mean held-out F1 across 8 human-coded datasets; best configuration per model; single seed.

Decision 4: how do you keep the codebook from filling with duplicates?

1Summary points
3Embed and cluster first
4Fewer duplicates
5Human benchmark
Chunk
Extract
Embed
Cluster
Code or not?
Theme
Human coderscompare
2Open-weights models make every maroon judgment
The obvious optionShow the model the whole codebook
What we choseShow only the few nearest existing codes

Every proposed code passes two gates, and the first one never asks the model

Decision 4: fewer duplicates

Real proposed codes and verdicts from the policy corpus (2026); model reasoning excerpted. Totals: one run, 200 policies.

Most of what the similarity cutoff threw away wasn’t a duplicate

Decision 4: fewer duplicates

Raising the cutoff to 0.90 gave 45% more codes with no added redundancy, and cut order effects by about two-thirds.

Same 1,084 proposed codes, one run at each cutoff, three-model panel at gate 2. Shares from audited samples (40 and 36); judge labels, not gold (doc 58, 2026).

One sentence at the second gate decided whether specific codes survived

Decision 4: fewer duplicates
Second-gate instruction, published defaultSecond-gate instruction, revised
“When in doubt, REJECT.”“Redundancy means interchangeable, not related.”
Planted sub-themes
financial rewards for whistleblowing
setting realistic goals for self-improvement
The cost: a codebook 3–8× larger.

Recall: multi-seed fractional factorial on two model setups (pygatos 0.2.0). Sub-themes: misses from the planted-answer runs.

Decision 5: what counts as good enough?

1Summary points
3Embed and cluster first
4Fewer duplicates
5Human benchmark
Chunk
Extract
Embed
Cluster
Code or not?
Theme
Human coderscompare
2Open-weights models make every maroon judgment
The obvious optionScore agreement against a perfect 1.0
What we choseScore against how well humans agree, plus answers we planted

Planted answers: all 24 themes recovered, and 166 of 187 sub-themes matched well

Decision 5: human benchmark
Teammate feedback
54 good, 6 partial, 0 none
Ethical culture
52 good, 9 partial, 3 none
Return to office
60 good, 3 partial, 0 none
good matchpartial matchno match

Each square is one planted sub-theme, judged by the research team. Katz, Coloyan Fleming & Main (2026), HSSC 13:209.

On our own policies, two trained coders agreed 62–95%, depending on the question

Decision 5: human benchmark
60% 70% 80% 90% 100% Raw agreement on 40–45 policies Authority level Disclosure required Who decides (headline) Citation required Syllabus language Sanctions specified AI detectors Data privacy two human coders with each other gold with each human

University AI policy corpus: two independent human annotators on the 45-document gold set (2026).

Our straight line was one of 384 paths, and we tested branches at four of the five forks

Ask every questionat onceGive it wholedocumentsFixed-size chunksOther open modelsHosted proprietarymodel (ruled out)Keyword matchingOther embeddingmodelsOne point at a timeSimilarity cutoffonlyStricter or looserjudgeShow the wholecodebookScore against aperfect 1.01Summary points2Open weights3Embed and cluster4Nearest codes5Human benchmarktested herenot tested

Paths counted from the branches shown. See Gelman and Loken (2013) on the garden of forking paths; Steegen et al. (2016) on multiverse analysis.

What I’d do on Monday

  1. Hand-code a small slice first, with a colleague
  2. Pin and log everything, from the start of the run
  3. Report the statistic, the baseline, and the human ceiling

This work was supported by

National Science Foundation

EAGER award 2107008 CAREER award 2339702 Design for Sustainability award 2300977

Virginia Tech seed grants

Academy of Data Science Institute for Society, Culture, and the Environment

This material is based upon work supported by the National Science Foundation under Award Nos. 2107008, 2339702, and 2300977. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.

Every step is a decision. Make each one visible, and check it against people.

Paper: Katz, Coloyan Fleming & Main (2026), HSSC 13:209
Code: pip install pygatos, github.com/ask-at-z/pygatos
[email protected]

Backup

Backup: the human benchmark caught a problem in our own headline

Both coders agreed: the instructor decides “…prohibits the use of generative AI tools in a class, unless the instructor explicitly grants permission.” Temple University

Both coders disagreed: no stance stated “Cheating: The deliberate use… of unauthorized material… including use of unauthorized work created by artificial intelligence.” Creighton University

Gold coded both as “the instructor decides.” The stricter reading can only lower 54.2%, so we report the headline under both readings.

University AI policy corpus, human annotation round (2026): 4 of 11 re-adjudicated documents split like the right-hand case.

Backup: the headline finding held across model families

Gemma 4 54.2% DeepSeek 54.2% Share of 2,794 documents that leave the AI decision to the instructor

Two model families agree to the decimal. Whether 54.2% counts the right documents is a question for people.

Backup: codes grow more slowly than clusters

0 250 500 Clusters reviewed 0 250 500 Codes in codebook a new code for every cluster 314 codes

Keeping specific codes costs a codebook 3–8× larger.

Recall or parsimony: a choice to make visible, not to bury in a prompt.

Codebook growth, return-to-office study; redrawn from Katz et al. (2026), Fig. 11.

Backup: human ceilings on public multi-coder datasets

0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 Agreement between trained human coders, same data Moral framing (3 coders) Social influence (5 coders) Hate speech (3 coders) Climate contrarianism (2 coders) conventional α threshold (0.667) Krippendorff’s α Gwet’s AC1

Public multi-coder corpora via qda-gold-datasets (2026). The gap is the kappa paradox.

Backup: model disagreement as a review queue

94.5% correct Two models agree 86.2% of values 49.3% correct Disagree 13.8% of values

But agreement isn’t correctness: on one field, when the models agreed they were wrong 81% of the time.

University AI policy corpus, 45-document human gold set (2026).

Backup: the two consolidation prompts, abridged

Published default (V2) Your goal is to build a PARSIMONIOUS codebook… REJECT if ANY apply: semantic duplicate; SUBSET: a specific instance of a broader existing code; near-synonym… When in doubt, REJECT. It is better to have a focused codebook than a bloated one.

Keep unless duplicate A good inductive codebook captures BOTH broad patterns and the specific, recurring concepts within them… REJECT only if same concept, same granularity, no new application… ACCEPT in every other case, including a SPECIFIC INSTANCE of a broader code. Redundancy means interchangeable, not related.

pygatos/prompts.py: NOVELTY_EVALUATION_SYSTEM_V2 and NOVELTY_EVALUATION_SYSTEM_KEEP_UNLESS_DUPLICATE (SHA-pinned in tests).

Backup: what to report

  • Generator model, version, quantization
  • Embedding model and version
  • Temperature, seeds, as sent (from logs)
  • Full prompts in a supplement, with hashes
  • Unit of analysis and segmentation
  • Clustering method and parameters
  • Retrieval depth k and consolidation policy
  • Agreement statistic, human ceiling, baseline

Backup: how the synthetic data were generated

  • Personas, contexts, 8 themes × 8 sub-themes: Llama-3.1-70B
  • Generators varied: WizardLM2-8x22B, Mistral-Nemo-12B, Llama-3.1-8B
  • 18 responses per sub-theme; format failures discarded
  • Reviewed for realism against data from prior studies

Katz, Coloyan Fleming & Main (2026), Methods: Data simulation.

Backup: the qualitative trustworthiness criteria

Lincoln & Guba (1985) Workflow analog
Credibility Planted-theme recovery; comparison with the human ceiling
Transferability Testing across corpora, genres and units of analysis
Dependability Model and quantization sensitivity; pinned versions; manifests
Confirmability Provenance from theme to source text; logged prompts and responses