03 · What You Need to Know
How Generative AI Fits Into Research Data Coding
What Does Coding Research Data Actually Mean?
In qualitative research, coding involves assigning meaningful labels to portions of data. A code identifies something analytically relevant in a participant's statement, observation, document, or other research material.
Suppose a university researcher asks students about their experiences using an online learning platform. One student responds:
"I like being able to watch recorded lectures again, but sometimes the internet connection makes it difficult to participate in live discussions."
A researcher might assign two codes: flexibility of recorded lectures and internet connectivity barriers.
These labels help organize the response, but coding does not end with assigning names. The researcher must consider what the statement means within the study, how it relates to other responses, and whether the codes adequately represent the participant's experience.
Coding is also distinct from developing themes. A code identifies a potentially meaningful feature of data, whereas a theme generally represents a broader pattern of meaning developed through analysis. The precise relationship depends on the qualitative approach being used.
What Can Generative AI Do During Coding?
Large language models can process textual input and generate labels or classifications based on instructions and learned language patterns. Depending on the task, researchers may use them to assist with several activities.
-
Suggest initial codes: Identify potentially meaningful concepts in interview transcripts or written responses.
-
Apply predefined codes: Classify text according to an existing coding framework or codebook.
-
Organize similar responses: Group statements that appear to address related experiences or concerns.
-
Identify passages for review: Flag statements that may be ambiguous, contradictory, or difficult to classify.
-
Prepare structured outputs: Produce tables connecting response identifiers, assigned codes, and supporting text.
-
Support analytical comparison: Suggest similarities or differences among coded passages for researchers to examine.
These capabilities are not equivalent to independently conducting a complete qualitative analysis. A model may recognize linguistic similarities without adequately understanding the social, cultural, or theoretical significance of those similarities.
What Is the Difference Between Inductive and Deductive AI Coding?
The distinction between inductive and deductive coding helps clarify what researchers are asking AI to do.
| Aspect |
Inductive AI-Assisted Coding |
Deductive AI-Assisted Coding |
| Starting point |
Codes are developed through engagement with the data. |
Codes are defined before classification. |
| AI task |
Suggest possible labels or concepts emerging from responses. |
Apply supplied code definitions to relevant passages. |
| Researcher responsibility |
Interpret proposed codes, revise them, and determine their analytical relevance. |
Develop or approve the codebook and verify its application. |
| Principal concern |
AI may impose familiar categories rather than recognize context-specific meanings. |
AI may misapply definitions or overlook exceptions. |
For example, a researcher exploring teachers' experiences with educational technology might ask AI to suggest initial codes without providing predefined categories. Alternatively, the researcher could supply established definitions of technology access, perceived usefulness, and institutional support, then ask the model to classify responses accordingly.
Neither approach is inherently superior. Their suitability depends on the research question and methodological assumptions. Researchers considering automatically generated coding categories should distinguish exploratory suggestions from categories that have undergone analytical refinement.
Does AI Coding Work Equally Well Across Qualitative Methodologies?
No. Qualitative research encompasses different analytical traditions, and they do not all understand coding in the same way.
In structured qualitative content analysis, coding may involve assigning passages to clearly defined categories. AI can potentially assist with this task because the classification criteria can be specified and evaluated.
In reflexive thematic analysis, however, coding forms part of an interpretive process shaped by the researcher's theoretical orientation, engagement with the dataset, and developing analytical understanding. Braun and Clarke emphasize that thematic analysis includes methodologically distinct approaches, some prioritizing coding reliability and others emphasizing reflexive interpretation.
Consequently, asking AI to generate codes does not automatically reproduce the analytical process expected in reflexive thematic analysis, grounded theory, phenomenology, or discourse analysis. Each methodology requires consideration of what coding contributes to knowledge production.
A researcher should therefore decide how AI fits the selected methodology rather than selecting a methodology simply because an AI tool can produce outputs resembling its procedures.
What Does Research Evidence Say About AI Coding Performance?
Published comparisons suggest that large language models can support some qualitative coding activities, although their performance varies across tasks and datasets.
Parfenova and colleagues (2025) compared six open-source language models with human experts on inductive text coding. Their findings revealed differences in how humans and models handled coding difficulty, with models encountering particular challenges on more complex material. This suggests that satisfactory performance on straightforward statements may not generalize to nuanced responses.
Mehta and colleagues (2025) evaluated GPT-4o-assisted qualitative analysis against human analysis in a study involving adolescent girls and young women in Kenya. Although the model identified relevant themes and subthemes, the researchers reported problems with quotation selection, altered textual content, and contextual interpretation. They recommended using generative AI as an analytical aid rather than treating it as equivalent to experienced qualitative researchers.
Research on deductive coding has also examined whether language models can classify material using established codebooks. Hila (2025), for example, investigated ChatGPT-based classification of legal case summaries using a predefined policy coding framework and different prompting strategies.
Together, these studies support a cautious conclusion: AI coding is technically feasible, but performance must be established for the particular coding task. A model that performs adequately on one dataset may not achieve comparable results with different languages, disciplines, code definitions, or interpretive demands.
Why Can AI Produce Plausible but Incorrect Codes?
Generative AI predicts outputs based on its computational representation of language and the instructions it receives. It does not independently establish that a proposed code is methodologically appropriate or empirically justified.
Consider the response: "The platform is excellent, assuming you enjoy waiting twenty minutes for a page to load."
A superficial classification might identify positive platform evaluation because of the word "excellent." A context-sensitive interpretation would recognize sarcasm and a complaint about performance.
Other difficulties arise when responses contain local expressions, multiple meanings, contradictory statements, indirect criticism, or references that depend on earlier interview exchanges.
AI can also assign a reasonable-sounding label that is not sufficiently supported by the passage. Researchers should therefore examine both the assigned code and the actual textual evidence supporting it.
How Should Researchers Structure an AI-Assisted Coding Workflow?
A defensible workflow begins with the research design, not the AI prompt. Researchers first determine what counts as a coding unit, what the codes are intended to represent, and how coding decisions will contribute to analysis.
1. Define the analytical task.
Specify the research question, qualitative approach, unit of analysis, and intended role of AI.
2. Prepare and protect the dataset.
Remove unnecessary identifiers, preserve original records, and establish whether the proposed tool and data processing arrangements are permitted.
3. Establish coding instructions.
Provide code definitions when using deductive coding, or specify the scope of exploratory suggestions when using inductive coding.
4. Pilot the process.
Test the instructions on a manageable set of varied responses, including difficult or ambiguous examples.
5. Review and refine.
Examine incorrect classifications, revise instructions or categories where justified, and evaluate the revised procedure on material not used for refinement.
6. Code the remaining material.
Apply the documented procedure while preserving response identifiers and links to the original text.
7. Verify and interpret.
Review coding decisions using an approach appropriate to the methodology, resolve consequential errors, and conduct the substantive analysis.
When researchers use a predefined framework, a clearly documented human-developed codebook can make the classification task more explicit. Nevertheless, a well-written codebook does not guarantee correct application.
Similarly, a large dataset does not justify assuming that AI will code thousands of responses consistently or accurately. Scale increases the importance of systematic quality assurance.
What About Research Ethics, Confidentiality, and Data Protection?
Before entering research material into an AI system, researchers must consider participant consent, institutional requirements, applicable data protection laws, contractual restrictions, and the system's data handling arrangements.
Interview transcripts may contain identifiable or sensitive information even after names have been removed. Combinations of locations, occupations, experiences, and personal circumstances can sometimes make individuals recognizable.
Researchers should determine whether the service stores submitted data, uses it for model improvement, transfers information across jurisdictions, or permits appropriate administrative controls. These arrangements differ across products and service configurations and may change over time.
Watch Out
Do not upload identifiable or confidential participant data to an external AI service merely because the tool accepts document uploads. Verify that the intended processing is authorized and consistent with the study's consent, ethics approval, institutional policies, and applicable law. De-identification alone does not necessarily eliminate disclosure risks.
When external processing is unsuitable, researchers may need an approved institutional environment, a suitably governed local deployment, or a workflow that does not expose the restricted data to the model.
How Can Researchers Evaluate the Quality of AI-Generated Codes?
Evaluation should match the purpose of coding. For a structured classification task, researchers may compare AI assignments with a carefully developed human-coded reference set, examine disagreement patterns, and calculate suitable classification measures.
For interpretive qualitative approaches, numerical agreement may be insufficient or philosophically inappropriate. Researchers may instead examine whether proposed codes are grounded in the data, analytically meaningful, sensitive to context, and consistent with the study's methodological commitments.
It is useful to distinguish between coding consistency and coding validity. Repeatedly assigning the same label demonstrates stability, not necessarily correctness.
Researchers should also determine how much manual verification of AI-coded data is warranted, taking account of coding complexity, error consequences, sampling strategy, and observed performance. There is no universal percentage that guarantees adequate verification.
04 · A Practical Example
Using Generative AI to Code Students' Online Learning Experiences
Hypothetical Example
Classifying 300 Open-Ended Survey Responses
A researcher investigates university students' experiences with online learning. The survey contains 300 written responses to the question: "What has been your biggest challenge when participating in online classes?"
The researcher wants to organize the responses into descriptive categories before examining their distribution and implications.
Step 1: Develop an Initial Coding Framework
After examining the research question and reading an initial selection of responses, the researcher develops provisional categories: internet connectivity, learning environment, time management, platform usability, and instructor interaction.
Each category receives a definition, inclusion criteria, and examples. The researcher also permits multiple codes for responses discussing more than one issue and includes an unresolved category for statements that cannot be classified adequately.
Step 2: Ask AI to Apply the Categories
The researcher provides the approved coding definitions and instructs the model to preserve each response exactly, assign only supported codes, identify the relevant textual evidence, and flag uncertainty rather than invent a classification.
For illustration, the following responses might produce these proposed assignments:
| Student Response |
Proposed AI Code |
Researcher Assessment |
| "My internet disconnects during live classes." |
Internet connectivity |
Supported by the response. |
| "It is difficult to concentrate because my siblings are noisy." |
Learning environment |
Supported by the response. |
| "I work during the day, and sometimes I cannot attend synchronous classes." |
Time management |
Requires review because employment and scheduling constraints may not be adequately represented by the category. |
| "The platform is wonderful when it actually works." |
Platform usability |
Plausible, but the underlying complaint requires contextual examination. |
Step 3: Examine Coding Disagreements
The third response exposes a potential problem with the coding framework. The student's difficulty may arise from employment obligations rather than poor time management.
The researcher must decide whether to revise the category definition, introduce an additional category, or retain the existing framework with an explicit qualification. That decision should follow the research objectives and evidence, not simply the model's preferred label.
The fourth response also illustrates why literal wording may be misleading. The researcher needs to establish whether the participant is describing technical instability, usability difficulties, or another concern.
Step 4: Validate Before Using the Results
The researcher compares AI-generated assignments with independently reviewed responses, examines disagreements, and revises the coding procedure where necessary. If changes are made after examining the pilot responses, a separate evaluation set can help determine whether the revised approach performs adequately beyond the examples used for refinement.
Only after appropriate verification does the researcher use the coded data to describe response patterns. The researcher also retains the original statements so that interpretations can be checked against the participants' actual words.
The important outcome is not that AI assigned codes to 300 responses. It is that the researcher established which assignments were defensible and which required further interpretation.