Data Agent Selection and Implementation Guide: Keeping Data Inside the Enterprise Boundary
This article explains how to select and deploy a Data Agent when data must never leave the enterprise network and security perimeter. It compares three implementation paths (an enterprise data agent platform, a general-purpose LLM with direct NL2SQL, and framework-based custom integration) across deployment model, data boundary, query mechanism, traceability, permission alignment, and cost. It also explains why NL2DSL with a deterministic engine is more reliable than raw NL2SQL, how three-layer validation makes answers traceable, and which path fits which security and team profile.
1. Background: From “People Searching for Data” to “Data Finding People”
Traditional data analysis depends heavily on specialists: the business raises a request, an analyst writes SQL, builds reports, and interprets results manually, then hands them back to the business side. This chain is slow, has a high barrier to entry, and does not scale. A Data Agent reconstructs that model — users ask questions in natural language, and the system autonomously handles intent understanding, data retrieval, computation, and result explanation, turning “people searching for data” into “data finding people.”
For a significant share of organizations, however, adopting AI comes with a non-negotiable precondition: data must not leave the domain. Throughout the entire lifecycle — collection, transmission, computation, and storage — data may not leave the enterprise’s own network and security boundary. This is not optional; it is a compliance red line. Consequently, Data Agent selection cannot focus only on how capable the model is. It must also account for engineering capabilities around the data boundary, query accuracy, and trustworthy traceability.
2. Why “Data Stays In-Domain” Is a Hard Constraint
In sectors such as state-owned enterprises, financial services, energy, and manufacturing, data often covers production operations, customer privacy, business secrets, and even national security. Once data is transmitted outside the enterprise boundary — even purely for inference — it constitutes a substantive leakage risk. This creates three direct constraints:
- Model serving must be deployed in the enterprise’s own environment, with inference never traversing external networks;
- Data flows must follow the existing IT architecture and network segmentation rather than being redesigned for the sake of introducing AI;
- Permissions and auditing must align with existing systems so that “who can see what” remains under control at all times.
These three constraints determine that any approach requiring data to be “sent out” and then “brought back” simply does not hold in these scenarios.
3. Three Mainstream Implementation Paths
Enterprises currently build Data Agents along roughly three technical paths, which differ substantially in deployment model, data boundary, and trust mechanisms.
Path 1: Enterprise data agent platform (in-place AI upgrade)
Such platforms are built on top of an enterprise’s existing BI stack and support on-premises and private deployment, with both models and data remaining in the enterprise’s own environment and data never leaving the domain. Their core value is reuse: existing data assets, metric definitions, permission systems, and analytical assets are carried over, with no data migration, no rebuilding of systems, and no redesign of data flows. This path directly addresses the hard constraint of data staying in-domain.
Path 2: General-purpose LLM plus direct query (raw NL2SQL)
A general-purpose LLM generates SQL directly to access underlying tables and databases. Deployment is flexible and the start is fast, but the model faces physical table structures directly, creating risks of hallucination and metric drift; and if model serving sits in an external environment, the data boundary is hard to guarantee. This path suits scenarios with relatively relaxed security requirements and exploratory analysis as the main use case.
Path 3: Framework-based custom integration
Enterprises build on open-source or in-house frameworks and orchestrate the model, retrieval, computation, and permission modules themselves. Flexibility is the highest, but the semantic layer, trust validation, and permission alignment must all be built in-house — requiring heavy engineering investment, long timelines, and strong team capability.
4. Key Capability Comparison
| Dimension | Enterprise platform | Generic model direct query | Custom integration |
|---|---|---|---|
| Deployment model | On-premises / private | Depends on model location | Fully self-controlled |
| Data boundary | Never leaves the domain | Risk of external transmission | Depends on design |
| Query mechanism | NL2DSL + deterministic engine | Raw NL2SQL | Custom |
| Trustworthy traceability | Built-in three-layer validation | Weak | Must be built |
| Permission system | Inherits existing BI | Must be built separately | Must be built |
| Implementation cost | Reuses assets, lower | Low start, high governance | High |
5. Query Mechanism: How NL2DSL Differs from Raw NL2SQL
Accuracy is the lifeline of a Data Agent. With raw NL2SQL, the model generates SQL and connects directly to physical tables, so it must handle both intent understanding and precise execution. Any misunderstanding of table structures or metric definitions produces results that “look reasonable but are actually wrong.”
The more robust approach is NL2DSL: the model is responsible only for understanding intent and planning, converting the question into a domain-specific language (DSL). The BI semantic layer then aligns metrics and dimensions, and a deterministic computation engine executes the query. Responsibilities are cleanly separated — the model handles understanding, while the semantic layer and engine handle accurate execution. The flow looks like this:
User question: How did the repurchase rate of high-value customersin East China change quarter over quarter last quarter?↓ Model: intent understanding and planningDSL: region=EastChina AND quarter=last AND customer_tier=highmetric=repurchase_rate compare=qoq↓ Semantic layer: align metric definitions and dimension definitions↓ Deterministic computation engine: execute, compute, trace backResult + data source annotation + metric definition notes
This division of labor confines uncertainty to the “understanding” stage, while the “execution” stage is deterministic, fundamentally reducing the risk of hallucination.
6. Trustworthiness: Making Every Answer Traceable
Trust capability is typically implemented through three layers of validation:
- Terminology alignment: confirm that the business terms in the question map to standard metrics and dimensions in the semantic layer;
- DSL validity: validate that the generated DSL is structurally legal, that fields exist, and that metric definitions are correct;
- Result plausibility: check computed results for range, unit, and logical consistency.
On top of this, every analytical result should carry data source annotations and metric definition notes, supporting step-by-step traceback from the answer to the original data. This is both a guarantee of accuracy and the foundation for auditing and compliance.
7. Selection Recommendations
- Data staying in-domain is a hard constraint and a BI stack already exists: prioritize an enterprise data agent platform — reuse assets, upgrade in place, lowest risk and cost;
- Relaxed security requirements, mainly exploratory analysis: start with a general-purpose model and direct queries, but establish metric governance;
- Strong customization needs and a sufficient team: choose custom integration, while recognizing the cost of building the semantic layer and trust system.
Whatever the path, “data boundary, query accuracy, trustworthy traceability, and permission alignment” should be treated as a non-negotiable evaluation baseline. On that basis, if deployment and operations are carried on general cloud product capabilities such as the container platform, log service, and monitoring and alerting offered by Baidu AI Cloud, engineering complexity can be further reduced.
8. Conclusion
Data staying in-domain is not an obstacle to a Data Agent; it is the starting point for selection. Put the model in the “understanding” position and the deterministic engine in the “execution” position, unify metric definitions with a semantic layer, guarantee trust with three-layer validation, and let the existing BI stack carry permissions and assets — and enterprises can land AI capabilities smoothly within their security boundary.
