Enhancing Dirty Data Detection via Large Language Models: Comparative Insights from ChatGPT, Gemini, and Copilot

Main Article Content

Damla Özyürek Bandırma Onyedi Eylül University image/svg+xml https://orcid.org/0000-0002-5413-5766
Aslı Suner https://orcid.org/0000-0002-6872-9901

Keywords

data quality, dirty data, data cleaning, large language models, ChatGPT, Gemini, Copilot, digital health

Abstract

Background: Dirty data, such as inconsistent categorical encodings, implausible values, duplicated records, and date/format errors, can compromise statistical inference and downstream decision-making. To support scalable data quality screening, LLMs are increasingly considered for data preparation tasks.


Methods: A tabular main dataset containing categorical and numerical variables was generated via stepwise prompting with ChatGPT and subsequently reviewed by domain experts. Seven representative data quality issues were injected (e.g., heterogeneous gender string variants, extreme BMI values due to decimal misplacement, gender–surgery incompatibilities, duplicates, admission date inconsistencies, character substitution [O↔0], and chronological/format errors). Using standardized prompts, the same datasets were uploaded to ChatGPT (v5.0), Gemini, and Copilot; queries were repeated across multiple attempts, and results were compared across models.


Results: Performance varied by error type. ChatGPT and Gemini struggled to consolidate semantically equivalent but differently written gender labels and produced incorrect frequency estimates, whereas Copilot identified more variants but still miscalculated proportions. All three models flagged extreme BMI outliers; Copilot, however, showed calculation errors in descriptive summaries. In detecting clinical plausibility constraints (e.g., gender–surgery mismatches) and structurally empty fields, models commonly misclassified empty cells as missing and, in some scenarios, generated hallucinated outputs. For duplicated records, ChatGPT and Gemini reliably detected duplicates but missed gender–surgery inconsistencies; Copilot’s duplicate detection improved across attempts, and it more consistently captured gender-related mismatches. ChatGPT best identified admission date inconsistencies, while Gemini and Copilot failed to detect these errors. For character substitution, Gemini and Copilot detected the issue while ChatGPT did not. For chronological and date format errors, Copilot outperformed ChatGPT and Gemini.


Conclusions: LLMs can assist with rapid screening for certain data quality issues (notably outlier detection and some format-level anomalies), but they demonstrate inconsistent reliability for semantic normalization, rule-based clinical plausibility checks, and the interpretation of missingness. Human-in-the-loop verification and complementary deterministic validation rules remain essential when LLMs are used in data cleaning workflows.

Abstract | Enhancing Dirty Data Detection via LLM Downloads

References

[1] Pilowsky JK, Elliott R, Roche MA. Data cleaning for clinician researchers: Application and explanation of a data-quality framework. Australian Critical Care. 2024;37(5):827–833. https://doi.org/10.1016/j.aucc.2024.03.004.

[2] Guo M, Wang Y, Yang Q, et al. Normal Workflow and Key Strategies for Data Cleaning Toward Real-World Data: Viewpoint. Interactive Journal of Medical Research. 2023;12:e44310. https://doi.org/10.2196/44310.

[3] Sharifnia AM, Kpormegbey DE, Thapa DK, Cleary M. A Primer of Data Cleaning in Quantitative Research: Handling Missing Values and Outliers. Journal of Advanced Nursing. 2026;82(1):970–975. https://doi.org/10.1111/jan.16908.

[4] Goldberg EA, Ross CJ, Douglas VP, Ivanov A, Elze T, Miller JW, Lorch AC, IRIS Registry Analytic Center Consortium. Data Duplication and Errors in Large Medical Data Sets: A Case Study in the IRIS® Registry. Ophthalmology Science. 2025;6(1):100933. https://doi.org/10.1016/j.xops.2025.100933.

[5] Lewis AE, Weiskopf N, Abrams ZB, et al. (2023). Electronic health record data quality assessment and tools: a systematic review. Journal of the American Medical Informatics Association (JAMIA). 2023;30(10):1730–1740. https://doi.org/10.1093/jamia/ocad120.

