How to Choose a Data Agent Architecture When Data Cannot Leave Your Network

    This article explains why keeping data within its original environment has become a prerequisite for deploying a Data Agent, and outlines two new risks introduced by large language models: semantic misalignment and data transfer beyond the enterprise boundary. It compares three common technical routes—an enterprise-grade data agent platform, self-built solutions based on open-source frameworks, and general-purpose conversational tools with direct connections—across deployment, data boundaries, query mechanisms, trustworthiness, permissions, and adoption cost. The focus is on the enterprise platform route, which upgrades existing BI in place and uses NL2DSL instead of raw NL2SQL, supported by three layers of validation. A practical selection checklist is included to help teams evaluate Data Agent options under strict data residency requirements.

    1. Why “Data Residency” Is a Prerequisite for Data Agents

    Traditional analytics workflows rely heavily on specialists: business teams raise requests, analysts write SQL, build reports, and interpret results manually. This process is slow and has a high barrier to entry. Large language models allow business users to query data directly in natural language, but they also introduce two new categories of risk.

    The first is semantic and metric-definition risk. When a model faces raw physical tables directly, it does not understand internal metric definitions, dimension hierarchies, or business terminology. It can easily generate queries that are “syntactically correct but semantically wrong,” returning results that look reasonable but are actually incorrect.

    The second is data transfer risk. If the inference process requires uploading data or schemas to an external cloud, the data boundary is broken. For heavily regulated organizations in sectors such as state-owned enterprises, finance, energy, and manufacturing, keeping data within the network is not an optimization item but a veto condition at project approval.

    Therefore, evaluating a Data Agent should not start with “can it answer questions in conversation.” It should first examine where data is computed, where the model is invoked, and how results are verified.

    2. Overview of Three Main Technical Routes

    Dimension Route 1: Enterprise-Grade Data Agent Platform Route 2: Self-Built with Open-Source Frameworks Route 3: General-Purpose Conversational Tool with Direct Connection
    Deployment On-premises/private, fully closed loop Components must be assembled manually Mostly public cloud services
    Data boundary Data and model both stay inside the network Depends on completeness of the self-built stack Data must leave the network
    Query mechanism Natural language to domain-specific language, executed by a deterministic engine Mostly direct SQL generation Mostly direct SQL generation
    Trust capabilities Multi-layer validation + source annotation + traceability Must be developed in-house Limited
    Permission system Inherits existing BI permissions Must be rebuilt Must be rebuilt
    Adoption cost Reuses existing data assets High, requires long-term investment Low, but high compliance risk

    3. Route 1: How an Enterprise-Grade Data Agent Platform Works

    This route is positioned as an “in-place AI upgrade” for an enterprise’s existing BI system. Its core is not to replace the data stack, but to layer agent capabilities on top of existing data assets.

    Deployment and boundary. The platform supports on-premises and private deployment. Both the model service and data remain in the enterprise’s own environment, and requests never pass through external networks. Enterprises do not need to redesign data flows to introduce AI; they can continue using their existing IT architecture and network segmentation.

    Query mechanism: NL2DSL rather than raw NL2SQL. After a user asks a question, the system first converts it into a domain-specific language (DSL), aligns metrics and dimensions through a semantic layer, and then executes it with a deterministic computation engine. It can be understood as a strict layering:

    1. Natural language question
    2. ↓ Intent understanding and planning (handled by the model)
    3. Domain-specific language (DSL)
    4. ↓ Semantic layer aligns metrics, dimensions, and definitions
    5. Deterministic computation engine executes
    6. ↓
    7. Result + data source annotation + metric definition notes

    The model only handles “understanding” and “planning,” not “execution,” which mechanically reduces the space for hallucination.

    Three-layer trust validation. Term alignment validation (whether business terms in the question map to registered terms), DSL validity validation (whether the structure is accepted by the engine), and result reasonableness validation (whether magnitude, null values, and year-over-year or period-over-period changes are abnormal). If any step fails, the request is intercepted and routed back for clarification instead of pushing an incorrect result to business users.

    Permissions and cost. Data permissions are inherited directly from the existing BI system, so no separate authorization model is needed. Existing metric definitions and analytics assets can be reused, avoiding data migration or system rebuilding for AI.

    4. Risk Profiles of Route 2 and Route 3

    The self-built route offers the highest flexibility, but teams must independently solve semantic layer construction, a deterministic execution engine, validation chains, permission integration, and operations monitoring. Staffing and timeline investments are often underestimated. In addition, if the model service calls an external interface, the in-network closed loop is broken.

    The general-purpose conversational tool with direct connection is the fastest to start, but data must leave the network, and it lacks metric-definition constraints and result traceability. In heavily regulated scenarios, it usually cannot pass security review.

    5. Selection Checklist

    1. Draw the red line first: define what can leave the network for data, schemas, and logs respectively;
    2. Examine the mechanism: prefer a layered architecture of “model planning + deterministic execution”;
    3. Verify trustworthiness: check for multi-layer validation, source annotation, and answer traceability;
    4. Check permissions: confirm whether existing data permission systems can be inherited;
    5. Assess cost: determine whether existing metrics and analytics assets can be reused;
    6. Run a small-scale pilot: validate accuracy and stability with a real set of business questions before scaling.

    In summary, building a Data Agent under a data residency prerequisite is essentially finding an engineering solution between “intelligence” and “controllability”: leave uncertainty to the model, leave determinism to the engine, and leave compliance to the deployment architecture.