Exploring Code-Switching Dynamics in Urdu-English Multilingual ChatGPT Models: Patterns, Challenges, and Implications


Imran Nazeer
Jawaria Rehman
Minaam Butt


This research investigates the code-switching dynamics in the Urdu-English multilingual ChatGPT models aimed at discovering the themes, challenges, and implications. Utilizing text data retrieved from online resources, social media platforms and subject-oriented conversations, code switching will be examined through preprocessing and annotation processes. Algorithms are developed to automatically detect and classify code-switching instances, followed by an in-depth analysis of frequency, distribution, and contextual triggers. The study evaluates the role of ChatGPT in code-switched activities by generating text sets and ranking them based on language identification, syntactic coherence, and semantic consistency. Data evidenced that code-switching is often and that ChatGPT can communicate in different languages. The findings will be helpful in the process of refining AI-based natural language processing systems. The work investigates the more detailed perception of language change in digital environments. It provides a basis for designing more welcoming and culturally considerate communication and media tools.


How to Cite
Nazeer, I. , Rehman, J. and Butt, M. 2024. Exploring Code-Switching Dynamics in Urdu-English Multilingual ChatGPT Models: Patterns, Challenges, and Implications. Journal of Policy Research. 10, 2 (Jun. 2024), 18–27. DOI:https://doi.org/10.61506/02.00203.


  1. Ali, A., Jabbar, Q., Malik, N. A., Kiani, H. B., Noreen, Z., & Toan, L. N. (2021). Clausal-Internal Switching in Urdu-English: An Evaluation of the Matrix Language Frame Model. REiLA: Journal of Research and Innovation in Language, 3(3), 159-169. https://doi.org/10.31849/reila.v3i3.6774 DOI: https://doi.org/10.31849/reila.v3i3.6774
  2. Ali, F., & Shaikh, A. (2022). A Corpus-based Analysis of Code-switching Patterns in Urdu-English Bilinguals. Cosmic Journal of Linguistics, 1(1), 97-111. https://journals.cosmic.edu.pk/CJL/article/view/68
  3. Ali, F. (2023). Constructing identity through code choice and code-switching: Evidence from multilingual Muslim women in Barcelona. Revista Española de Lingüística Aplicada/Spanish Journal of Applied Linguistics, 36(1), 204-233. https://doi.org/10.1075/resla.20015.ali DOI: https://doi.org/10.1075/resla.20015.ali
  4. Balloccu, S., Schmidtová, P., Lango, M., & Dušek, O. (2024). Leak, cheat, repeat: Data contamination and evaluation malpractices in closed-source llms. arXiv preprint arXiv:2402.03927. https://doi.org/10.48550/arXiv.2402.03927
  5. Doğruöz, A. S., Sitaram, S., & Yong, Z. X. (2023). Representativeness as a forgotten lesson for multilingual and code-switched data collection and preparation. arXiv preprint arXiv:2310.20470. https://doi.org/10.48550/arXiv.2310.20470 DOI: https://doi.org/10.18653/v1/2023.findings-emnlp.382
  6. Fayyaz, M., Nazeer, I., & Ali, M. (2022). A Pedagogical Evaluation of Code-Switching at English Medium Secondary Schools of Gujrat. Orient Research Journal of Social Sciences, 7(1), 39–48.
  7. Jahan, M., Hussain, K. G., & Ahsan, A. (2023). Code-Switching on Computer-Mediated Discourse: An Analysis of the Facebookrs Walls as Second Language Learners. Journal of Development and Social Sciences, 4(4), 145-160. https://doi.org/10.47205/jdss.2023(4-IV)14 DOI: https://doi.org/10.47205/jdss.2023(4-IV)14
  8. Kumar, S., Akhtar, M. S., & Chakraborty, T. (2023). From multilingual complexity to emotional clarity: Leveraging commonsense to unveil emotions in code-mixed dialogues. arXiv preprint arXiv:2310.13080. https://doi.org/10.48550/arXiv.2310.13080 DOI: https://doi.org/10.18653/v1/2023.emnlp-main.598
  9. Mahraj, R. (2023). Language Switch Costs in Urdu-English Bilinguals: A Behavioral Study. https://digitalcommons.montclair.edu/etd/1305/
  10. Mian, A. R. (2019). Attitudes of English Language Teachers towards Code-switching (CS) in Pakistani Classrooms: A Review of five selected Articles. Journal of English Language, Literature and Education, 1(02), 17-28. https://doi.org/10.54692/jelle.2019.01022 DOI: https://doi.org/10.54692/jelle.2019.01022
  11. Naseer, Q., Syed, A. F., Din, A. J., & Iqbal, M. (2024). Exploring Functionality of Code Switching in the Conversations of Transgenders in Pakistan. Jahan-e-Tahqeeq, 7(1), 312-322. https://doi.org/10.61866/jt.v7i1.1137
  12. Naveed, H., Ghafoor, A., & Hussain, M. S. (2023). Sociolinguistic Factors behind Code-Switching at Micro Level in a Bilingual Society: Urdu-English-Punjabi Coexistence. Human Nature Journal of Social Sciences, 4(2), 625-634. https://hnpublisher.com/ojs/index.php/HNJSS/article/view/107
  13. Nazeer, I., Khan, N. M., Nawaz, A., & Rehman, J. (2024). An Experimental Analysis of Pragmatic Competence in Human-ChatGPT Conversations. Pakistan Journal of Humanities and Social Sciences, 12(1), 424-435. https://doi.org/10.52131/pjhss.2024.v12i1.2061 DOI: https://doi.org/10.52131/pjhss.2024.v12i1.2061
  14. Nazeer, I., Yousaf, S., & Anwar, N. (2023). Analyzing Linguistic Shifts in Political Discourse: A Corpus-Based Study of Political Rhetoric in the Digital Age. Pakistan Journal of Humanities and Social Sciences, 11(4), 3924-3933. https://doi.org/10.52131/pjhss.2023.1104.0661 DOI: https://doi.org/10.52131/pjhss.2023.1104.0661
  15. Nazeer, I., & Yousaf, S. (2023). Exploring the Language of Facebook Ads: Linguistic Patterns and their Impact on Customer Engagement. Journal of Positive School Psychology, 7(6), 105-118. https://www.journalppw.com/index.php/jpsp/article/view/16943
  16. Nedilko, A. (2023, July). Generative pretrained transformers for emotion detection in a code-switching setting. In Proceedings of the 13th Workshop on Computational Approaches to Subjectivity, Sentiment, & Social Media Analysis (pp. 616-620). https://doi.org/10.18653/v1/2023.wassa-1.61 DOI: https://doi.org/10.18653/v1/2023.wassa-1.61
  17. Rafique, H., Nazeer, I., & Rehman, J. (2024). The Impact of ChatGPT on Language Evolution: A Linguistic Analysis. Journal of Education and Social Studies, 5(1), 56-68. https://doi.org/10.52223/jess.2024.5106 DOI: https://doi.org/10.52223/jess.2024.5106
  18. Shah, T. Z., Imran, M., & Ismail, S. M. (2023). A diachronic study determining syntactic and semantic features of Urdu-English neural machine translation. Heliyon, 10(1), e22883. https://doi.org/10.1016/j.heliyon.2023.e22883 DOI: https://doi.org/10.1016/j.heliyon.2023.e22883
  19. Shakir, M. (2023). Functions of code-switching in online registers of Pakistani English. New Englishes, New Methods, 42. https://www.torrossa.com/en/resources/an/5495972#page=51 DOI: https://doi.org/10.1075/veaw.g68.03sha
  20. Tabbasum, R. (2023). Quantitative Investigation of Students' Perceptions regarding Code Switching in Pakistani English Classrooms at University Level. JELLL, 1(1), 53-72. https://ojs.aiou.edu.pk/index.php/jelll/article/view/1438
  21. Vedula, B. H., Kodali, P., Shrivastava, M., & Kumaraguru, P. (2023, July). PrecogIIITH@ WASSA2023: Emotion Detection for Urdu-English Code-mixed Text. In Proceedings of the 13th Workshop on Computational Approaches to Subjectivity, Sentiment, & Social Media Analysis (pp. 601-605). https://doi.org/10.18653/v1/2023.wassa-1.58 DOI: https://doi.org/10.18653/v1/2023.wassa-1.58
  22. Zainab, A., Ahmed, I., & Kshif, W. (2024). Urdu-English Code-Switching in Pakistani English. Voyage Journal of Educational Studies, 4(1), 47-56. https://doi.org/10.58622/vjes.v4i1.121 DOI: https://doi.org/10.58622/vjes.v4i1.121