Table of Contents
Fetching ...

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.

Cocoon: Semantic Table Profiling Using Large Language Models

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.
Paper Structure (25 sections, 4 figures, 1 table)

This paper contains 25 sections, 4 figures, 1 table.

Figures (4)

  • Figure 1: The process of how semantic understanding is used for profiling. Previous profiler generates only Statistical Profiles, and users have to manually understand, profile and review whether the errors are semantically meaningful.
  • Figure 2: Cocoon System Design: First, Cocoon summarizes tables, groups attributes, and summarizes columns for Semantic Context. Then, Cocoon performs Semantic Profiling and Semantic Review for each error type, starting from the table-level error (duplication) to column-level errors. Analysts interactively verify the process.
  • Figure 3: The panel displays the Semantic Context of the table, including the table summary, hierarchical grouping of attributes, and the column summary. Users can edit both the summary and the hierarchy.
  • Figure 4: Example JSON profile generated by Cocoon, used by downstream LLM applications to build prompts.

Theorems & Definitions (9)

  • Example 1
  • Example 2
  • Example 3
  • Example 4
  • Example 5
  • Example 6
  • Example 7
  • Example 8
  • Example 9