03 · What You Need to Know
How AI-Generated Initial Coding Works and What Makes a Code Useful
What Is an Initial Qualitative Code?
A qualitative code is a label assigned to a segment of data to identify a feature that may be relevant to the research question or analytical purpose.
Codes can capture explicit topics, actions, experiences, meanings, assumptions, or other analytically significant features. Their form depends on the qualitative approach being used.
Initial coding is an early stage of analytical engagement. Researchers may generate many provisional labels, revise their wording, combine overlapping codes, divide broad codes into more specific ones, or abandon labels that become unhelpful.
In some approaches, codes are developed through relatively open engagement with the data. In others, coding is informed by a theoretical framework or an existing coding structure.
Initial coding should therefore not be confused with applying a finalized codebook. The latter involves assigning codes according to established definitions and coding rules, while initial coding often involves deciding what the relevant concepts should be in the first place.
What Does AI Actually Do When Generating Codes?
When a researcher submits an excerpt and requests initial codes, a generative AI model produces labels based on patterns learned during training and the information available in the prompt.
It may identify familiar concepts, summarize the apparent meaning of a statement, or generate an interpretive label that connects the statement to a broader social or theoretical issue.
For example, consider the following hypothetical interview excerpt:
"I usually wait until everyone leaves the house before joining the online discussion because it's difficult to concentrate when my younger siblings are around."
Possible AI-generated codes include:
- Household distractions during online learning
- Negotiating study time around family routines
- Limited access to a quiet learning environment
- Delayed participation due to domestic responsibilities
These labels are not equally supported. The participant clearly describes household noise or activity affecting concentration and the timing of participation. However, the statement does not necessarily establish that the participant has domestic responsibilities. That label introduces an inference requiring further evidence.
The difference illustrates why AI-generated codes must be evaluated rather than accepted simply because they sound plausible.
Can AI Generate Descriptive, Interpretive, and In Vivo Codes?
Yes. Generative AI can be instructed to propose different kinds of codes, although the resulting labels still require methodological and contextual evaluation.
| Coding approach |
Purpose |
Illustrative code |
| Descriptive coding |
Identifies the explicit subject or experience represented in a passage |
Difficulty concentrating at home |
| Process coding |
Captures actions or processes described by participants |
Waiting for a quiet study period |
| In vivo coding |
Uses the participant's own words as the code label |
"Wait until everyone leaves" |
| Interpretive coding |
Identifies a possible underlying meaning or conceptual relationship |
Negotiating participation within household constraints |
The examples represent possible analytical choices, not a requirement to apply every coding type to the same excerpt.
In vivo coding requires particular care. AI may paraphrase a participant's expression while presenting it as an exact quotation. Researchers must verify that any in vivo label reproduces the original wording accurately.
Can AI Generate Codes Inductively?
AI can propose codes without receiving a predefined list of categories. This resembles some activities associated with inductive coding, where labels are developed through engagement with the data.
However, the absence of a supplied codebook does not mean that the model approaches the data without prior conceptual influences. Its suggestions reflect training data, learned language patterns, and the researcher's prompt.
Parfenova and colleagues (2025) compared six open-source language models with human experts on inductive qualitative coding tasks. Their evaluation identified differences in how humans and models handled coding difficulty. Human coders performed better on complex sentences, whereas models showed relatively stronger performance on simpler material.
The study also found that agreement with a reference label did not necessarily correspond to favorable expert evaluations of coding quality. This distinction matters because a label may resemble a benchmark answer without capturing the most useful analytical meaning. The published evaluation illustrates why coding performance should be assessed through more than label matching alone.
Researchers using AI for inductive coding should therefore treat the model as a source of candidate labels rather than assuming that its output represents concepts emerging independently from the data.
Why the Unit of Coding Matters
Before generating codes, researchers must decide what portion of the data should be examined as a meaningful segment.
A coding unit might be a phrase, sentence, speaking turn, paragraph, or longer passage. The appropriate unit depends on the analytical approach and the meaning being examined.
Consider a participant who says:
"At first I thought online classes would be easier because I wouldn't have to travel. But after a few weeks, I realized I was spending more time studying because I had to watch recorded lectures again whenever the connection failed."
If AI analyzes only the first sentence, it might generate "Perceived convenience of online learning."
If it examines the complete statement, a more relevant code might be "Unexpected workload arising from connectivity problems."
Both labels refer to something present in the account, but they capture different parts of the participant's experience.
Overly narrow segmentation can remove the context needed for interpretation. Overly broad segmentation may obscure multiple meanings within a passage.
Researchers should retain enough surrounding material for the model and subsequent human review to understand the coded statement.
Should AI Generate One Code or Multiple Codes per Excerpt?
There is no universal requirement that each passage receive only one code.
A participant may simultaneously describe technological difficulty, emotional frustration, and a strategy for adapting to an online learning environment. Depending on the research question and analytical approach, assigning multiple codes may be appropriate.
Forcing AI to generate exactly one code per excerpt can conceal overlapping meanings. Conversely, asking it to produce as many codes as possible may generate redundant labels and speculative interpretations.
A more useful instruction is to propose only codes that are meaningfully supported by the passage, explain the evidence for each, and identify when a code depends on inference rather than explicit wording.
How Specific Should Initial Codes Be?
Initial codes should be sufficiently informative to help the researcher retrieve and compare meaningful material. They should not be so broad that unrelated experiences are grouped together, or so narrow that every statement receives an entirely unique label without analytical benefit.
For example, "Online Learning Problems" may be too broad for a study examining the social conditions of participation.
"Avoiding camera use because of household visibility" is more specific and preserves a meaningful relationship between behavior and context.
Yet specificity should not become artificial precision. A code such as "Socioeconomic shame caused by inadequate housing" would be inappropriate if the participant merely stated that other people were moving around in the background.
The researcher should distinguish what the participant explicitly communicates from what the analyst proposes as a possible interpretation.
Can AI Generate Too Many Codes?
Yes. A model may produce numerous overlapping labels because the prompt encourages exhaustive output or because it interprets slight differences in wording as separate concepts.
For example, the following codes may substantially overlap:
- Difficulty accessing a quiet study space
- Lack of a distraction-free environment
- Household noise affecting concentration
- Home environment interfering with learning
These labels are not necessarily identical, but the researcher should determine whether the distinctions are analytically useful.
Prematurely merging them may erase important differences. Retaining every variation may make the coding structure unnecessarily fragmented.
Code refinement is therefore an analytical decision rather than simply a process of removing duplicates.
What Does Research Show About AI-Assisted Initial Coding?
Published studies suggest that generative AI can contribute to qualitative coding, but performance varies with the task, prompt, dataset, and evaluation criteria.
Hila and Hauser (2025) examined ChatGPT's performance in deductive qualitative coding using established policy categories. Their step-by-step task decomposition strategy achieved an accuracy of 0.775 and Cohen's kappa of 0.744 in the reported evaluation. These findings support the potential value of structured instructions, although deductive classification is different from generating new codes inductively.
Research by Parfenova and colleagues (2025) specifically investigated inductive coding and found meaningful differences between human and model-generated labels, particularly for more complex statements.
Dunivin (2025) also examined the integration of large language models into qualitative coding workflows, emphasizing that coding is an interpretive practice rather than merely a labeling exercise.
Taken together, these studies suggest that AI can provide useful coding suggestions, but they do not establish a universal level of coding accuracy or justify replacing researcher judgment across qualitative methodologies.
Why AI May Miss Cultural and Contextual Meaning
Some qualitative statements are difficult to interpret without understanding local language, social relationships, or the circumstances of the interview.
Consider a Filipino student who says, "Kaya naman, pero bahala na."
Depending on context, the expression may convey willingness to try, uncertainty, resignation, or a response to circumstances perceived as beyond one's control.
An AI system might code it as "Confidence in overcoming challenges" or "Positive coping." Those interpretations could be misleading if the participant was expressing apprehension or reluctant acceptance.
The researcher should examine the original language, tone where available, surrounding conversation, and broader cultural context before assigning an interpretive label.
This is particularly important when culturally specific meaning or ambiguity affects the coding decision.
How Should AI-Generated Codes Be Validated?
Validation should be appropriate to the study's methodological approach. It should not be reduced to asking the model whether its own codes are correct.
Researchers can examine whether each code is supported by the excerpt, whether relevant contextual information has been preserved, whether similar passages are treated coherently, and whether alternative interpretations deserve consideration.
In structured coding studies, comparisons with human-reviewed coding decisions may provide useful evidence of agreement or classification performance. In reflexive approaches, the emphasis may instead be on the analytical usefulness of the code and the researcher's engagement with its meaning.
AI-generated codes should also remain traceable to their source material. Without reliable transcript identifiers and exact passages, it becomes difficult to evaluate or revise the coding decisions.
04 · A Practical Example
Generating and Reviewing Initial Codes From Student Interviews
Hypothetical Example
Understanding Barriers to Participation in Online Classes
A researcher is examining university students' experiences of participating in synchronous online learning. The researcher begins coding interview transcripts and uses AI to propose initial labels for selected passages.
The following statements are invented for illustration:
-
Participant A: "I don't open my camera because I share a room with my siblings."
-
Participant B: "I usually type my answers because I'm afraid my classmates will laugh if I say something wrong."
-
Participant C: "Sometimes I leave the meeting because our internet connection drops whenever several people use it."
-
Participant D: "I actually prefer online discussions because I have more time to think before answering."
Possible AI-Generated Initial Codes
| Participant |
Candidate code |
Researcher evaluation |
| A |
Camera avoidance due to shared living space |
Supported by the explicit statement |
| B |
Fear of negative peer evaluation |
Supported by the participant's stated concern |
| C |
Connectivity-related interruption of participation |
Supported by the account of repeated disconnection |
| D |
Preference for online discussion because of additional thinking time |
Supported by the stated reason, although the communication format may need clarification |
These codes are relatively close to the participants' explicit accounts. They provide an initial way of organizing material without requiring the researcher to accept a broader theoretical interpretation immediately.
What Happens When AI Overinterprets the Same Data?
Suppose AI also proposes the following labels:
-
Participant A: Socioeconomic disadvantage and housing insecurity
-
Participant B: Low self-esteem caused by peer discrimination
-
Participant C: Institutional neglect of disadvantaged learners
-
Participant D: Introverted personality and social withdrawal
Each label introduces claims that go beyond what the excerpts establish. Some might become relevant interpretations if supported by other material, but the researcher should not treat them as factual descriptions of these participants.
For example, sharing a room does not necessarily establish housing insecurity. Preferring additional thinking time does not establish introversion.
How the Researcher Should Refine the Coding
1. Compare each proposed code with its source passage.
Check whether the label captures something explicitly stated or introduces an unsupported inference.
2. Examine the surrounding interview.
Determine whether earlier or later statements clarify the participant's intended meaning.
3. Retain meaningful distinctions.
Avoid merging technological constraints, social anxiety, and communication preferences merely because all concern participation.
4. Revise labels when necessary.
Replace speculative wording with codes that accurately represent the available evidence.
5. Continue coding and comparing the dataset.
Examine whether additional interviews support, complicate, or challenge the emerging coding structure.
6. Record analytical decisions.
Document which AI suggestions were retained, modified, or rejected and why.
At this stage, the researcher has developed provisional codes, not necessarily themes. Whether the codes contribute to broader patterns of meaning should be examined during subsequent thematic analysis, where appropriate to the chosen methodology.
06 · What This Means for You
How to Use AI for Initial Coding Without Losing Analytical Control
AI is most useful when its coding suggestions help you examine the data more carefully rather than replace that examination.
Begin by identifying your analytical approach and deciding what you want the initial codes to accomplish. A descriptive study may require labels that remain close to participants' wording, while a theoretically informed study may justify more interpretive coding.
Choose an Appropriate Coding Strategy
If you are unfamiliar with the dataset
Read the original material first and use AI to suggest alternative labels for selected passages.
If you need descriptive initial codes
Ask AI to remain close to explicit wording and distinguish observed content from inferred meaning.
If you are exploring interpretive possibilities
Request multiple plausible readings and examine what evidence supports or challenges each one.
If you already have a defined codebook
Use the code definitions and coding rules rather than asking AI to invent new labels without justification.
If participants use culturally specific or ambiguous expressions
Preserve the original wording and verify proposed meanings against the interview context and relevant cultural knowledge.
Use a Prompt That Requires Evidence for Every Code
Instead of asking AI to "code this interview," specify the task and require traceable evidence.
"Examine the following anonymized interview excerpts in relation to the stated research question. Suggest provisional initial qualitative codes. For each code, provide the exact supporting passage, a concise explanation, and an indication of whether the code is descriptive or interpretive. Identify assumptions that would require further evidence. Allow multiple codes where justified, avoid redundant labels, and do not invent quotations or participant information."
The prompt does not guarantee valid coding, but it makes the proposed decisions easier to inspect and challenge.
Preserve the Connection Between Codes and Original Data
Maintain transcript identifiers, passage locations, original wording, and records of coding revisions. This helps prevent an AI-generated label from becoming detached from the evidence that supposedly supports it.
For example, a coding record might include the participant identifier, excerpt, proposed code, researcher decision, and a brief analytical note. Such documentation allows the researcher to revisit the decision as the analysis develops.
Researchers may also use analytical memos to examine emerging interpretations, alternative explanations, and reasons for revising particular codes.
Do Not Confuse Initial Coding With a Finished Analytical Framework
Initial codes are often revised as researchers become more familiar with the dataset. Some labels may eventually contribute to categories or themes, while others may remain useful only for retrieving specific material.
Prematurely asking AI to convert every code into a polished theme can create an appearance of analytical completion before the researcher has examined the relationships and contradictions across the data.
Retain the flexibility to reconsider early decisions. In qualitative research, revising a code is not necessarily evidence that the first attempt failed. It may reflect a more developed understanding of the phenomenon.
Protect Participant Data and Document AI Assistance
Before using AI with interview material, verify that the proposed processing is permitted under the study's ethics approval, participant consent, institutional policies, and applicable privacy requirements. Consider indirect identifiers and the service's data-handling arrangements.
Document the model used, relevant instructions, the scope of data processed, validation procedures, and how AI-generated codes influenced the final analysis. These records support transparent reporting of AI assistance in qualitative research.