TLDR: A study investigated how different code-switching strategies in a chatbot affect human-machine dialogue. It found that predictable and grammatically natural code-switching by the bot led to higher user satisfaction and task success, while random or ungrammatical switches resulted in frustration and poorer performance. Users also tended to align their code-switching with the bot’s behavior. The research emphasizes the need for AI to produce grammatically acceptable bilingual language to ensure effective and enjoyable interactions.
In an increasingly multilingual world, the way humans interact with machines is evolving. A recent study delves into the fascinating phenomenon of code-switching – the seamless alternation between two or more languages in conversation – specifically in the context of human-machine dialogues. This research explores how conversational agents can generate more human-like code-switching and how different strategies impact user experience and task success.
The study, titled “Strategies of Code-switching in Human-Machine Dialogs,” was conducted by Dean Geckt, Melinda Fricke, and Shuly Wintner. It highlights that while most people are multilingual and frequently code-switch, the characteristics of this linguistic behavior are not fully understood, especially in interactions with technology. Current dialogue systems are predominantly monolingual, yet many bilingual individuals prefer to code-switch when given the chance. Understanding and enhancing these capabilities in AI systems is crucial for more natural and effective human-machine communication.
To investigate this, the researchers developed a sophisticated chatbot capable of completing a “Map Task” with human participants using code-switched Spanish and English. The Map Task is an experimental game where an instructor guides a navigator along a path on a map using only verbal communication. This setup allowed for the elicitation of spontaneous, yet controlled, bilingual dialogues.
Experimenting with Code-Switching Strategies
The study involved two main experiments. Experiment 1 focused on “alternational” code-switching, where the bot would switch the language of entire sentences. Five strategies were tested: Baseline (no translation), Alignment (bot matches human’s last language), Adversarial (bot switches to the other language), Random (50% chance of switching), and Short Context (switches after a few utterances in the same language). The key finding here was that participants enjoyed the task less and found communication more difficult when the bot’s code-switching was random. This suggests that unpredictable language choices by a bot can hinder user satisfaction and performance.
Experiment 2 explored “insertional” code-switching, specifically focusing on mixed noun phrases (e.g., ‘el fork’ instead of ‘la fork’). The bot, instructed to communicate primarily in Spanish, was manipulated to produce different types of mixed noun phrases: Baseline (no modification), Congruent (determiner matches original noun’s gender), Feminine Incongruent (feminine noun with masculine determiner, considered grammatically acceptable in some contexts), and Masculine Incongruent (masculine noun with feminine determiner, widely considered ungrammatical). The results were striking: participants found the task particularly easy and enjoyable when the bot used grammatically expected code-switches, such as the feminine incongruent pattern. Conversely, when the bot produced ungrammatical masculine incongruent switches, participants reported lower enjoyment, less success, and greater communication difficulty. This underscores the importance of grammatical accuracy in code-switching for AI systems.
Also Read:
- Understanding Developer Frustrations with AI Codebase Generators
- Conversational AI Enhances Driving Experience and Safety: A Study on LLM-Powered In-Vehicle Agents
User Adaptation and Future Implications
A significant observation across both experiments was the phenomenon of “entrainment,” where participants tended to align their code-switching style with that of the bot. For instance, in Experiment 2, participants produced fewer grammatically acceptable feminine incongruent switches when the bot did not produce them, and a small number even produced the generally ungrammatical masculine incongruent switches when the bot did. This indicates that users adapt their language use based on the machine’s behavior.
The research also compared its findings with previous work on code-switching in human-machine dialogues, noting that the Map Task, with its richer data generation, provided a more comprehensive understanding of task success. While earlier studies suggested insertional strategies were more successful, this research, with its English-dominant participant sample and Spanish-heavy insertional experiment, found the opposite in terms of overall game duration and path differences. However, the overarching conclusion remains: code-switching strategies that feel natural to participants lead to better outcomes, while unnatural ones hinder performance and user satisfaction.
This study makes a significant contribution by demonstrating the potential downsides of deploying insufficiently developed multilingual language technology. If AI systems fail to adhere to natural and acceptable grammatical patterns in code-switching, they risk alienating users and impeding effective communication. The publicly available data and code from this research, accessible via this link, offer valuable resources for future investigations into the complexities of bilingual human-machine interaction and the development of more sophisticated multilingual AI.


