01 · The Question
If AI Assigns the Same Codes Every Time, Can You Trust the Results?
You ask generative AI to classify 500 open-ended survey responses using a predefined codebook. To check its reliability, you repeat the task. The model assigns nearly identical codes both times. When you compare the results, agreement is remarkably high.
Does this mean the coding is valid?
Not necessarily. A model can consistently misunderstand a participant's statement, repeatedly overlook an important category, or apply a flawed coding framework without variation. The resulting classifications may appear dependable because they are stable, even when they misrepresent the data.
This distinction matters whenever researchers use AI-coded responses to support findings, compare participant groups, or make institutional and policy recommendations.
03 · What You Need to Know
Why AI Coding Consistency and Validity Are Different
What Does Consistency Mean in AI-Assisted Coding?
Consistency refers to the stability or uniformity of coding decisions under specified conditions. In structured classification tasks, researchers may examine whether identical responses receive the same codes across repeated runs or whether comparable responses are classified according to the same decision rules.
Several forms of consistency are relevant:
-
Repeat-run stability: Whether the same input receives the same classification when the AI procedure is repeated.
-
Within-dataset consistency: Whether comparable responses are treated similarly within one dataset.
-
Between-batch consistency: Whether coding rules remain stable across separately processed groups of responses.
-
Agreement with another coder: Whether AI assignments match those made by a human coder or another coding system.
These properties provide different information. A model might be stable across repeated runs but disagree substantially with a human-developed reference set. Conversely, some disagreement with human coders may reflect genuine ambiguity rather than a simple model failure.
The operational challenges become especially relevant when coding thousands of text responses, where systematic differences may be difficult to detect by casually examining the final spreadsheet.
What Does Validity Mean in Research Coding?
Validity concerns whether the interpretations and uses of coding results are justified by the evidence and appropriate to the research purpose. In structured content analysis, this includes whether code definitions adequately represent the intended constructs and whether individual assignments follow those definitions.
Consider a study examining institutional barriers to educational technology adoption. A codebook distinguishes insufficient training, inadequate technical infrastructure, and lack of administrative support.
If AI repeatedly classifies statements about mandatory institutional schedules as "poor personal time management," the assignments may be consistent but conceptually inappropriate. The model has attributed an institutional constraint to individual behavior.
Validity is not established by the apparent precision of the labels. Researchers must examine whether the coding framework and its application preserve distinctions that matter to the research question.
How Can AI Be Consistently Wrong?
Imagine a researcher asks AI to classify students' comments about online learning. One student writes:
"The platform is excellent if your idea of entertainment is watching the loading screen for half an hour."
The model repeatedly assigns the code "positive platform experience" because the response contains the word "excellent."
Across five identical processing attempts, the classification remains unchanged. The result demonstrates stability, but the model has missed the sarcasm and underlying complaint.
Consistent but incorrect
The model repeatedly assigns "positive platform experience" to the sarcastic complaint.
Contextually supported
The researcher identifies the statement as criticism of slow platform performance.
The problem becomes more consequential when a model systematically misinterprets particular forms of expression, including sarcasm, indirect criticism, culturally specific language, or code-switching.
Repeated errors can create systematic bias in AI-coded research data, even when conventional consistency measures appear satisfactory.
Is Agreement With Human Coders Evidence of Validity?
Agreement with independently produced human coding can provide useful evidence, particularly in structured classification approaches. However, its meaning depends on how the human reference decisions were developed.
Suppose AI agrees with a human coder on 95% of responses. This may be encouraging, but several questions remain. Were the code definitions appropriate? Did the human coder interpret the responses correctly? Were ambiguous cases resolved carefully? Were less frequent categories represented in the evaluation?
Human coding is not automatically a perfect ground truth. Researchers may disagree because of unclear definitions, contextual differences, or legitimate interpretive alternatives.
A defensible reference set may involve independent coding, discussion of disagreements, and documented adjudication. Its development should reflect the methodological approach rather than merely treating one person's initial classification as unquestionably correct.
What Can Percent Agreement Tell Researchers?
Percent agreement measures the proportion of coding decisions that match between two sets of classifications. It is straightforward to calculate and can provide an initial description of agreement.
Percent agreement does not account for agreement expected by chance. It may also conceal category-specific problems, particularly when one category dominates the dataset.
Does Cohen's Kappa Prove AI Coding Is Valid?
No. Cohen's kappa is a chance-corrected measure of agreement between two raters assigning categorical labels under an appropriate coding design. It is not a direct measure of construct validity.
The statistic is commonly expressed as:
Kappa values can be influenced by category prevalence and marginal distributions. Researchers should avoid interpreting a single coefficient without examining the underlying classification table and the nature of disagreements.
For multi-label coding, ordinal categories, or complex coding structures, other evaluation approaches may be more appropriate. The statistic should be selected to match the actual coding design.
Can High Accuracy Still Hide Serious Coding Errors?
Yes. Overall accuracy can be misleading when categories are highly imbalanced.
Suppose 95% of responses belong to a common category and 5% describe accessibility barriers. A model that assigns every response to the common category would achieve 95% overall accuracy against that reference distribution while failing to identify any accessibility cases.
The high accuracy would conceal a complete failure on the less frequent category.
Researchers should therefore consider category-specific precision, recall, confusion matrices, and the consequences of different error types when evaluating structured coding tasks.
A false negative may be especially consequential when it causes a researcher to overlook experiences affecting a small or underrepresented group. The importance of an error depends on the study's purpose, not only its frequency.
Does Reliability Have the Same Meaning in Every Qualitative Methodology?
No. The emphasis placed on coding agreement varies across qualitative research traditions.
In coding-reliability approaches to content or thematic analysis, consistent application of categories may be an explicit methodological objective. Agreement statistics can therefore contribute to evaluating the coding procedure.
In reflexive thematic analysis, however, coding is understood as an interpretive activity shaped by the researcher's theoretical position and engagement with the data. Braun and Clarke (2021) explain that inter-coder reliability is not a universal quality requirement across thematic analysis approaches.
Applying agreement statistics indiscriminately can therefore create a mismatch between the evaluation procedure and the study's methodological assumptions.
Researchers should determine what constitutes a defensible coding decision within their analytical tradition before selecting numerical measures.
How Can Researchers Evaluate AI Coding Validity More Defensibly?
For structured classification tasks, researchers can evaluate whether the codebook represents the intended constructs, compare AI outputs against carefully developed reference coding, and examine the distribution and consequences of errors.
For more interpretive approaches, researchers may examine whether coding decisions remain grounded in participants' accounts, preserve relevant context, and contribute to an analytically coherent interpretation.
In either case, researchers should investigate contradictory cases and determine whether the model systematically overlooks particular meanings.
Gilardi, Alizadeh, and Kubli (2023) demonstrated promising language-model performance on several text-annotation tasks. Their findings illustrate the potential of AI classification but do not imply that strong annotation agreement establishes conceptual validity in every research setting.
Parfenova and colleagues (2025) similarly examined differences between language models and human experts during inductive coding, reinforcing the need to consider task complexity and the nature of coding decisions.
Researchers should also plan an appropriate manual verification procedure rather than assuming that one favorable statistic makes further examination unnecessary.
04 · A Practical Example
When 95% AI Coding Agreement Conceals a Serious Problem
Hypothetical Example
Classifying Student Experiences With Online Learning
A researcher evaluates an AI system that classifies 200 open-ended survey responses into two categories: general learning difficulties and accessibility barriers. An independently reviewed reference set contains 190 general-difficulty responses and 10 accessibility-barrier responses.
The model assigns all 200 responses to general learning difficulties.
Step 1: Examine the Overall Result
Because 190 responses belong to the general-difficulty category, the model correctly classifies 190 of 200 responses.
Step 2: Examine the Confusion Matrix
| Reference Category |
AI: General Difficulties |
AI: Accessibility Barriers |
| General learning difficulties |
190 |
0 |
| Accessibility barriers |
10 |
0 |
The model correctly identifies every general-difficulty response but misses all ten accessibility cases. Its recall for accessibility barriers is therefore 0%.
Step 3: Interpret the Consequences
If the researcher relied only on the overall accuracy, the model might appear highly effective. Yet its classifications would suggest that no respondents reported accessibility barriers, contradicting the reviewed evidence.
The resulting analysis could underrepresent an important student experience and produce misleading institutional recommendations.
Even if repeated AI runs produced exactly the same assignments, that stability would not correct the underlying problem.
Step 4: Revise the Evaluation
The researcher examines the missed cases, reviews the accessibility code definition, and investigates whether the model fails to recognize indirect descriptions of disability-related barriers.
Any revised instructions or classification procedure should be evaluated on additional material not used to develop the revision.
The example demonstrates why researchers should ask not only how often AI agrees with a reference, but also which experiences its errors may erase.