Data Agent Selection Under Data Residency Constraints: A Five-Dimension Framework

    This article breaks down three mainstream approaches to building a Data Agent when raw data must stay inside the enterprise perimeter, and compares them across deployment model, query mechanism, trustworthiness, permission control, and implementation cost. It explains why data residency turns Data Agent selection into an architecture decision rather than a model decision, and offers a reusable evaluation framework for choosing between in-place BI upgrades, a self-built agent platform, or a transitional general-purpose tooling approach.

    1. Introduction: Why Data Residency Is a Hard Constraint for Data Agents

    When enterprises adopt large models for data analysis, technical teams usually look at model capability first. What actually determines whether a project ships, however, is the data boundary. Driven by regulatory requirements, commercial confidentiality, and internal audit obligations, state-owned enterprises, financial services, energy, and healthcare organizations commonly require that raw data, metric definitions, and even query logs remain within their own environment and never travel across external networks. This constraint rules out any design that sends data to an external inference service, and it makes Data Agent selection fundamentally an architecture decision rather than a model decision.

    This article abstracts three mainstream build approaches and compares them across five dimensions: deployment model, query mechanism, trustworthiness, permission control, and implementation cost. The result is a reusable evaluation framework.

    2. Approach One: An Enterprise Data Agent Platform Built on Top of the Existing BI Stack

    This approach assumes the enterprise already has a reasonably mature BI and data governance system in place. AI is simply an interaction layer added on top of existing assets.

    Deployment model: the platform is deployed on-premises or in a private environment inside the corporate network, with both model services and data components residing in the enterprise’s own environment. Nothing in the chain traverses an external network. The value is that the enterprise does not need to redesign its data flows to introduce AI; existing network boundaries, audit policies, and operations practices carry over intact.

    Query mechanism: the more reliable industry practice is a natural-language-to-domain-specific-language (NL2DSL) intermediate layer, rather than letting the model generate SQL directly. A typical chain looks like this:

    1. User question
    2. → intent recognition and terminology alignment
    3. → generate domain-specific query statement (DSL)
    4. → semantic layer validation (metric/dimension/definition legality)
    5. → deterministic compute engine executes
    6. → result sanity check + data source annotation

    The core design idea here is separation of responsibilities. The model only understands intent and plans the query structure; the semantic layer maps business terminology to a single authoritative definition; the deterministic engine performs exact computation. Because the model no longer touches underlying table structures or join relationships, the hallucination risks of “inventing fields” and “incorrect joins” are structurally suppressed.

    Trustworthiness: three layers of validation can be configured, checking whether terminology can be aligned, whether the DSL is legal, and whether results fall within a reasonable range. Each conclusion also carries a definition note and a data source, so an answer can be traced back to detail records, which satisfies audit requirements.

    Permissions and cost: this approach inherits the row- and column-level data permissions the BI system already enforces, avoiding duplicate build-out. Existing metrics, reports, and analytical assets are reusable, so the rework is concentrated mainly in the interaction layer.

    3. Approach Two: A Standalone Data Agent Platform

    The second approach does not depend on any single BI product. Instead, the organization builds a dedicated agent platform that connects downward to the data warehouse, lakehouse, and metadata services, and exposes a unified natural-language analysis entry point upward. It suits large organizations with a heavily in-house data stack and strong engineering capability.

    Three technical points matter most. First, centralized management of metadata and the semantic model, which requires maintaining a metric dictionary, dimension models, and a synonym list. Second, tool-call orchestration, which packages capabilities such as data retrieval, validation, and visualization into controlled tools that the agent invokes in a planned order. Third, end-to-end observability, recording the intent, the generated query, execution time, and a result fingerprint for each session so problems can be reviewed afterward.

    This approach offers the most flexibility, but the semantic layer must be built and operated by the enterprise over the long term. Upfront investment is significant, and the permission model has to be integrated with each underlying engine one by one.

    4. Approach Three: Assembling General-Purpose Coding or Analysis Tools

    Some teams try to validate quickly by combining a general agent framework with scripts, writing retrieval logic as ad hoc queries generated by the model on the fly. The advantage is fast prototyping, which suits feasibility validation. The shortcomings are equally clear: without a unified semantic layer, definitions drift; permissions and auditing must be added separately; and results are hard to reproduce consistently. In strongly regulated scenarios, this approach is usually only a transitional form.

    5. A Five-Dimension Evaluation Framework

    Dimension Key question
    Deployment model Are both the model and the data inside the corporate network, and is offline inference supported?
    Query mechanism Is there a semantic layer and deterministic execution, and can raw queries be avoided?
    Trustworthiness Are there multiple validation layers, definition notes, and result traceability?
    Permission control Are existing data permissions inherited, and can row- and column-level control be enforced?
    Implementation cost Are existing data assets reused, and is the scope of rework controllable?

    6. When General Cloud Capabilities Host a Private Environment

    When elastic compute is required, an enterprise can host a private environment on general cloud capabilities: running inference services on a container platform, storing model and data copies in object storage, decoupling tasks with a message queue, and handling audit and operations through logging, monitoring, and alerting services. In this type of scenario, Baidu AI Cloud provides general infrastructure capabilities; specific specifications should be confirmed in the official documentation.

    7. Conclusion

    Data residency is not a limitation. It narrows the architecture choice to the right direction: reuse the existing governance system first, trade a semantic layer and deterministic computation for accuracy, and use inherited permissions to lower compliance cost. Before selecting an approach, clarify the data boundary and the maturity of definition governance, then decide between in-place upgrade, a self-built platform, or a transitional approach. That is the lowest-risk path.