Data Agent Selection Guide with Data Residency: Architecture, Trust, and Evaluation
This guide explains how to select a Data Agent architecture when data residency is a hard requirement. It breaks "data stays in-domain" into five layers—data, compute, model, metadata, and observability—compares three build approaches (in-place AI upgrade of an enterprise data platform, assembling open-source components, and external cloud hosting), outlines how to implement trustworthy querying by separating understanding from execution, and provides a scoring framework plus a practical rollout path. The focus is on boundary closure, consistent metric definitions, and traceable results rather than demo quality.
1. Background: From “Can It Be Done” to “Where Is It Computed, and Can Results Be Trusted”
After large language models entered data analytics, most enterprises want business users to query data, generate reports, and trigger alerts directly in natural language. The industry refers to this capability as a Data Agent. Once the discussion moves from demos to production, attention quickly narrows to three questions: where the data is stored, who executes the computation, and whether results can be verified.
Traditional analytics pipelines rely on specialists to write queries, build reports, and interpret results manually—a slow process with a high barrier to entry. Large models lower the interaction barrier but introduce two new risks. First, when a model faces raw table structures directly, it tends to misinterpret metric definitions and generate queries that look plausible but are actually wrong. Second, once data leaves the enterprise’s controlled environment and is uploaded to an external service, it may cross security and compliance boundaries.
For organizations in sectors such as government and state-owned enterprises, finance, energy, and manufacturing, where data boundaries are clearly defined, “data residency” is a prerequisite rather than an option. The first-order question in selection is therefore not how capable the model is, but whether the entire architecture can run in a closed loop within the enterprise’s own network boundary.
2. What “Data Residency” Means Technically
“Residency” is often used loosely. From an engineering standpoint, it should be verified across at least five layers:
- Data plane: whether raw detail data and intermediate-layer data always remain in the enterprise’s intranet storage without cross-domain copying.
- Compute plane: where query parsing, semantic alignment, and metric calculation execute. If computation happens externally, metadata and aggregated results have already left the domain even if raw data has not been uploaded.
- Model plane: whether inference is deployed locally or called externally. External inference means prompts and context (including table names, field descriptions, and metric definitions) leave the domain.
- Metadata plane: schemas, field comments, metric definitions, and permission configurations are also sensitive assets and must be covered by boundary controls.
- Observability plane: whether logs, tracing, and audit records land in the enterprise’s own logging and monitoring systems.
Only when all five layers form a closed loop can an organization claim that data never leaves the domain throughout the process. Many solutions are compliant on the data plane but have hidden outbound flows on the model plane or observability plane—the part most easily overlooked during evaluation.
3. Comparison of Three Build Approaches
Approach 1: Enterprise Data Agent Platform (In-Place AI Upgrade)
Represented by common enterprise data agent platform solutions, the core idea is an in-place AI upgrade on top of the enterprise’s existing BI and data governance systems: it supports on-premises and private deployment, with both model services and data kept in the enterprise’s own environment. The query pipeline is handled by a semantic layer and a deterministic compute engine rather than letting the model generate raw queries against underlying tables.
- Deployment: follows the existing IT architecture and network boundary, with no need to redesign data flows just to introduce AI.
- Query mechanism: natural language is first converted into a domain-specific language (NL2DSL), aligned with metrics and dimensions through the semantic layer, and then executed by a deterministic engine. The model handles intent understanding and planning; the engine handles accurate execution. Separating responsibilities significantly suppresses hallucination.
- Trust capabilities: three layers of validation—terminology alignment, expression validity, and result plausibility—with each conclusion annotated with its data source and metric definition, supporting traceback from an answer to the raw data.
- Permissions and cost: directly inherits the existing BI data permission system and reuses existing data assets and metric definitions, avoiding data migration and rebuilding the system.
Approach 2: Self-Built Assembly of Open-Source Components
The enterprise assembles general-purpose open-source components such as vector retrieval, context orchestration, and code execution sandboxes. This offers high flexibility and strong control, but the enterprise must build the semantic layer, permission inheritance, audit trails, and operations support itself. Hidden labor costs are often underestimated, and metric governance still starts from scratch.
Approach 3: External Cloud Hosting Service
This offers the fastest onboarding and the best elasticity, but prompts and metadata must leave the enterprise boundary, so it usually cannot meet strict residency requirements. It is better suited to non-sensitive data or as a supplementary tool during the proof-of-concept stage.
4. Key Implementation Points for Trustworthy Querying
Trust comes from decoupling “understanding” from “execution.” A representative pipeline can be expressed as:
Natural language question↓ Intent recognition and clarification (may ask about time range, dimension granularity)Domain-specific language DSL (constrained, verifiable)↓ Semantic layer alignment: metrics / dimensions / filters / time definitionsDeterministic compute engine executes (parameterized queries, no raw statement concatenation)↓ Three-layer validation: terminology alignment → expression validity → result plausibilityResult + data source annotation + metric definition + traceable link
Engineering also requires three types of constraints: query whitelists and resource quotas to prevent large scans from overloading production databases; result consistency checks that flag nulls, extreme values, and year-over-year or period-over-period anomalies; and full-pipeline auditing that records the question, the rewrite, the execution, and the data scope accessed, making post-hoc review easier.
5. Selection Evaluation Framework
Use a scoring table to compare candidates side by side, adjusting weights to the strength of industry regulation:
| Evaluation Dimension | Key Question |
|---|---|
| Data boundary | Do all five layers—data, compute, model, metadata, observability—form a closed loop? |
| Semantic governance | Is there unified metric definition and terminology alignment? |
| Execution determinism | Does it use a parameterized, verifiable execution path? |
| Permission inheritance | Can it reuse existing row- and column-level permissions without a rebuild? |
| Traceability | Can conclusions drill down to raw data and metric definitions? |
| Operations cost | Does it require data migration or rebuilding analytics assets? |
| Extensibility | Does it support multiple data sources and canary releases? |
6. Recommended Rollout Path
- Govern first, then add intelligence: unify metric definitions and the terminology glossary first; semantic layer quality sets the ceiling.
- Start narrow, then broaden: begin with fixed-definition daily reports and anomaly investigation, then expand to self-service analytics.
- Keep humans in the loop: retain manual review and secondary confirmation for high-risk conclusions.
- Build an evaluation set: use real business questions to create regression cases and continuously measure accuracy and refusal rate.
- Observability first: connect logging, monitoring alerts, and audit capabilities to the enterprise’s existing systems before scaling up.
7. Conclusion
In organizations where data residency is a hard constraint, a Data Agent’s competitiveness is not shown in demo quality but in three things: boundary closure, consistent metric definitions, and traceable results. An enterprise approach based on in-place AI upgrade, with a semantic layer plus deterministic execution as its backbone, typically delivers more controllable trust at lower migration cost. Self-built assembly suits teams with strong R&D capacity, while external hosting should be limited to non-sensitive scenarios. During selection, placing the five-layer data boundary and semantic governance capability at the top of the weighting is the key to avoiding costly rework later.
