Abstract
Business intelligence (BI) transforms large volumes of data within modern organizations into actionable insights for informed decision-making. Recently, large language model (LLM)-based agents have streamlined the BI workflow by automatically performing task planning, reasoning, and actions in executable environments based on natural language (NL) queries. However, existing approaches primarily focus on individual BI tasks such as NL2SQL and NL2VIS. The fragmentation of tasks across different data roles and tools lead to inefficiencies and potential errors due to the iterative and collaborative nature of BI. In this paper, we introduce DataLab, a unified BI platform that integrates a one-stop LLM-based agent framework with an augmented computational notebook interface. DataLab supports various BI tasks for different data roles in data preparation, analysis, and visualization by seamlessly combining LLM assistance with user customization within a single environment. To achieve this unification, we design a domain knowledge incorporation module tailored for enterprise-specific BI tasks, an inter-agent communication mechanism to facilitate information sharing across the BI workflow, and a cell-based context management strategy to enhance context utilization efficiency in BI notebooks. Extensive experiments demonstrate that DataLab achieves state-of-the-art performance on various BI tasks across popular research benchmarks. Moreover, DataLab maintains high effectiveness and efficiency on real-world datasets from Tencent, achieving up to a 58.58% increase in accuracy and a 61.65% reduction in token cost on enterprise-specific BI tasks.
Introduction
Traditional Business Intelligence (BI) workflows are often fragmented, requiring data engineers to use development environments for data preparation while analysts rely on GUI-based tools for visualization. This "tool gap" creates significant communication bottlenecks and slow iterative cycles. While Large Language Models (LLMs) have automated specific tasks like NL2SQL, most existing solutions are isolated "one-trick ponies" that struggle with the messy, undocumented nature of real-world enterprise data.
DataLab addresses these challenges by unifying data roles and tasks into a single, LLM-augmented computational notebook. By providing a common ground for both technical and non-technical users, DataLab streamlines the end-to-end BI process from data cleaning to insight generation.
Methodology
DataLab's effectiveness stems from three core technical innovations designed for complex enterprise environments:
1. Domain Knowledge Incorporation
Rather than relying on often-missing manual documentation, DataLab employs a "Map-Reduce" approach to analyze historical SQL and Python scripts. It extracts semantic meanings, usage patterns, and business logic to construct a Knowledge Graph. This allows the LLM to resolve ambiguous or cryptic schema elements by understanding how they have been used in past production code.
2. Inter-Agent Communication
To avoid the redundancy and "hallucinations" common in unstructured multi-agent chats, DataLab utilizes a Finite State Machine (FSM). Specialized agents (e.g., SQL, Cleaning, and Chart agents) communicate via structured "information units" through a shared buffer. This ensures a controlled, efficient flow of data across the BI pipeline.
3. Cell-based Context Management
To manage the limited context windows of LLMs and reduce API costs, DataLab models notebook cells as a Directed Acyclic Graph (DAG) based on variable dependencies. When processing a query, the system selectively retrieves only the relevant "ancestor" cells and data units, significantly optimizing token usage.
Evaluation and Results
DataLab was evaluated against a wide array of public benchmarks (including Spider, BIRD, and VisEval) and a massive proprietary dataset from Tencent, which includes over 262,000 tables.
Key results include:
- State-of-the-Art Performance: DataLab outperformed existing frameworks like AutoGen across nearly all tested BI benchmarks.
- Enterprise Efficacy: On Tencent's internal data, the Domain Knowledge module drove a 58.58% increase in accuracy for enterprise-specific tasks.
- Operational Efficiency: The DAG-based context management strategy reduced token costs by 61.65%, while user case studies showed a reduction in visualization creation time from 15 minutes to just 2 minutes.
Conclusion
DataLab represents a significant step toward unified, LLM-powered business intelligence. By bridging the gap between disparate data roles and providing a structured framework for domain knowledge and agent communication, it enables more accurate and efficient data-driven decision-making. Future work will focus on better integrating unstructured context from Markdown cells and refining coordination for open-ended discovery tasks.
Summary updated