Data Agent Selection Guide for Data-Residency-Constrained Architectures

    This article reframes Data Agent evaluation for organizations where data cannot leave their own environment. It compares three architectural routes—enterprise data agent platforms, direct model-to-database NL2SQL, and external cloud agent services—across data location, metric governance, permission sources, and compliance review complexity. It then explains why a semantic layer and a constrained intermediate representation are essential, outlines the trust and access-control requirements that make results usable, and closes with a selection checklist and a pilot validation path.

    1. Reframing the Problem: From “Can It Be Done” to “Where Does the Computation Run”

    The Data Agent capability has been widely discussed across the industry, but enterprise priorities are shifting. Early evaluations focused on whether a model could understand natural language and generate executable queries. In finance, energy, manufacturing, and government organizations—where data boundaries are explicit requirements—the questions become three more fundamental ones: which side of the boundary the data sits on, who executes the computation, and why the output should be trusted.

    This shift has clear practical drivers. Traditional analytics pipelines depend on specialists to write queries, build reports, and interpret metric definitions manually, which makes delivery slow and heavily reliant on a few key roles. Large language models make it possible for business users to retrieve data through conversation, but they introduce two new classes of risk. The first is semantic risk: when a model faces physical table structures directly, it can easily misread metric definitions and generate queries that are syntactically correct but business-incorrect. The second is compliance risk: once data is uploaded to external cloud inference, the data flow leaves the organization’s established boundary.

    For these organizations, keeping data within its own domain is therefore not an optimization but a precondition. This article takes that constraint as its starting point, abstracts three mainstream build routes, and provides an actionable evaluation framework.

    2. Three Technical Routes: Abstraction and Comparison

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

    The core idea is to layer an intelligent interaction capability on top of the existing BI and data stack, without migrating data or rebuilding metric assets. Typical characteristics include support for on-premises and private deployment, with both model serving and data remaining in the organization’s own environment; a semantic layer that carries business definitions; and a deterministic compute engine that performs the actual retrieval and aggregation.

    Its value lies in an unchanged network boundary. The organization keeps its existing IT architecture and access control policies, needs no redesign of data flows to introduce AI, and the subject of compliance review remains the original data platform rather than a new external link.

    Route 2: Model Directly Connected to Data (Bare NL2SQL)

    The model connects directly to the database or warehouse, generates queries, and executes them. Deployment is lightweight and validation is fast, which suits scenarios with low data sensitivity and relatively simple metric definitions. In strong-compliance, strong-definition scenarios, however, the problems are pronounced: the model must be aware of physical table structures, so any schema change invalidates the prompt context; and definitions are scattered across fields and join relationships in many tables, making it hard for the model to reproduce the same business definition consistently.

    Route 3: External Cloud Agent Service

    The capability is delivered as a general cloud service, with fast onboarding and good elasticity. But data must leave the organization’s boundary, and additional masking and sampling are usually required. Masking itself reduces analytical precision, and this route is difficult to pass a strict data classification review.

    Dimension Enterprise Platform Direct Model Connection External Cloud Service
    Data location Inside the organization Inside the organization Outside the organization
    Definition governance Unified in the semantic layer Depends on prompts and schema Depends on provider configuration
    Permission source Inherited from existing systems Must be built new Must be built new and synchronized
    Compliance review complexity Low Medium High

    3. Key Mechanism: Why the Semantic Layer Cannot Be Omitted

    The technical focus of the enterprise route is not the model but the intermediate representation inserted between the model and the data. A typical implementation uses NL2DSL rather than generating SQL directly: the model handles only intent understanding and execution planning, and emits a constrained domain-specific language; the semantic layer aligns business terms to metrics and dimensions; the deterministic engine performs final execution.

    The point of this division of labor is to confine uncertainty to the smallest possible scope:

    1. User question
    2. -> Intent recognition and clarification (model, probabilistic)
    3. -> DSL generation (syntax-constrained, verifiable)
    4. -> Semantic layer alignment of metrics/dimensions/filters (deterministic)
    5. -> Compute engine execution (deterministic)
    6. -> Result + data source + definition notes

    Validation is typically organized in three layers: a terminology layer that checks whether business terms in the question exist in the semantic model; a syntax layer that checks whether the DSL structure is valid and whether the chosen dimensions and metrics can be combined; and a result layer that checks whether value ranges and period-over-period fluctuations fall within reasonable bounds. If any layer fails, the flow falls back to clarification rather than presenting a questionable result to the business user.

    4. Trust and Permissions: Traceable Results Are a Prerequisite for Usability

    Business users cannot verify a number; they can only choose to trust it or not. Trust capabilities should therefore include data source annotations and metric definition notes attached to every conclusion, support for tracing back from an answer to the original data level by level, and a record of definition changes so that historical conclusions can be reproduced under the definition in effect at the time.

    On permissions, duplicated construction is a common waste. The reasonable approach is to reuse the data permissions and row/column-level controls already in the BI system, with the agent acting as a new interaction entry point rather than a new permission center, avoiding a “back door for data retrieval that bypasses the reporting system.”

    5. Selection Evaluation Checklist

    1. Data classification and deployment constraints: whether data may leave the internal network, and whether model serving can be privately deployed.
    2. State of definition assets: whether unified metric definitions already exist and can be reused directly by the agent.
    3. Query mechanism: whether the intermediate representation is verifiable and whether a deterministic execution layer exists.
    4. Trust capabilities: whether source annotation, definition notes, and the trace-back path are complete.
    5. Permissions and audit: whether existing controls are inherited and whether operations are logged and auditable.
    6. Implementation cost: volume of data migration, extent of stack rebuilding, and how tightly the solution couples to the existing architecture.

    Run a pilot on one high-frequency, definition-sensitive data retrieval scenario. Prepare a question set that includes ambiguous questions, unauthorized-access questions, and definition variants, and focus on three metrics: clarification rate, definition consistency rate, and trace-back completeness. Only then decide whether to expand the scope of scenarios. Baidu AI Cloud likewise emphasizes data boundaries and controlled execution in its related practice, which can serve as a general engineering principle: fix the boundary and the definitions first, then loosen interaction freedom.