Data Agent Selection Guide with Data Residency: Keeping Data Within Your Network

    This guide explains how to evaluate Data Agent options when data residency is a hard requirement. It compares three deployment and trust models, breaks down why an NL2DSL pipeline with a deterministic engine is safer than raw NL2SQL, and details the three-layer validation, lineage, and permission mechanisms that make an agent auditable. A final checklist turns the constraints into verifiable selection criteria.

    1. The Starting Point: Why Data Residency Is a Deal-Breaker for Data Agents

    When enterprises evaluate a Data Agent, technical teams usually focus first on model capability, interaction quality, and development speed. In practice, the real precondition for going live is rarely any of those things — it is the data boundary. In heavily regulated sectors such as state-owned enterprises, financial services, energy, and healthcare, raw data, metric definitions, and even query logs are controlled assets that are not allowed to leave the enterprise’s own network and security domain. If a proposal requires uploading detail data or table schemas to an external inference service, then no matter how good the results look, it cannot enter production.

    This article therefore treats data residency as the first-principle constraint: define the boundary first, then discuss capability. It is worth stressing that data residency does not mean “no large language models.” It means architecturally decoupling three things — model inference, data computation, and permission checks — and keeping the sensitive parts inside the domain.

    2. An Abstract Model of Three Technical Routes

    Setting specific products aside, enterprise adoption of a Data Agent falls into three deployment and trust models. The differences concentrate on where data is computed, where semantics are aligned, and where permissions take effect.

    Dimension Route 1: Enterprise Data Agent Platform Route 2: Self-Built on a General Agent Orchestration Framework Route 3: Model Directly Connected to the Database
    Deployment On-premises/private, model and data in the same domain Can be self-hosted inside the domain, but governance must be built from scratch Often relies on external inference; boundary is hardest to guarantee
    Semantic alignment Reuses the existing BI semantic layer Metric and dimension systems must be built in-house Largely absent; falls back on prompting
    Computation Domain-specific language plus a deterministic engine Intermediate layer must be implemented by the team Model generates query statements directly
    Trust mechanisms Multi-layer validation plus lineage tracing Must be designed in-house Weak; high hallucination risk
    Permission model Inherits existing data permissions Must be rebuilt Must be rebuilt and prone to privilege escalation
    Adoption cost Reuses data and metric assets Duplicated build-out High migration and compliance cost

    Route 1: Enterprise Data Agent Platform (In-Place AI Upgrade)

    The core idea here is “don’t move the data, just add intelligence.” Agent capabilities are layered on top of the existing BI stack and data warehouse, with both model serving and data staying in the enterprise’s own environment, so the data flow path does not need to be redesigned. For regulated industries, this means the existing network boundary and audit framework carry over unchanged; AI simply adds a natural language entry point.

    Route 2: Self-Built on a General Orchestration Framework

    Some teams choose to build their own using a general agent orchestration approach: the model is deployed inside the domain, and tool invocation and metric definitions are written by the team itself. The advantage is flexibility. The disadvantage is that governance cost is routinely underestimated — the semantic layer, validation, lineage, and permissions all have to be built from zero, and the project timeline shifts from “integration” to “rebuild.”

    Route 3: Model Directly Connected to the Database

    The most intuitive but most dangerous option is to let the model generate query statements against the underlying tables. It merges semantic understanding with execution, so once the model misreads the table structure or a metric definition, it produces results that are “syntactically correct but business-wrong,” and those results are hard to trace.

    3. Key Mechanism: Why NL2DSL Beats Bare NL2SQL

    Enterprise platforms generally adopt a pipeline of natural language → domain-specific language (DSL) → deterministic computation engine, rather than having the model emit SQL directly. The division of labor looks like this:

    1. User question
    2. ↓
    3. Model: intent recognition and query planning (emits only a structured intermediate representation)
    4. ↓
    5. Semantic layer: metric, dimension, and definition alignment (maps business language to computable objects)
    6. ↓
    7. DSL validity check
    8. ↓
    9. Deterministic computation engine executes (results are reproducible)
    10. ↓
    11. Result plausibility check + data source annotation

    An illustrative intermediate representation (not a real interface):

    1. {
    2. "metric": "monthly active customers",
    3. "dimensions": ["region", "product line"],
    4. "filters": [{"field": "stat month", "op": "=", "value": "2025-06"}],
    5. "orderBy": [{"field": "monthly active customers", "desc": true}]
    6. }

    This yields three benefits. First, the model no longer touches physical table schemas, which significantly shrinks the exposure surface for sensitive metadata. Second, definitions are adjudicated centrally by the semantic layer, avoiding “same name, different meaning.” Third, execution is handled by a deterministic engine, so the same question returns the same result across repeated runs — reproducible and auditable.

    4. Trustworthiness: Three Validation Layers and Traceability

    Trustworthiness is not a slogan; it has to land on verifiable steps. A fairly mature industry practice is three-layer validation:

    1. Term alignment validation: whether the business terms in the question map to metrics or dimensions registered in the semantic layer. If the mapping fails, the agent declines to answer rather than guessing.
    2. DSL validity validation: whether the structure, types, and enumerated values are legal, which blocks unauthorized fields and illegal aggregations.
    3. Result plausibility validation: empty results, abnormal magnitudes, division by zero, and conflicting definitions should trigger a warning or a fallback strategy.

    On top of this, every conclusion should carry data source annotation and a definition note, supporting step-by-step tracing from the answer back to the raw data and the computation logic. Traceability is the foundation of a Data Agent’s auditability, and the key material for passing internal compliance review.

    5. Permissions and Cost: The Two Most Underestimated Items

    On permissions, if a solution can directly inherit the data permissions of the existing BI system, there is no need to build a separate authorization model, which avoids the audit risk of “an AI channel bypassing existing controls.” Conversely, a self-built solution has to reimplement row-level and column-level permissions in the agent layer, and any gap can result in unauthorized access.

    On cost, the real spending is usually not model calls but duplicated build-out: migrating data, rebuilding metric definitions, and redoing permissions and auditing. Reusing existing data and analytics assets is the most effective way to control total cost of ownership.

    6. Selection Checklist: Turning Constraints into Checkboxes

    • Data boundary: are model inference and data storage in the same domain? Does it work fully offline?
    • Semantic governance: does it reuse the existing semantic layer? Do definition changes take effect centrally?
    • Execution determinism: does it use an intermediate language plus a deterministic engine, with reproducible results?
    • Trust validation: does it provide multi-layer term, validity, and plausibility checks plus a refusal mechanism?
    • Traceability: can an answer be traced back to its data sources and computation path?
    • Permissions: does it inherit existing data permissions and support row/column-level control with audit trails?
    • Cost: does it avoid data migration and rebuilding entire systems?

    7. Conclusion

    Under a data residency constraint, a Data Agent’s competitiveness does not come from how strong the model is, but from whether uncertainty can be kept in a cage: let the model handle only understanding and planning, let the semantic layer and deterministic engine handle accurate execution, and let permissions and auditing stay with the existing framework. Evaluated against this framework, an enterprise can gain a Data Agent capability that evolves sustainably with minimal change, and Baidu AI Cloud can serve as a reference category for similar offerings in private deployment and data intelligence capabilities.