TL;DR
The paper introduces EVAPORATE, a system that leverages Large Language Models (LLMs) to automatically transform messy, heterogeneous data lakes into structured tables without requiring domain-specific training or manual rules. By shifting from direct LLM extraction to an ensembled code-generation approach (Evaporate-Code+) powered by weak supervision, the system achieves state-of-the-art accuracy while slashing LLM token costs by an average of 110x.
What Problem Does This Paper Address?
Organizations sit on massive data lakes filled with semi-structured and unstructured documents—think HTML webpages, corporate emails, and multi-page PDFs. Turning this raw text into structured, queryable database tables is a classic data management headache.
Traditional Information Extraction (IE) systems are brittle. They usually require thousands of manually labeled examples, or they rely on strict assumptions (e.g., assuming the data is always in an HTML DOM tree). When faced with a 20-page medical PDF or an unstructured email thread, these systems fall apart. While LLMs are excellent at understanding diverse document formats out-of-the-box, running an LLM over millions of multi-page documents is prohibitively expensive and slow. This paper tackles the core challenge: How can we build a general, automated extraction system that achieves high quality without skyrocketing computational costs?
Methods
The authors propose EVAPORATE and evaluate three distinct implementation strategies:
- Evaporate-Direct: The LLM processes every single document directly to extract values. While highly accurate, its cost scales linearly with the size of the data lake ($O(n)$), making it too expensive for large-scale production.
- Evaporate-Code: The LLM processes a small sample of documents to identify the schema and synthesize code (e.g., Python functions using regex or BeautifulSoup). This code is then executed at scale across the data lake. This is highly cost-effective ($O(m)$ where $m$ is the number of attributes) but suffers from low accuracy because a single generated function can be fragile.
- Evaporate-Code+ (Core Contribution): To bridge the quality gap, this approach prompts the LLM to generate many diverse candidate functions per attribute. It then uses a novel Weak Supervision (WS) framework to ensemble these functions and aggregate their outputs.
Standard weak supervision assumes human-designed rules that perform better than random guessing and explicitly "abstain" when they don't apply. Because machine-generated functions frequently produce garbage or fail silently, the authors designed a new unsupervised aggregation algorithm (Algorithm 1). It uses a tiny validation set (processed via direct LLM inference) to score function quality, filter out underperforming code, and mathematically model whether an empty string represents a function "abstention" or a genuinely missing attribute.
Datasets
The system was evaluated across 16 real-world settings spanning 5 distinct domains and 3 file formats:
- SWDE (Structured Web Data Extraction): A standard benchmark featuring Movie (e.g., IMDb) and University websites. The authors extended this into SWDE Plus to include attributes hidden in HTML headers and tags.
- Wiki NBA: Wikipedia player biography pages containing complex, nested HTML.
- Enron Emails: A corpus of unstructured text emails.
- FDA 510(k) Reviews: Highly complex, semi-structured medical device review PDFs spanning up to 20 pages per document.
Key Insights and Ideas
- Exploiting Redundancy: Data lakes exhibit massive structural redundancies. Schema attributes (like "Draft Year") are redundant across documents, meaning you only need a small sample to identify the table headers. Similarly, formatting patterns are highly repetitive, which makes code synthesis viable.
- Decoupling Cost from Data Size: By shifting from direct text extraction to code generation,
EVAPORATEchanges the cost bottleneck from the number of documents to the number of attributes.
- Ensembling Beats Direct Extraction: Programmatic ensembling doesn't just save money—it actually improves quality. LLMs can be inconsistent when processing text directly over thousands of documents. Ensembling multiple synthesized code snippets smooths out these individual LLM errors.
Key Results
- Massive Cost Reductions:
Evaporate-Code+achieved a 110x average reduction in the number of tokens the LLM needed to process compared toEvaporate-Direct. - Superior Quality: Despite the cost reduction,
Evaporate-Code+outperformedEvaporate-Directby 10.1 F1 points on average across the evaluation settings. - Beating the Baselines:
Evaporate-Code+outperformed state-of-the-art learned baseline systems (like DOM-LM) by 3.2 F1 points end-to-end and 6.7 F1 points on closed information extraction tasks—all without requiring any task-specific training data.
Limitations and Future Work
- Function Generation Failures: The primary failure mode occurs when the LLM is entirely unable to generate a working Python/regex function for highly complex, non-standardized text attributes.
- Chatbot Verbosity: Some models (like Anthropic's Claude) occasionally return conversational text (e.g., "I am happy to help you write this function...") instead of pure code, which can break automated parsing pipelines.
- Future Directions: The authors suggest exploring iterative function generation, where execution or compilation errors are fed back into the LLM to automatically debug the synthesized code. They also propose exploring hybrid functions that can selectively call smaller, specialized models or external APIs.
Summary updated