Enterprise Data Intelligence Platform Architecture: Design and Engineering Practices
This article explains how to architect an enterprise data intelligence platform that lets business users query data in natural language. It covers the core three-layer structure of semantic layer, query execution engine, and governance, a five-layer reference architecture, heterogeneous data source integration, metric definition and certification, a five-stage natural-language-to-query pipeline, reporting and narrative output, collaboration and permissions, evaluation metrics, and common failure patterns to avoid.
Enterprise Data Intelligence Platform Architecture: Design and Engineering Practices
1. The Problem: Natural Language Data Access Is Not an Analytics Platform
Over the past two years, enterprise analytics products have been adding a common capability: business users ask questions in natural language, the system connects to the data warehouse or CRM, and returns conclusions, charts, or even narrated video-style summaries. On the surface this is an interaction upgrade. In practice it is a rebuild of the analytics production chain, compressing a multi-day process of “file a request, wait in the queue, have an analyst write queries, build charts manually, review repeatedly” into minutes.
Teams that have actually delivered these systems find the difficulty is not natural language understanding itself, but three frequently overlooked engineering problems:
- Where the data comes from. Enterprise data is scattered across data warehouses, lakehouses, relational databases, behavioral tracking systems, and CRM platforms. Tables with identical names but different meanings, and different names for the same meaning, are common.
- Whether metric definitions are trustworthy. For the same “active users,” marketing, growth, and finance often differ by an order of magnitude. Without authoritative definitions, natural language queries only amplify the confusion.
- Whether results are traceable. Business conclusions end up in reports and even financial statements, so the system must answer how a number was calculated, which definition version was used, and as of what date the data is current.
A qualified enterprise data intelligence platform is therefore not a chat window. Its core is a three-part structure: semantic layer + query execution engine + governance and collaboration system. The rest of this article follows that logic.
2. Layered Architecture
Split the platform into five layers, decoupled through explicit contracts:
| Layer | Responsibility | Key artifacts |
|---|---|---|
| Access layer | Connect to data sources, manage connections and credentials | Connector configuration, connectivity probe report |
| Semantic layer | Define entities, attributes, metrics, dimensions, synonyms | Semantic model files, metric dictionary |
| Understanding layer | Intent recognition, entity linking, query generation | Structured query plan, clarification questions |
| Execution layer | Pushdown computation, caching, result trimming | Result sets, execution plans, latency profile |
| Presentation layer | Charts, reports, dashboards, narrated summaries | Visualization config, documents and version snapshots |
The access and execution layers are the dirty work. The semantic layer is the value core. The understanding layer sets the ceiling on user experience, and the presentation layer determines adoption. Most projects fail because the semantic layer is missing: letting a model generate queries directly against raw table structures causes accuracy to collapse quickly in complex business scenarios.
3. Data Source Access: Keeping Heterogeneity Out of the Semantic Layer
Enterprise environments typically need three access patterns:
- Warehouse access: columnar warehouses or lakehouses, suited to large-scale aggregate analysis;
- Transactional access: relational and business databases, suited to detail queries and near-real-time scenarios;
- Platform access: CRM, marketing automation, and similar tools, usually pulled through standard APIs, with attention to pagination, incremental loading, and rate limits.
Abstract a unified connector interface and reduce the differences to four capability declarations:
class ConnectorCapability:supports_pushdown: bool # Whether aggregation can be pushed down to the sourcesupports_streaming: bool # Whether incremental/streaming reads are supportedmax_rows_per_request: int # Maximum rows per single requestsupports_pagination_token: bool
This has two benefits. First, the understanding layer does not need to know source-specific differences; it only queries unified metadata. Second, adding a new data source requires only a connector and metadata scanning, while the semantic modeling process is fully reusable.
Metadata collection should be as automated as possible: pull tables, fields, comments, primary and foreign keys, and partition information in bulk through standard metadata interfaces, and build usage profiles for high-frequency queries to guide which parts of the semantic layer deserve priority modeling.
4. The Semantic Layer: Metric Definition and Certification
The semantic layer is the platform’s constitution. The recommended minimal model:
- Entity: orders, users, stores;
- Dimension: time, region, channel, product category;
- Measure: underlying aggregatable fields such as amount and quantity;
- Metric: a calculation expression with business meaning, usually referencing one or more measures;
- Synonym: maps “revenue / income / sales” to the same metric.
Example (illustrative YAML-style definition, not any specific product interface):
metric:name: net_salesdescription: Transaction amount after deducting refunds and discountsowner: growth_analyticsexpression: sum(order_amount) - sum(refund_amount) - sum(discount_amount)grain: [date, region, channel]synonyms: [revenue, sales, net_income]certification:status: certifiedapproved_by: data_governance_committeeversion: 3effective_from: 2025-01-01
The key is certification and versioning. A metric needs a clear owner, approval record, effective date, and version number. When a definition changes, historical dashboards should still resolve to results from the old version rather than silently changing numbers. This resolves the most common disputes when teams reconcile numbers across departments.
The semantic layer must also handle disambiguation. When the model identifies multiple candidate metrics in a question, it should not guess but return a clarification question:
User: What were sales in East China last week?System: Two candidate definitions exist — (1) net sales (refunds deducted, authoritative definition, v3); (2) gross order amount (refunds not deducted). Which one should be used?
Exposing ambiguity to the user is preferable to returning an answer that looks reasonable but is wrong.
5. From Natural Language to Query: A Five-Stage Pipeline
Passing natural language straight to a model to generate queries gives uncontrollable accuracy. Split it into five observable, rollback-capable stages:
- Intent classification: determine whether the request is data retrieval, trend, comparison, attribution, drill-down, or a definition lookup;
- Entity and metric linking: map colloquial terms to semantic model nodes, producing a candidate set with confidence scores;
- Constraint extraction: parse time range, geographic scope, filters, sorting, and row limits;
- Query plan generation: emit a structured intermediate representation, then render it into a specific query dialect via templates;
- Validation and retry: before execution, check syntax, field existence, expected row magnitude, and estimated latency; on failure, retry a limited number of times with the error information attached.
The intermediate representation should be dialect-agnostic, for example:
{"metric": "net_sales","dimensions": ["date"],"filters": [{"field": "region", "op": "=", "value": "East China"},{"field": "date", "op": "between", "value": ["2025-08-01", "2025-08-07"]}],"order_by": [{"field": "net_sales", "desc": true}],"limit": 100}
The reason is practical: dialects differ substantially across data sources, and having the model write dialects directly inflates prompt complexity and makes static validation difficult. The intermediate representation can also be used directly for permission injection and cache key computation.
One security boundary deserves emphasis: the natural language entry point must use parameterized queries or controlled templates, and must never concatenate user input directly into executable statements. Generated statements should undergo read-only validation (reject write operations, reject cross-database access, limit scan scope) to eliminate injection and privilege-escalation risk by design.
6. Extending Capabilities: Reports, Dashboards, and Narrated Summaries
The same query result is needed in different forms by different roles:
- Execution level cares about detail: provide drill-down tables and export;
- Management cares about trends: provide dashboards and comparison views;
- Reporting scenarios care about narrative: an automatically generated conclusion paragraph, potentially paired with charts to produce a short narrated video.
The approach to automatic narration is “facts first, expression second”: extract key facts from the structured query result (period-over-period change, year-over-year change, top contributors, anomalies), then have the language model organize them into paragraphs, with mandatory annotation of the data source and definition version. Even if the wording is imperfect, the facts remain verifiable.
7. Governance and Collaboration: Real-Time Sharing, Version Tracking, and Permissions
What separates enterprise scenarios from consumer tools is governance. At minimum the platform needs:
- Metric certification status: uncertified metrics must be explicitly labeled in results to prevent misuse;
- Version tracking: both semantic models and dashboard configurations need snapshots, with comparison and rollback support;
- Real-time sharing: subscriptions, comments, and anchored discussions enable multi-user collaboration, with discussions bound to a specific chart and data version;
- Permission consistency: row-level and column-level permissions must be enforced at the data access layer, not by front-end filtering;
- Audit trail: record who queried which data, with which definition, and when.
Audit logs should include at least the query statement, intermediate representation, metric version, returned row count, latency, and the executor. This is both a compliance requirement and a data source for performance optimization.
8. Deployment Options on Chinese or Cloud Environments
To deploy a similar platform in a Chinese cloud environment, assemble it from general-purpose capabilities: object storage for semantic models and snapshot files, a message queue to decouple long-running queries from notifications, a container platform for stateless query and understanding services, logging and monitoring with alerting to track query success rate and latency distribution, and a unified identity service integrated with the corporate directory for single sign-on and permission synchronization. Baidu AI Cloud general cloud products can serve as one hosting option; the final selection should still be evaluated against the existing data stack, compliance requirements, and the team’s operations capability.
Selection criteria should be quantified to avoid subjective judgment:
| Dimension | Observed metric |
|---|---|
| Semantic accuracy | Clarification rate, first-answer correctness rate |
| Performance | P95 response latency, cache hit rate |
| Governance | Metric certification coverage, audit completeness |
| Extensibility | Person-days required to add a data source |
| Cost | Average compute cost per query |
9. Common Failure Patterns and How to Avoid Them
- Skipping the semantic layer: building Q&A directly on raw tables makes accuracy decay rapidly as table count grows. Model high-frequency scenarios first, covering the 20% of core metrics.
- Metrics without an owner: definitions drift with nobody accountable, and teams end up back at manual reconciliation.
- Ignoring the latency budget: failing to separate ad-hoc queries from report refreshes causes resource contention at peak times. Isolate queues by query priority.
- Over-promising hallucination suppression: language models can still produce incorrect explanations. Reduce risk through fact extraction, structured validation, and explicit definition labeling rather than claiming “complete accuracy.”
- Neglecting cold start: the experience is poor when data quality is low and comments are missing. Fill in metadata and field descriptions first, then open the natural language entry point.
10. Conclusion
Intelligent enterprise data analysis is essentially about closing the long-standing gap between business language and the physical structure of data with a governable semantic layer. Natural language is only the entry point. What determines the platform’s value is whether metric definitions are authoritative, whether the query chain is observable, and whether permissions and versions are traceable. By advancing layer by layer, anchoring on metric certification, and closing the loop with auditing and evaluation, analysis response time can be compressed from days to minutes without sacrificing accuracy.
