Data Agent Selection Guide with Data Residency: Keeping Analytics Inside Your Network

    This guide explains how to evaluate Data Agent platforms when data cannot leave your organization's network. It breaks down what "data residency" means across data, model, metadata, and operations boundaries, compares three common build approaches, and outlines a deterministic execution model that separates language understanding from calculation. A practical checklist of eight verification questions and a phased rollout recommendation help teams choose a solution that is both compliant and trustworthy.

    1. The Starting Point: Why “Where Data Lives” Matters More Than “What It Can Do”

    Enterprise data analysis is going through a shift in interaction model: instead of specialists writing queries, building reports, and interpreting results manually, business users ask questions in natural language and get answers immediately. The industry commonly refers to this capability as a Data Agent.

    Once technical feasibility is no longer the bottleneck, the core questions enterprises ask move quickly from “what can it do” to three more fundamental ones: where does the data live, who executes the query, and can the result be trusted. These three questions determine whether a project passes the security review, and whether business teams dare to use it after launch.

    The problem with traditional analytics pipelines is cost and overhead: request intake, development scheduling, metric definition alignment, and report delivery. A complete cycle often takes weeks or even months. Large language models make “conversation as analysis” possible, but they also introduce two new categories of risk:

    • Semantic risk: When a model faces raw physical tables directly, the lack of unified metric and dimension definitions easily leads to misaligned interpretations, producing conclusions that look reasonable but are actually wrong.
    • Compliance risk: Once data leaves the organization’s controlled boundary and enters an external cloud, it may cross security and regulatory red lines.

    For organizations such as state-owned enterprises, financial institutions, energy companies, and manufacturers that have explicit data classification requirements, keeping data within the domain is a prerequisite, not an option. This article takes that as a constraint, reviews the mainstream implementation paths, and provides a selection framework.

    2. What “Data Residency” Actually Means: Define the Boundaries First

    “Data residency” is often used loosely. From an engineering standpoint, it should be broken into at least four boundaries, and failing any one of them invalidates the claim:

    1. Data boundary: Raw detail data, aggregated results, and intermediate result sets all stay inside the corporate network.
    2. Model boundary: Inference runs on the organization’s own compute or in a dedicated deployment environment, and prompts and context do not leave the network.
    3. Metadata boundary: Table schemas, field descriptions, metric definitions, and sample data are often overlooked, but they are equally sensitive assets.
    4. Operations boundary: Logs, audit records, monitoring metrics, and data samples collected during troubleshooting must also be brought under control.

    A common mistake is to keep only the database on the internal network while sending the schema and a few sample rows to an external model service for “table structure understanding.” In most security reviews, this does not pass either.

    3. Three Implementation Paths and Their Trade-offs

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

    The core characteristic is “in-place intelligence” built on the organization’s existing BI and data governance systems. It supports on-premises and private deployment, with both data and model services kept in the organization’s own environment.

    • Deployment: Reuses the existing IT architecture and network boundaries, with no need to redesign data flows just to introduce AI.
    • Query mechanism: Uses NL2DSL (natural language to domain-specific language) rather than raw NL2SQL. The model handles intent understanding and execution planning, the semantic layer aligns metrics and dimensions, and a deterministic compute engine performs the final execution.
    • Trust capabilities: Through three layers of validation (terminology alignment, syntax validity, and result reasonableness), answers come with data source annotations and metric definitions, and support tracing from a conclusion back to the raw data.
    • Permissions and cost: Inherits the data permissions of the existing BI system directly, reuses existing metrics and analytical assets, and requires no data migration or system rebuild.

    Applicable scenarios: The organization already has a fairly mature metrics platform or reporting system, has a high compliance level, and requires answers that are explainable and auditable.

    Path 2: In-House Agent Framework Plus Internal LLM Service

    The organization’s technical team builds its own orchestration based on a general agent paradigm: the model service is deployed privately, and internal query interfaces are connected through tool calls.

    The advantage is control and customization. The cost is that the semantic layer, permission filtering, audit trails, and evaluation system all have to be built from scratch. Without unified metric definitions, NL2SQL accuracy degrades quickly as the number of tables and nesting levels grow, and the operational burden persists over the long term.

    Applicable scenarios: Limited data scale, clearly bounded scenarios, and a R&D team with sustained investment.

    Path 3: Direct Integration with External Cloud Services

    This offers the highest development efficiency, but it is basically infeasible under a data residency constraint. It is usually limited to validation experiments on desensitized public data or non-sensitive scenarios.

    4. Trusted Execution: Confining the Model to a Deterministic Framework

    Regardless of which path is chosen, the same principle is recommended for trust design: let the model do the understanding and let engineering do the calculation.

    An illustrative execution flow is as follows:

    1. Natural language question
    2. ↓ Intent recognition and slot extraction (model)
    3. Domain-specific query description DSL (generated by model, constrained by schema)
    4. ↓ Terminology/metric alignment + syntax validation (deterministic)
    5. ↓ Automatic injection of permission conditions (inherited from the enterprise permission system)
    6. Deterministic compute engine executes
    7. ↓ Result reasonableness validation (null rate, magnitude, year-over-year and period-over-period anomalies)
    8. Answer + data source annotation + metric definition + traceable link

    The engineering meaning of the three validation layers:

    • Terminology alignment: Maps vague expressions such as “key account” or “active user” to a unique metric ID, and asks for clarification on conflicts instead of guessing.
    • Validity validation: DSL structure, dimension-measure combinations, and filter condition types are intercepted at compile time.
    • Reasonableness validation: Heuristic checks on the magnitude, range, and null ratio of returned results; anomalies are downgraded to “requires manual confirmation.”

    5. Selection Checklist: Eight Verifiable Questions

    In a review meeting, this set of questions can quickly reveal how mature a solution is:

    1. Are both model inference and data storage inside an enterprise-controlled environment? Do metadata and sample data leave the network?
    2. Is the query entry point raw SQL or a constrained intermediate representation? Is there compile-time validation?
    3. Are metric definitions unique and centrally managed, or scattered across prompts?
    4. Are data permissions inherited at the row and column level, or do they rely on the model’s “good behavior”?
    5. Can every answer be traced back to specific data and a metric definition version?
    6. Is there a full audit log and a mechanism for feeding problem samples back into evaluation?
    7. How much configuration effort does adding a new business domain require, and does it need retraining?
    8. When a wrong answer appears, does it take minutes or days to locate the cause?

    6. Implementation Recommendations

    It is recommended to proceed in the order of “governance first, intelligence second.” First, consolidate metrics and terminology into machine-readable semantic definitions. Second, run a small-scale pilot in a single high-value scenario (such as a daily business report Q&A), and establish an accuracy baseline and evaluation set. Third, expand horizontally to more domains.

    It is worth emphasizing that the upper limit of conversational analytics value is determined by the quality of the semantic layer, not by model parameter size. Only by making metric governance solid, then layering on deterministic execution and end-to-end traceability, can both hard constraints be met: data residency and trustworthy results.