🤖 AI Summary
Existing interactive BI systems often suffer from low accuracy and high computational overhead when handling complex JOINs, wide-table schema linking, dialect-specific SQL generation, and multi-turn dialogues. This work proposes an industrial-scale interactive BI system featuring a novel dual-agent architecture: an offline view-generation agent automatically constructs simplified views driven by error feedback, while a dynamic routing agent leverages hierarchical schema linking and context-aware mechanisms to decompose complex queries into single-view queries. Integrating large language models, vector retrieval, and a dialect-agnostic deterministic SQL compiler, the system achieves high-precision, low-cost natural language-to-SQL translation without manual semantic modeling. Experiments demonstrate significant improvements in query accuracy, token efficiency, and user satisfaction on both public and production datasets. The system has been deployed on Baidu’s data platform, serving thousands of users daily.
📝 Abstract
The advent of Large Language Models has catalyzed the emergence of interactive Business Intelligence (BI) systems. Although commercial BI products increasingly adopt semantic layers paired with natural language interfaces, they predominantly rely on manual configurations to define metrics and dimensions. Real-world deployments face critical challenges: (a) frequent JOIN operations degrade the accuracy of SQL generation; (b) wide schemas exacerbate the challenge of schema linking; and (c) the generation of dialect-specific queries and the accurate support for multi-round dialogues incur high computational costs and yield limited accuracy. We introduce CoeusBI, an industrial-scale interactive BI system that addresses these barriers through a novel Dual-Agent Architecture paired with a Hierarchical Schema Linking module: (1) an offline View Generation Agent that utilizes error-feedback to autonomously convert complex JOIN queries into simple single-view queries, which eliminates the need for manual semantic modeling; (2) a Hierarchical Schema Linking module that leverages vector retrieval over views to handle exceptionally wide schemas efficiently; and (3) a dynamic Routing Agent that evaluates dialogue contexts to route queries, dynamically invoking either the synthesis of new intermediate representations or targeted modifications of existing ones, before compiling the unified representation via a deterministic SQL compiler that is agnostic to dialects. Extensive experiments on both public datasets and production datasets demonstrate that CoeusBI achieves significant improvements in query accuracy, token efficiency, and user satisfaction relative to existing methods. CoeusBI is deployed as a standalone service on the data platform of Baidu and is widely used across multiple business lines supporting thousands of users daily, thereby evidencing strong practicality and scalability.