03 · What You Need to Know
How Code-Switching Affects Generative AI Interpretation
What Is Code-Switching?
Code-switching refers to the use of more than one language or linguistic variety within a conversation, interaction, or discourse.
Speakers may switch languages between sentences, within sentences, or at particular points in an exchange.
For example, a Filipino student might say, "The instructions were clear, pero kulang yung time para matapos."
The sentence combines English and Filipino to communicate that the instructions were understandable but the available time was insufficient.
Code-switching is not necessarily random or evidence of inadequate language proficiency. It can be a normal feature of multilingual communication, shaped by participants' linguistic repertoires, conversational goals, and social contexts.
In some settings, researchers also use the term code-mixing. Definitions and distinctions between code-switching and code-mixing vary across linguistic traditions, so studies should explain how these terms are operationalized.
Code-Switching Can Occur at Different Linguistic Levels
Not all mixed-language communication has the same structure.
| Pattern |
Illustrative expression |
Interpretive concern |
| Between sentences |
"The lecture was helpful. Pero mahirap yung exam." |
Preserving the relationship between statements |
| Within a sentence |
"I submitted the assignment kahit late na." |
Interpreting grammatical and semantic relationships |
| Discourse marker switching |
"Actually, okay naman yung discussion." |
Understanding conversational emphasis and stance |
| Technical vocabulary switching |
"Hindi ko ma-interpret yung regression coefficient." |
Preserving specialized terminology |
| Borrowed or integrated expressions |
"Nag-upload ako ng requirements." |
Distinguishing established borrowing from active switching where analytically relevant |
These examples are illustrative rather than an exhaustive linguistic classification.
Researchers should also recognize that the boundary between borrowing and code-switching can be difficult to establish, especially when foreign-origin words have become conventional in local usage.
Understanding Individual Words Is Not Enough
A model may correctly recognize the English and Filipino words in a sentence while misunderstanding how they combine to express a complete idea.
Consider the statement, "I wanted to participate, pero nahihiya ako magtanong."
A reasonable interpretation is that the student wanted to participate but felt hesitant or embarrassed about asking questions.
However, the expression "nahihiya" may carry context-dependent meanings involving embarrassment, social discomfort, modesty, or sensitivity to interpersonal expectations.
An AI system that translates the statement simply as "I was ashamed to ask" may introduce a stronger or different interpretation than the participant intended.
The difficulty is not necessarily identifying the language. It is preserving the intended relationship between the words, the speaker's stance, and the relevant context.
Language Switching May Communicate Social Meaning
Multilingual speakers sometimes select languages in ways that communicate identity, familiarity, social distance, emphasis, or alignment with other participants.
For example, a participant may use English when describing formal academic procedures but switch to Filipino when discussing personal experiences.
Such a pattern might be relevant to a study of identity, classroom participation, or educational experience.
However, researchers should not automatically interpret every switch as emotionally or socially meaningful. Language choice may also reflect habit, lexical availability, topic conventions, or the linguistic practices of the interaction.
Determining whether a switch carries analytical significance requires attention to the broader conversation and research question.
AI-generated interpretations should therefore be treated as provisional rather than as evidence of a speaker's hidden intentions.
Generative AI May Normalize Mixed-Language Responses
When asked to summarize or translate code-switched material, generative AI may convert the response into polished monolingual prose.
This can be useful when the research objective is to communicate the general content of a response to readers who do not understand the original languages.
However, normalization can remove hesitation, repetition, informal expressions, and language-switching patterns.
For some qualitative research questions, these features are part of the data rather than obstacles to readability.
For example, a participant's movement between formal academic English and informal Filipino may be relevant to how they describe institutional expectations or personal experiences.
Researchers should distinguish a readable translation from a linguistically faithful transcript.
Content interpretation
Identifying what the speaker communicates at the level of propositions or general meaning.
Discourse-sensitive interpretation
Examining how language choices, conversational structure, emphasis, and contextual features contribute to meaning.
A model may perform adequately on the first task while providing insufficient evidence for the second.
Code-Switching Can Complicate Sentiment Analysis
Researchers sometimes use AI to classify participant responses as positive, negative, or neutral.
Code-switched responses can complicate these classifications because sentiment may be expressed through language-specific particles, idioms, sarcasm, or culturally situated expressions.
Consider the statement, "Okay naman yung system, kaso every week may bagong problema."
A simplistic interpretation might classify the response as positive because it begins with an apparently favorable expression.
Yet the complete statement communicates a qualified evaluation in which recurring problems may be central to the participant's experience.
The correct analytical classification depends on the study's coding framework. Researchers should avoid treating a model's sentiment label as an objective property of the response.
Independent human review and examination of disagreements can help identify whether the model systematically overlooks language-specific qualifications.
Technical Terms May Be Embedded in Another Language's Grammar
In educational and scientific contexts, speakers frequently incorporate English technical vocabulary into sentences structured primarily in another language.
For example, a student might say, "Hindi ko gets kung paano i-interpret yung p-value."
The technical term "p-value" remains in English, while the surrounding sentence expresses difficulty understanding its interpretation.
An AI system should preserve the technical meaning rather than substituting a related but different statistical concept.
Researchers should verify technical terminology in multilingual material, especially when the response concerns specialized disciplinary knowledge.
Code-switching does not automatically make technical terminology ambiguous, but it can increase the importance of contextual interpretation.
Performance May Vary Across Language Pairs and Communities
A model's success with English-Filipino code-switching does not establish equivalent performance with English-Cebuano, Arabic-French, Hindi-English, or other combinations.
Differences in available training resources, grammatical structures, writing conventions, and regional varieties may influence performance.
Even within one language pair, formal classroom communication may differ considerably from informal peer conversations.
Researchers should therefore examine the actual linguistic patterns represented in their study.
Uneven AI performance across languages and limited resources for particular varieties can affect the reliability of code-switched interpretation.
The problem may be especially difficult to evaluate when authentic code-switched datasets are scarce.
Code-Switching Is Not the Same as Translation
Translating a code-switched statement into one language can help readers understand its general content.
However, translation may remove information about the speaker's language choices and conversational structure.
If the research question concerns the participant's experience rather than language use, a carefully verified translation may be appropriate.
If the study examines linguistic identity, classroom discourse, or interactional practices, preserving the original code-switching may be methodologically necessary.
Researchers should decide what information must remain available before asking AI to translate or normalize the material.
Context Windows and Segmentation Can Affect Interpretation
Code-switched expressions may depend on earlier turns in a conversation.
A short statement such as "Oo, pero not really" can have different meanings depending on the question being answered and the preceding discussion.
When researchers submit isolated excerpts to an AI system, they may remove the context needed for accurate interpretation.
Providing relevant surrounding material may improve understanding, although additional context does not guarantee correctness.
Researchers should also consider privacy and confidentiality before supplying entire interview transcripts to external services.
Where context cannot be shared safely, locally approved processing or human interpretation may be preferable.
Human Review Should Be Based on the Original Code-Switched Material
For consequential qualitative analysis, reviewers should examine the original responses rather than evaluating only AI-produced English translations.
A translated version may already contain omissions or interpretations that are difficult to detect without access to the source.
Qualified reviewers should understand the relevant languages and the linguistic practices of the participants.
Where possible, researchers should establish independent coding or interpretation criteria before comparing human and AI outputs.
This helps avoid treating AI-generated explanations as the default interpretation against which human judgments must be measured.
How Can Researchers Evaluate AI Code-Switching Interpretation?
Evaluation should begin with the intended task.
For translation, researchers may assess whether the output preserves the original meaning and important discourse features.
For qualitative coding, they may compare AI-generated codes against independently developed human interpretations.
For classification, they may examine errors across relevant language combinations, switching patterns, and participant groups.
A useful evaluation set should include naturally occurring code-switched material, not only artificial sentences constructed by combining translated fragments.
Researchers should also examine disagreements qualitatively. A single accuracy score may conceal recurring problems involving negation, sarcasm, culturally specific expressions, or discourse markers.
These procedures support validation of AI-assisted multilingual analysis.