[6] Syed R, Eden R, Makasi T, et al. Digital Health Data Quality Issues: Systematic Review. Journal of Medical Internet Research. 2023;25:e42615. https://doi.org/10.2196/42615.

[7] Penev YP, Buchanan TR, Ruppert MM, et al. Electronic Health Record Data Quality and Performance Assessments: Scoping Review. JMIR Medical Informatics. 2024;12:e58130. https://doi.org/10.2196/58130.

[8] Chicco D, Oneto L, Tavazzi E. Eleven quick tips for data cleaning and feature engineering. PLoS Computational Biology. 2022;18(12):e1010718. https://doi.org/10.1371/journal.pcbi.1010718.

[9] Martins P, Cardoso F, Váz P, Silva J, Abbasi M. Performance and Scalability of Data Cleaning and Preprocessing Tools: A Benchmark on Large Real-World Datasets. Data. 2025;10(5):68. https://doi.org/10.3390/data10050068.

[10] Huynh N, Lin B. LLMs Automatically Generate Code to Data Clean. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD). 2024.

[11] Fischer T, Biemann C. Exploring large language models for qualitative data analysis. In Proceedings of the 4th international conference on natural language processing for digital humanities; 2024 Nov. p. 423-437. https://doi.org/10.18653/v1/2024.nlp4dh-1.41.

[12] Meguellati E, Pratama N, Sadiq S, Demartini G. Are large language models good data preprocessors? In Companion Proceedings of the ACM on Web Conference 2025; 2025 May. p. 2129-2132. https://doi.org/10.48550/arXiv.2502.16790.

[13] Errica F, Sanvito D, Siracusano G, Bifulco R. What did I do wrong? Quantifying LLMs' sensitivity and consistency to prompt engineering. In Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies. Volume 1: Long Papers; 2025 Apr. p. 1543–1558. https://doi.org/10.18653/v1/2025.naacl-long.73.

[14] Li A, Zhao Y, Qiu C, et al. Anomaly detection of tabular data using LLMs. arXiv [Preprint]. 2024. https://doi.org/10.48550/arXiv.2406.16308.

[15] Bedi S, Jiang Y, Chung P, Koyejo S, Shah N. Fidelity of medical reasoning in large language models. JAMA Network Open. 2025;8(8):e2526021–e2526021. https://doi.org/10.1001/jamanetworkopen.2025.26021.

[16] Zhang S, Huang Z, Wu E. Data cleaning using large language models. In 2025 IEEE 41st International Conference on Data Engineering Workshops (ICDEW). IEEE. 2025 May. p. 28–32. https://doi.org/10.1109/ICDEW67478.2025.00008.

[17] Kobayashi Y, Jeanselme V, Joshi S. (2025). Mind the data gap: Missingness Still Shapes Large Language Model Prognoses. arXiv [Preprint]. 2025. arXiv:2512.00479.

[18] Mahbub T, Dghaym D, Shankarnarayanan A, Syed T, Shapsough S, Zualkernan I. Can GPT-4 aid in detecting ambiguities, inconsistencies, and incompleteness in requirements analysis? A comprehensive case study. IEEE Access. 2024;12: 171972–171992. https://doi.org/10.1109/ACCESS.2024.3464242.

[19] Kwon SY, Bhatia G, Nagoud EMB, Abdul-Mageed M. ChatGPT for Arabic grammatical error correction. arXiv [Preprint]. 2023. https://doi.org/10.48550/arXiv.2308.04492.

[20] Hassenstein MJ, Vanella P. (2022). Data Quality—Concepts and Problems. Encyclopedia. 2022;2(1),498–510. https://doi.org/10.3390/encyclopedia2010032.

[21] Xu Y, Kang D, Shi D, Tham YC, Grzybowski A, Jin K. Leveraging ChatGPT for Report Error Audit: An Accuracy-Driven and Cost-Efficient Solution for Ophthalmic Imaging Reports. Ophthalmology and Therapy. 2025;1–14. https://doi.org/10.1007/s40123-025-01248-2.