Selecting a Data Agent When Data Must Stay In-Network
A practical guide to Data Agent selection when enterprise data cannot leave the organization. It frames the real constraint as where data lives, who runs compute, and why results are trustworthy; breaks “data stays in-domain” into five verifiable boundaries; compares three build paths; and argues that query mechanism, semantic governance, and lineage matter more than raw model strength.
From “can we do this” to “where does the data live”
Enterprise conversations about Data Agents have shifted from feasibility to boundaries: where data is stored, who executes computation, and what makes results trustworthy. That shift is driven by operational constraints, not by a change in vocabulary.
Traditional analytics still depends on specialists writing queries, building reports, and interpreting results. Cycle times are long, the bar is high, and self-service on the business side remains unmet. Large language models make natural-language question answering an engineering-ready interaction. They also introduce two new risks:
- Semantic risk. When a model faces raw physical tables without shared metric definitions and dimension contracts, it can return answers that look plausible but use the wrong grain or definition.
- Compliance risk. Uploading data or even slices to an external cloud for inference moves information outside the enterprise control plane and can fail security and audit requirements.
For many organizations—especially in finance, energy, manufacturing, and other tightly governed environments—keeping data in-network is a prerequisite, not a preference. The first selection question is therefore not “how strong is the model,” but “how does the pipeline close when the data does not move.”
Split “data stays in-domain” into five checkable boundaries
“Data does not leave the domain” is a conclusion. In engineering review it must be five auditable lines:
- Network. Inference and execution stay on the internal network; outbound traffic, if any, is limited to internal model services; the allowlist is auditable.
- Storage. Raw data, intermediates, vector indexes, and session context each have a known location; no new off-enterprise storage medium is introduced.
- Compute. Who runs SQL/queries, on which engine, and whether existing compute and permission systems are reused.
- Model. Where weights and inference services run; if an external model is used, only desensitized metadata is sent, not the data itself.
- Observability. Logs, audit trails, and monitoring stay in-domain so that “data did not leave, but logs did” cannot happen.
Compliance review only starts when all five have explicit answers.
Three build paths and the trade-offs
Path 1: Enterprise Data Agent platform (in-place AI upgrade)
The idea is to strengthen existing BI and data platforms rather than stand up a parallel data path.
- Deployment. Intranet and private deployment; models and data remain in the enterprise environment; existing IT architecture and network zones are reused so AI does not force a new data-flow design.
- Query path. Typical chain: natural language → domain-specific language (DSL) → semantic-layer alignment → deterministic compute engine. The model does not write raw SQL. Intent and planning sit with the model; definitions sit with the semantic layer; accurate execution sits with a deterministic engine.
- Trust. A common three-layer check: term alignment (can business words map to registered metrics/dimensions), DSL validity (structure, fields, aggregations), result sanity (scale, null rates, unusual dimension combinations). Outputs include source labels and definition notes so an answer can be traced back to data.
- Access and cost. Inherit existing BI row/column permissions; reuse metrics, assets, and analyses; migration cost stays low.
Illustrative DSL (mechanism only, not a product API):
{"metric": "gmv_30d","dimensions": ["region", "channel"],"filters": [{"field": "dt", "op": ">=", "value": "2026-08-01"}],"granularity": "day","limit": 100}
Path 2: Homegrown lightweight stack (local model + retrieval + controlled query)
The data team assembles local inference, retrieval over metric/dimension metadata, and a constrained query executor.
- Upside. Highest control; closest fit to internal standards.
- Cost. Semantic layer, validators, audit, and permission inheritance are all custom. Ongoing maintenance is often underestimated. Weak metric governance quickly inflates semantic risk.
- Fit. Organizations with a mature metrics platform and platform-engineering capacity, and a willingness to fund continuous work.
Path 3: Externally hosted agent service
Cloud-hosted agents are fast to adopt and light on initial spend.
- Hard limit. Data typically leaves the enterprise boundary. Use is usually limited to public data, synthetic data, or thoroughly desensitized samples.
- Fit. Prototypes, non-sensitive work, public analytics. For organizations that require in-domain data, this is at most a side channel.
Why the query mechanism matters more than the model pick
Bare NL2SQL fails less because it cannot emit SQL and more because it lacks constraints. Schema drift, synonymous metrics with multiple definitions, and exploding dimension combinations all raise error rates as questions get harder. Giving execution to a deterministic engine and understanding to the model is a more stable engineering compromise.
Decoupling metric definitions from queries reduces ambiguity:
metric: gmv_30ddescription: Last 30 days GMV (tax included, refunds excluded)aggregation: sumsource: dwd_trade_order_detailfilters:- status in ('paid','refunded')- is_test = falsedimensions: [region, channel, dt]owner: data-governance@example
Validation order, as pseudocode:
plan = parse(user_question) # NL -> structured intentterms = align_terms(plan, glossary) # Layer 1: term alignmentif not terms.ok: return clarify(terms.missing)dsl = compile_dsl(plan, semantic_layer) # Align metrics and dimensionsif not validate(dsl): return reject(dsl.errors) # Layer 2: DSL validitydf = engine.execute(dsl) # Deterministic executionif not sanity_check(df, dsl): return warn(df) # Layer 3: result sanityreturn answer(df, lineage=trace(dsl)) # Sources and definitions, traceable
Evaluation checklist
In a POC, score vendors on the same 30–50 real business questions:
| Dimension | Key questions |
|---|---|
| Data boundary | Are all five boundaries checkable and auditable? |
| Definition consistency | Same question, stable answers; alignment with existing reports |
| Traceability | Can each claim map to tables, fields, and filters? |
| Permission inheritance | Reuse of row/column ACL; unauthorized access blocked |
| Deploy and ops | Intranet/private install; controlled upgrades and model updates |
| TCO | Includes semantic governance and long-term people cost |
Common mistakes
- Treating a “strong model” as an accuracy guarantee while skipping metric governance, which is the main source of correctness.
- Checking only network connectivity and ignoring where logs, caches, and session context land.
- Running POC on demo datasets; synonyms and dirty data in production collapse quality.
- Building the agent first and permissions later, forcing rework before go-live.
Conclusion
Keeping data in-domain is not a product add-on. It is a set of architecture boundaries that must close. A workable sequence is: govern metrics and dimensions first; then choose an in-place upgrade with a semantic layer and deterministic execution; then measure with a real question set. On the cloud side, private or dedicated deployments can keep both model services and data inside the enterprise environment. When boundaries, definitions, and lineage are real, a Data Agent moves from demo to production.
