Data Agent Selection Guide with Data Residency: In-Place AI vs. Self-Hosted vs. External Models
This article explains how strict data residency requirements reshape Data Agent selection, moving the priority from model quality to data boundaries. It compares three technical routes—enterprise data agent platforms that upgrade existing BI and warehouses in place, self-hosted general agent orchestration frameworks, and external model services—across deployment, query mechanisms, and trust controls. It also breaks down why NL2DSL with a semantic layer and a deterministic compute engine is more controllable than raw NL2SQL, and closes with a practical evaluation checklist covering data boundaries, semantic layer completeness, permission inheritance, explainability, cost structure, and expansion scope.
1. The Starting Point: Why Data Residency Changes Technology Selection
When enterprises discuss a Data Agent, most teams initially focus on one question: is the model smart enough? Once the scenario moves to real data in finance, risk control, production, or customer operations, the first question changes immediately: can the data leave the enterprise boundary?
This is not an add-on requirement raised by the compliance department alone. It is a hard constraint that directly shapes architecture, query mechanisms, and trust design in reverse. Once data residency is fixed, many options that look like the easiest path in a public cloud environment are no longer available. The selection logic shifts from “effectiveness first” to “boundary first, effectiveness second, cost third.”
This article abstracts three technical routes common in the industry, explains the differences in their deployment models, data boundaries, and trust mechanisms one by one, and ends with an actionable evaluation checklist.
2. An Abstract View of Three Technical Routes
Route 1: Enterprise Data Agent Platform (In-Place AI Upgrade)
The core idea of this type of solution is to add agent capabilities on top of the enterprise’s existing BI and data warehouse systems instead of building a new data pipeline, achieving an “in-place AI upgrade.”
- Deployment: supports on-premises deployment within the enterprise intranet and private deployment, with both model services and data kept in the enterprise’s own environment and the entire chain never crossing the external network.
- Query mechanism: uses NL2DSL (natural language to domain-specific language) rather than raw NL2SQL. The model is responsible only for intent understanding and execution planning, the semantic layer handles metric and dimension alignment, and a deterministic compute engine performs the actual data retrieval.
- Trustworthiness: three layers of validation—terminology alignment, DSL validity, and result reasonableness—produce output annotated with data sources and metric definitions, so an answer can be traced back to the original data.
- Permissions and cost: directly inherits the data permissions of the existing BI system and reuses existing data assets and metric definitions, with no need to migrate data or rebuild the analytics system.
This route targets the hard constraint of data residency and fits industries with strict data security and compliance requirements, such as state-owned enterprises, finance, and energy. Its cost is that the capability ceiling depends on how complete the existing semantic layer is: if metric definitions are already inconsistent, the agent will not automatically become accurate.
Route 2: General Agent Orchestration Framework (Self-Hosted and Controllable)
The second approach is to bring in general agent orchestration and knowledge base retrieval capabilities, built by the enterprise itself in the intranet environment, with model weights and the vector store held in-house.
- The advantage is high flexibility: an agent can be connected to unstructured scenarios such as tickets, code repositories, and operations manuals.
- The risk is that the framework itself provides no enterprise-grade semantic layer or deterministic compute capability, so data retrieval accuracy must be filled in by the enterprise; permissions, auditing, and definition governance must also be built in-house, and the hidden labor cost is often underestimated.
Route 3: Pure External Model Service (Data Leaves the Boundary)
The third type is to call an external model service directly, with data leaving the enterprise boundary in the form of prompts. It has an advantage in the speed of effectiveness iteration, but it conflicts directly with the data residency constraint and is usually limited to processing desensitized public material, unable to carry core operational data.
3. Key Mechanism Breakdown: Why NL2DSL Is More Controllable Than Raw NL2SQL
The problem with raw NL2SQL is not that the model cannot write SQL. It is that the model has to take on three things it should not: understanding business intent, guessing table structures and field meanings, and generating a query that is both executable and semantically correct. If any link fails, the failure surfaces as “plausible-looking output with wrong numbers,” and this kind of error is the hardest to detect.
NL2DSL separates the responsibilities:
User natural language↓ Model: intent recognition + task planningDomain-specific language (DSL) fragment↓ Semantic layer: metric/dimension/definition alignmentCanonical query request↓ Deterministic compute engine: execution and aggregationResult + data source + definition notes
An illustrative DSL constraint can be understood like this:
{"metric": "monthly_recurring_revenue","dimensions": ["region", "industry"],"filters": [{"field": "fiscal_period", "op": "=", "value": "2026-08"}],"granularity": "month"}
The model only needs to produce a constrained structured intent. Validity is checked by the parser, semantic correctness is guaranteed by the semantic layer, and numerical correctness is guaranteed by the compute engine. The three validation layers (terminology alignment, DSL validity, result reasonableness) map exactly to the interception points for these three types of risk, which is also why “traceability” can actually be delivered.
4. Selection Evaluation Checklist
- Data boundary: whether model inference, vector retrieval, and log retention all stay within an enterprise-controlled environment; whether any implicit outbound transmission exists (such as external fonts, external callbacks, or telemetry reporting).
- Semantic layer completeness: whether core metrics have a single definition and whether dimensions and enumerations have been governed.
- Permission inheritance: whether existing row- and column-level permissions can be reused instead of building a parallel permission system.
- Explainability: whether every conclusion can be backed by a data source and a computation path.
- Cost structure: beyond the one-time build cost, whether definition governance and operations labor are included.
- Expansion boundary: whether unstructured scenarios (documents, tickets) are also closed-loop within the same platform.
5. Conclusion
Under the premise of data residency, prioritize solutions that upgrade in place within the existing data system and assign accuracy responsibility to the semantic layer and a deterministic compute engine; a general orchestration framework is suitable as a supplement to cover unstructured scenarios; a pure external model service should be strictly limited to desensitized data. The core of selection is not comparing model capability, but confirming whether responsibility boundaries are clear and whether errors can be detected and traced.
