Abstract
Large language models (LLMs) know little about enterprise database tables in the private data ecosystem, which substantially differ from web text in structure and content. As LLMs' performance is tied to their training data, a crucial question is how useful they can be in improving enterprise database management and analysis tasks. To address this, we contribute experimental results on LLMs' performance for text-to-SQL and semantic column-type detection tasks on enterprise datasets. The performance of LLMs on enterprise data is significantly lower than on benchmark datasets commonly used. Informed by our findings and feedback from industry practitioners, we identify three fundamental challenges—latency, cost, and quality—and propose potential solutions to use LLMs in enterprise data workflows effectively.
Introduction
The rapid advancement of Large Language Models (LLMs) like GPT-4 has sparked significant interest in their application to data management. However, while these models excel at processing public web text, they encounter a "reality check" when applied to private enterprise databases. Enterprise data is structured, private, and governed by domain-specific logic that is absent from the public datasets used during model pretraining. This paper investigates the performance gap between public benchmarks and real-world enterprise tasks, specifically focusing on text-to-SQL conversion and semantic column-type detection.
Experimental Framework
To evaluate the utility of LLMs in enterprise environments, we conducted two primary experiments using zero-shot prompting. This approach tests the "off-the-shelf" capabilities of models without the need for extensive fine-tuning.
Task 1: Text-to-SQL
Using GPT-4, we evaluated the model's ability to convert natural language questions into executable SQL queries. We varied the level of context provided in the prompts to measure its impact on performance:
- Schema Only: Table definitions and column names.
- Schema + Rules: Table definitions plus domain-specific business logic.
- Schema + Querylog: Table definitions plus a history of previous human-written queries.
Task 2: Semantic Column-Type Detection
Using GPT-3.5-turbo, we tested the model’s ability to label column data (e.g., identifying a column as "salary" vs. "population"). We also explored the model's capacity for ab initio ontology generation—creating a metadata hierarchy from scratch based solely on the raw data.
Datasets
Our evaluation utilized three distinct datasets to compare public and private performance:
- MIT Data Warehouse (DW): A private-sector benchmark containing 37 NL-SQL pairs across 99 tables involving faculty, facilities, and student data.
- Goby: An enterprise dataset featuring 1,187 tables related to events and shows, characterized by heterogeneous schemas and human-verified labels.
- Spider: A standard public text-to-SQL benchmark used as a baseline to measure the performance drop when moving to private data.
Key Findings
The "Pretraining Leakage" Advantage
A stark contrast emerged between public and private data performance. On the public Spider benchmark, LLMs achieved 42% accuracy with zero context. In contrast, on the MIT DW dataset, the model achieved 0% accuracy with no context. This suggests that LLMs often "know" the answers to public benchmarks because that data was likely present in their training sets, whereas they have no prior knowledge of private enterprise schemas.
The Power of Context and Query Logs
Context is the primary driver of performance in enterprise settings. For text-to-SQL tasks on the MIT DW, providing schema and domain rules resulted in 40% accuracy. However, providing a query log—showing how humans have historically interacted with the data—pushed accuracy to 48%. This indicates that historical usage patterns are more valuable to the model than static business rules.
Strengths in Ontology Discovery
While LLMs struggle with precise classification in unfamiliar domains, they excel at structure discovery. When asked to generate an ontology from scratch for the Goby dataset, GPT-3.5 recovered 70.5% of the labels devised by human experts. This suggests that LLMs are highly effective tools for initial data exploration and metadata bootstrapping.
The "Enterprise Tax"
Across all tests, we observed a consistent performance "tax" of approximately 10% in F1 scores when moving from public benchmarks to private enterprise data. This distribution shift represents a significant hurdle for deploying LLMs in production environments.
Challenges and Future Directions
Our research identifies three "non-starters" for current LLM integration in enterprise workflows:
- Latency: API-based inference is often too slow for interactive data exploration.
- Cost: The financial overhead of high-volume API calls or dedicated GPU clusters is substantial.
- Quality: Hallucinations and non-deterministic outputs pose risks to data integrity.
To overcome these barriers, we propose a shift toward Action Context. Future models should be trained not just on static data, but on the logs of how data is queried, modified, and utilized by human experts. Furthermore, we advocate for a hybrid toolstack that combines the broad reasoning of LLMs with the precision of hard-coded rules and the efficiency of smaller, locally hosted, specialized models.
Summary updated