Skip to main content
QUICK REVIEW

[Paper Review] Language Models Enable Simple Systems for Generating Structured Views of Heterogeneous Data Lakes

Simran Arora, Brandon Yang|arXiv (Cornell University)|Apr 19, 2023
Topic ModelingComputer Science8 citations
TL;DR

The paper presents Evaporate, a prototype system that uses large language models to generate structured views from heterogeneous data lakes, comparing direct extraction, code synthesis, and a weak-supervision ensemble that achieves high quality at low cost with sublinear document processing.

ABSTRACT

A long standing goal of the data management community is to develop general, automated systems that ingest semi-structured documents and output queryable tables without human effort or domain specific customization. Given the sheer variety of potential documents, state-of-the art systems make simplifying assumptions and use domain specific training. In this work, we ask whether we can maintain generality by using large language models (LLMs). LLMs, which are pretrained on broad data, can perform diverse downstream tasks simply conditioned on natural language task descriptions. We propose and evaluate EVAPORATE, a simple, prototype system powered by LLMs. We identify two fundamentally different strategies for implementing this system: prompt the LLM to directly extract values from documents or prompt the LLM to synthesize code that performs the extraction. Our evaluations show a cost-quality tradeoff between these two approaches. Code synthesis is cheap, but far less accurate than directly processing each document with the LLM. To improve quality while maintaining low cost, we propose an extended code synthesis implementation, EVAPORATE-CODE+, which achieves better quality than direct extraction. Our key insight is to generate many candidate functions and ensemble their extractions using weak supervision. EVAPORATE-CODE+ not only outperforms the state-of-the art systems, but does so using a sublinear pass over the documents with the LLM. This equates to a 110x reduction in the number of tokens the LLM needs to process, averaged across 16 real-world evaluation settings of 10k documents each.

Motivation & Objective

  • Demonstrate that general-purpose LLMs can produce structured views from diverse semi-structured documents without domain-specific training.
  • Compare two implementation strategies (direct extraction vs. code synthesis) for building these views.
  • Introduce Evaporate-Code+ to improve extraction quality via weak supervision over many synthesized functions.
  • Quantify cost-quality tradeoffs and scalability across multiple datasets and models.

Proposed method

  • Define a formal task: input a set of semi-structured documents and output a table with attributes and per-document records.
  • Evaluate Evaporate-Direct (LLM directly extracts values) and Evaporate-Code (LLM synthesizes reusable extraction code) across 16 real-world settings.
  • Show Evaporate-Code+ uses many candidate functions and weak supervision to ensemble extractions and improve accuracy.
  • Employ a small sample for schema synthesis and generate many candidate functions for attributes, then aggregate with a tailored weak supervision algorithm.
  • Demonstrate sublinear LLM processing by decoupling schema discovery and extraction from the full document set.
  • Assess performance with four models from three LLM providers to confirm robustness.
Figure 1: The user provides a collection of raw documents (e.g. NBA player Wikipedia pages) and Evaporate outputs a table by identifying attributes and populating columns. Evaporate avoids running expensive LLM inference on all documents by (1) synthesizing the key attributes from a small sample of
Figure 1: The user provides a collection of raw documents (e.g. NBA player Wikipedia pages) and Evaporate outputs a table by identifying attributes and populating columns. Evaporate avoids running expensive LLM inference on all documents by (1) synthesizing the key attributes from a small sample of

Experimental results

Research questions

  • RQ1Can a general, prompt-driven LLM system generate structured views from heterogeneous documents without domain-specific training?
  • RQ2What are the cost and quality tradeoffs between direct extraction and code synthesis approaches for this task?
  • RQ3Does a weak-supervision ensemble over many synthesized functions improve extraction quality while maintaining low cost?
  • RQ4How robust are the results across different LLM providers and document types?

Key findings

  • Evaporate-Direct achieves competitive quality in some settings but scales poorly due to linear token processing with data lake size.
  • Evaporate-Code provides sublinear cost by processing a small document sample for schema and synthesizing functions for extraction, but initially at lower quality than direct extraction.
  • Evaporate-Code+ with weak supervision achieves a 67.5 average pair F1 score across settings, a 12.1 point improvement over Evaporate-Direct.
  • Evaporate-Code+ improves extraction performance by 22% on average over Evaporate-Direct for a predefined schema.
  • The approach yields a 110× reduction in the number of tokens processed by the LLM on 10k documents per data lake across evaluated settings.
  • The results are validated across four models from three LLM providers, with consistent relative quality between Evaporate-Direct and Evaporate-Code+.
Figure 2: Prompt for Evaporate-Direct structured. The prompt template, which includes placeholders for in-context examples and and the inference example (i.e., data lake documents in the context of our problem), is applied to each document in the data lake.
Figure 2: Prompt for Evaporate-Direct structured. The prompt template, which includes placeholders for in-context examples and and the inference example (i.e., data lake documents in the context of our problem), is applied to each document in the data lake.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.