Cocoon: Semantic Table Profiling Using Large Language Models
Zezhou Huang, Eugene Wu
TL;DR
Cocoon tackles the mismatch between statistical data profiling and real-world data semantics by introducing a three-step semantic workflow—Semantic Context, Semantic Profile, and Semantic Review—that leverages LLMs to inject domain semantics into error detection. It provides two outputs: an interactive UI that highlights semantically meaningful alerts and a JSON profile suitable for downstream LLM-based tasks, enabling more accurate data cleaning with reduced false positives and negatives. The approach covers a broad error taxonomy (including duplications, missing values, outliers, and disguises) and introduces higher-order type classification to extend semantic profiling beyond per-column checks. A pilot user study across climate and medical datasets demonstrates practical benefits and reveals limitations tied to domain knowledge and LLM latency, pointing to future work on expanding error coverage and enabling end-to-end cleaning. Overall, Cocoon demonstrates that semantically informed profiling can significantly improve data quality assessment and provide structured artifacts for downstream AI-assisted data tasks.
Abstract
Data profilers play a crucial role in the preprocessing phase of data analysis by identifying quality issues such as missing, extreme, or erroneous values. Traditionally, profilers have relied solely on statistical methods, which lead to high false positives and false negatives. For example, they may incorrectly flag missing values where such absences are expected and normal based on the data's semantic context. To address these, we introduce Cocoon, a data profiling system that integrates LLMs to imbue statistical profiling with semantics. Cocoon enhances traditional profiling methods by adding a three-step process: Semantic Context, Semantic Profile, and Semantic Review. Our user studies show that Cocoon is highly effective at accurately discerning whether anomalies are genuine errors requiring correction or acceptable variations based on the semantics for real-world datasets.
