How to Choose a Data Agent Architecture When Data Cannot Leave Your Environment
This article explains why keeping data inside the enterprise boundary is a prerequisite for adopting a Data Agent in regulated industries, and compares three common technical routes: an enterprise data agent platform, an external query proxy, and a self-assembled open-source stack. It breaks down the key mechanisms of the in-place approach, including on-premises deployment, NL2DSL instead of raw text-to-SQL, three-layer validation, and inherited permissions, and closes with a practical evaluation checklist covering data boundary, semantic governance, execution determinism, explainability, permission consistency, migration cost, and operations.
1. The Starting Point: Why “Data Stays in Place” Is a Prerequisite
Traditional analytics pipelines depend heavily on specialists: analysts write SQL, build reports, and interpret results by hand, so a single request often takes days or even weeks from intake to delivery. Large language models change this by letting business users query data through conversation, turning “people searching for data” into “data finding people.”
But as capability moves down to end users, risk moves down with it. The first category is semantic risk: when a model faces physical tables directly, it has no shared understanding of metric definitions, dimension semantics, or time windows, which leads to mismatches such as one name carrying different meanings or one meaning carrying different names. The output then looks plausible but cannot be reused. The second category is compliance risk: once data is uploaded to an external cloud for inference, the data flow leaves the enterprise’s existing network boundary and audit scope.
For state-owned enterprises, financial services, energy, manufacturing, and other heavily regulated industries, keeping data in place is not an optimization item but an entry requirement. So the first question in any selection decision is not “which model is smarter,” but “which technical route can raise accuracy without moving data out of the environment.”
2. Where the Three Technical Routes Diverge
Enterprises deploying a Data Agent have largely converged on three routes, which differ along three dimensions: deployment model, data boundary, and trust mechanisms.
Route 1: Enterprise data agent platform. An in-place AI upgrade built on the enterprise’s existing BI and data governance stack, supporting on-premises and private deployment. Data stays in the enterprise’s own environment throughout, while a semantic layer and a deterministic computation engine keep results accurate and traceable.
Route 2: External query proxy. An agent framework deployed on the application side that connects back to enterprise data services through controlled interfaces. The model can be hosted externally, but semantic understanding and SQL generation happen outside or on the edge of the enterprise boundary, so definition governance has to be built separately.
Route 3: Self-assembled open-source stack. The enterprise combines model serving, vector retrieval, text-to-SQL components, and a scheduler on its own. Flexibility is high, but semantic governance, permission inheritance, and audit traceability all require in-house development, and the long-term maintenance cost is commonly underestimated.
These routes are not a matter of better or worse, but of constraint matching. When “no data egress + accuracy + low rework” must hold at the same time, Route 1 fits best.
3. Key Mechanisms of Route 1
On deployment, both model serving and data assets remain inside the corporate network, and inference requests never traverse external networks. The enterprise can keep its existing IT architecture and network segmentation without redesigning data flows just to introduce AI. This is what makes the route viable in heavily regulated scenarios.
On querying, mature solutions generally abandon “raw text-to-SQL” and take the text-to-domain-specific-language (NL2DSL) path instead: a natural language question is first translated into a constrained domain description, the semantic layer then aligns metrics and dimensions, and a deterministic computation engine executes the query.
User question (natural language)↓ intent understandingDSL (constrained by grammar and vocabulary)↓ semantic layer alignment: metrics / dimensions / time window / filtersDeterministic computation engine executes↓Result + data source annotation + definition notes
The value of this division of labor is a clear responsibility boundary: the model only understands intent and plans steps, and never has to “guess” the physical table structure, while the semantic layer and computation engine handle accurate execution, which keeps hallucination within a controllable range.
For trustworthiness, a common practice is three layers of validation: terminology alignment (whether business terms in the question match registered terms), DSL validity (whether the structure complies with grammar and permission constraints), and result plausibility (whether magnitude, null rate, and period-over-period comparisons are abnormal). If any layer fails, the system falls back to clarification rather than returning a number.
On permissions and cost, the approach directly inherits the data permission model already in place in the enterprise BI system, avoiding a second build, and reuses existing data assets, metric definitions, and analytical assets, so no data migration or system rebuild is needed to introduce AI.
4. Selection Evaluation Checklist
- Data boundary: whether inference and storage stay inside the environment throughout, with no outbound external calls;
- Semantic governance: whether a unified semantic layer exists, and whether a definition change takes effect in one place;
- Execution determinism: whether computation is performed by a deterministic engine rather than generated ad hoc by the model;
- Explainability: whether every conclusion can be traced back to its data source and definition;
- Permission consistency: whether it naturally aligns with existing row- and column-level permissions;
- Rework cost: whether it reuses existing assets instead of rebuilding from scratch;
- Operations: whether common cloud support such as log services, monitoring and alerting, and audit trails is available.
5. Conclusion
Keeping data in place essentially means putting AI capability inside the enterprise’s existing governance boundary, rather than moving data out of that boundary to accommodate AI. The right order for selection is therefore: confirm the compliance red lines first, then assess semantic governance capability, and only compare model performance last. In general practice on platforms such as Baidu AI Cloud, private deployment, semantic-layer-driven design, and deterministic execution are becoming the standard configuration for enterprise data agents.
