[Paper Review] RetClean: Retrieval-Based Data Cleaning Using Foundation Models and Data Lakes
RetClean proposes a retrieval-augmented framework for data cleaning that leverages foundation models—either external (e.g., ChatGPT) or locally deployed (RoBERTa-based models)—in conjunction with user-provided data lakes to improve accuracy and explainability in missing value imputation. By retrieving semantically relevant tuples from a data lake and using them as context for foundation models, RetClean achieves up to 97% accuracy on general datasets and 88–94% on highly specialized enterprise data, outperforming standalone foundation models in domain-specific scenarios.
Can foundation models (such as ChatGPT) clean your data? In this proposal, we demonstrate that indeed ChatGPT can assist in data cleaning by suggesting corrections for specific cells in a data table (scenario 1). However, ChatGPT may struggle with datasets it has never encountered before (e.g., local enterprise data) or when the user requires an explanation of the source of the suggested clean values. To address these issues, we developed a retrieval-based method that complements ChatGPT's power with a user-provided data lake. The data lake is first indexed, we then retrieve the top-k relevant tuples to the user's query tuple and finally leverage ChatGPT to infer the correct value (scenario 2). Nevertheless, sharing enterprise data with ChatGPT, an externally hosted model, might not be feasible for privacy reasons. To assist with this scenario, we developed a custom RoBERTa-based foundation model that can be locally deployed. By fine-tuning it on a small number of examples, it can effectively make value inferences based on the retrieved tuples (scenario 3). Our proposed system, RetClean, seamlessly supports all three scenarios and provides a user-friendly GUI that enables the VLDB audience to explore and experiment with the system.
Motivation & Objective
- To address the limitations of standalone foundation models in data cleaning, such as lack of domain-specific knowledge and explainability.
- To enable privacy-preserving data cleaning by supporting locally deployable foundation models for enterprise data.
- To improve accuracy in missing value imputation by retrieving relevant tuples from a user-provided data lake as context for reasoning.
- To provide a user-friendly interface that supports three distinct data cleaning scenarios: direct ChatGPT use, retrieval-augmented ChatGPT, and local model inference.
- To demonstrate that retrieval-based prompting significantly enhances foundation model performance on domain-specific and low-resource datasets.
Proposed method
- RetClean indexes a user-provided data lake using Sentence Transformers for semantic embedding, enabling efficient retrieval of relevant tuples.
- For retrieval, it employs either a bi-encoder (cross-encoder) approach with cosine similarity or a cross-encoder for pair-wise similarity scoring between query and retrieved tuples.
- The system uses a two-stage reasoning pipeline: first, a Matcher model determines if a retrieved tuple is relevant to the query tuple (based on pivot columns and semantic alignment); second, an Extractor model identifies and extracts the target value using embedding-based attribute matching.
- For external foundation models, prompts are constructed with the query tuple, retrieved tuple, and a two-part question: (1) Do they refer to the same entity? (2) What is the value for the missing attribute?
- For privacy-sensitive use cases, RetClean employs a fine-tunable RoBERTa-based local model stack, where the Matcher and Extractor are trained on a small number of labeled examples from the target dataset.
- The system supports three configurations: (1) direct ChatGPT inference, (2) retrieval-augmented ChatGPT, and (3) retrieval-augmented local model inference, all accessible via a GUI.

Experimental results
Research questions
- RQ1Can foundation models like ChatGPT effectively clean real-world data tables with missing values, and what are their limitations in low-resource or domain-specific settings?
- RQ2How does retrieval from a user-provided data lake improve the accuracy and explainability of foundation model-based data cleaning?
- RQ3Can a locally deployable, fine-tuned foundation model achieve performance comparable to external models like ChatGPT while preserving data privacy?
- RQ4To what extent does the inclusion of pivot columns and semantic retrieval enhance value inference in data cleaning tasks?
- RQ5How do retrieval-augmented methods compare to standalone foundation model inference on datasets with rare or domain-specific attributes?
Key findings
- On the Cricket Players dataset, all three scenarios achieved over 96% accuracy, indicating strong performance on world-knowledge-based attributes.
- For the Animals dataset, retrieval-based methods (Scenarios 2 and 3) achieved 96% accuracy, significantly outperforming standalone ChatGPT (79%).
- On the Shows-Movies dataset, which contains rare or obscure content, retrieval-based methods improved accuracy from 27% (ChatGPT only) to 74% with the local model, highlighting the benefit of retrieval in low-resource settings.
- For the QCRI Personnel dataset—a highly specialized, enterprise-specific dataset—standalone ChatGPT failed (5% accuracy), but retrieval-augmented methods achieved 94% (ChatGPT) and 88% (local model), proving the necessity of data lake integration.
- The locally deployed RoBERTa-based model achieved competitive performance (88% accuracy) on the QCRI dataset, demonstrating that privacy-preserving local inference can match external model performance.
- Fine-tuning the Matcher and Extractor models on just 10–20 examples from a new dataset significantly improved generalization, enabling effective inference on unseen schemas.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.