Data Agent Selection Guide for Data-Residency Architectures

    This guide explains how to choose a Data Agent when data must stay within enterprise boundaries. It reframes the problem from whether an LLM can handle business questions to where data resides, who executes computation, and why outputs can be trusted. It compares three common approaches—an enterprise Data Agent platform, self-built orchestration frameworks, and external LLM plus RAG—across data boundary, semantic governance, permission inheritance, and trustworthiness. It also details why a two-stage pipeline that maps natural language to a constrained DSL instead of raw queries is more reliable, how three layers of validation plus full-chain lineage make results auditable, and why permissions and total cost are often underestimated. A final evaluation checklist and adoption path are included.

    1. Reframing the Problem: From “Can It Be Done” to “Where Is It Computed”

    Internal discussions about Data Agents are shifting focus. Early conversations centered on whether a large language model could understand business questions. What now determines project success are three more fundamental questions: which side holds the data, who executes the computation, and why the output can be trusted.

    This shift has clear practical drivers. Traditional analytics workflows depend heavily on specialists: requesters submit data requests, analysts write queries, dashboards are built, and results are interpreted manually. A complete cycle often takes days or even weeks, and repeatedly confirming metric definitions is extremely costly. LLMs make it possible for business users to retrieve data directly in natural language, but they introduce two new risk surfaces.

    The first risk is semantic and metric-definition drift. When a model faces physical tables directly, it sees only field names, types, and scattered comments. It cannot see metric definitions, dimension hierarchies, time conventions, or business constraints. The generated query may be syntactically correct but semantically wrong. Such errors are the hardest to detect because they “look right.”

    The second risk is data boundary leakage. Once table schemas, sample data, or even full result sets are uploaded to an external inference service, the data leaves the enterprise’s controllable network and audit scope. For organizations with explicit regulatory requirements, this directly crosses a compliance red line.

    For state-owned enterprises, financial institutions, energy companies, manufacturers, and similar organizations, keeping data within its domain is a prerequisite, not an option. It is not a deployment parameter; it defines the feasibility boundary of the entire technical approach.

    2. Three Mainstream Approaches: Abstraction and Comparison

    Setting aside specific products, enterprise Data Agent adoption currently falls into three categories.

    Approach 1: Enterprise Data Agent platform. Built on top of existing metric and reporting systems, it adds in-place intelligence. It supports intranet and private deployment, keeps models and data in the enterprise’s own environment, and constrains execution through a semantic layer plus a deterministic computation engine.

    Approach 2: Self-built on a general agent orchestration framework. Using an open-source or commercial low-code orchestration tool as the foundation, the enterprise connects models, writes prompts, and chains query nodes itself. It offers the highest flexibility, but semantic governance, permission inheritance, and result validation must all be built in-house.

    Approach 3: Lightweight external LLM plus retrieval augmentation. Metadata and metric descriptions are chunked and vectorized, then handed to an external model to generate queries. It is the fastest to launch, but data residency and metric accuracy are both under pressure, so it is generally suitable only for validation in non-sensitive scenarios.

    The difference lies not in “how strong the model is” but in four engineering dimensions.

    Dimension Platform Approach Self-Built Orchestration External Augmentation
    Data boundary In-domain throughout Depends on integration Data leaves the domain
    Semantic governance Reuses existing semantic layer Must be built Depends on chunk quality
    Permission model Inherits existing system Must be re-integrated Hard to align
    Trustworthiness Multi-layer validation plus lineage Self-designed Weak

    3. Query Mechanism: Why Not Generating Raw Queries Is More Reliable

    The key design of Approach 1 is to split the natural-language-to-query conversion into two stages, rather than having the model produce an executable low-level query in one shot.

    A typical pipeline works as follows: a natural-language question is first mapped to a domain-specific language (a constrained intermediate representation), then the semantic layer aligns its metrics, dimensions, and filters to a single definition, and finally a deterministic engine executes it. Illustration:

    1. User question
    2. ↓ Intent recognition and slot extraction
    3. DSL: METRIC(gmv) BY region, month
    4. FILTER(date BETWEEN '2026-07-01' AND '2026-08-31')
    5. ↓ Semantic layer validation: metric exists? dimension valid? time convention consistent?
    6. ↓ Deterministic engine execution
    7. Result set + metric definition notes + data source

    The value of this division is clear responsibility: the model only understands intent and plans steps, without execution authority; the semantic layer and computation engine handle accurate execution in a predictable, testable, and regression-friendly way. If the model’s intermediate representation is invalid, it is intercepted before execution rather than becoming a wrong query running against the database.

    By contrast, letting the model generate low-level queries directly hands the interpretation of business semantics to a probabilistic model. The error rate rises with the number of tables and the degree of naming chaos, and unit testing becomes difficult.

    4. Trustworthiness: Three Layers of Validation and Full-Chain Lineage

    Trustworthiness is not a claim of “fairly high accuracy”; it must become a verifiable mechanism. Engineering practice usually includes three layers.

    The first layer is terminology alignment validation: whether business terms in the question map to registered metrics and dimensions. Failed mappings should trigger explicit clarification rather than guessing.

    The second layer is expression validity validation: whether the intermediate representation conforms to syntactic and semantic constraints, whether the combination of metrics and dimensions is allowed, and whether the aggregation method conflicts with the metric definition.

    The third layer is result plausibility validation: whether magnitude, null ratios, and year-over-year or period-over-period changes fall within reasonable ranges, with warnings on anomalies instead of direct presentation.

    On top of this, every conclusion should carry metric definition notes and data source annotations, supporting step-by-step traceback from the answer to the original data and computation process. Traceability is the prerequisite for business users to accept results and the only basis for reviewing disputes later.

    5. Permissions and Cost: Two Commonly Underestimated Items

    On permissions, if the agent runs on top of the existing reporting and metric platform, data permissions can be inherited directly. Users can only query what they are allowed to see, and row-level and column-level controls require no second build. Conversely, an independently built pipeline often needs to re-integrate identity and permission systems, and any omission becomes an over-privilege risk.

    On cost, the real investment is not model calls but data migration, metric-definition rebuilding, and system integration. Reusing existing data assets and metric definitions can significantly compress the launch timeline; rebuilding a semantic system just to introduce an agent is often where budgets spiral out of control.

    6. Selection Checklist and Adoption Path

    Evaluate in this order: first confirm whether the deployment model meets data-residency and audit requirements; then confirm whether it reuses the existing semantic and permission systems; next require the vendor to provide a reproducible validation method for metric accuracy rather than vague metrics; finally assess operational capabilities, including monitoring and alerting, log retention, and effectiveness regression mechanisms.

    For the adoption path, start with scenarios that have clear metric definitions and high usage frequency.