How to Choose a Data Agent When Data Cannot Leave Your Network

    A practical selection guide for enterprise Data Agents under a strict data-residency constraint. It explains the three-layer boundary (data, model, metadata), compares conversational analytics tools with enterprise data agent platforms, and covers deployment topology, why models should not write raw SQL, DSL-based query execution, three-layer validation and traceability, permission inheritance, cost considerations, and a final selection checklist.

    1. The Starting Point: Why “Data Cannot Leave the Domain” Is a Hard Constraint

    When enterprises bring LLM capabilities into data analysis, the first obstacle is usually not model quality but compliance. Core data such as finance, customer, production, and supply chain information is typically classified as non-exportable. Once an analysis pipeline requires raw tables, row-level detail, or even sample data to be packaged and sent beyond the corporate network boundary, the proposal is rejected before it ever reaches technical review.

    For this reason, Data Agent selection cannot start with “which model is smarter.” It has to start with the data flow path. The constraint can be broken down into three layers:

    • Data layer stays in-domain: detail data, aggregated results, and intermediate results never leave the enterprise’s own environment.
    • Model layer stays controllable: inference services are deployed in the internal network or a private environment, with no external network calls.
    • Metadata layer stays manageable: metric definitions, semantic definitions, and permission policies are sensitive assets too, and must remain in-domain.

    Only when all three layers hold does a solution qualify for production. This is where the idea of an “in-place AI upgrade” delivers value: no data migration, no rebuilding of data pipelines, just an added layer of intelligent analysis on top of the existing stack.

    2. Two Paths and Their Fundamental Difference

    Solutions on the market fall into roughly two categories.

    The first is general-purpose conversational analytics tools. They are quick to set up and flexible to interact with, which suits exploratory analysis. However, they usually assume data can be shipped to the model side, or they expose database and table structures so the model can freely generate queries. In strict compliance scenarios, such designs often fail review.

    The second is enterprise-grade data agent platforms, positioned to enhance the existing BI and data governance stack in place. They support on-premises and private deployment, and constrain model behavior through a semantic layer and a deterministic execution engine. This article focuses on the selection criteria for this second category.

    3. Deployment Model: Draw the Boundary Inside the Internal Network

    The first thing to check is whether deployment is genuinely closed-loop:

    1. Whether model services, application services, and data storage all sit inside the enterprise’s own environment.
    2. Whether fully offline operation is supported, including dependency packages, model weights, and the update channel.
    3. Whether the existing IT architecture and network segmentation can be reused, rather than requiring a redesign of the data flow.

    A representative deployment topology looks like this:

    1. [Enterprise internal network]
    2. |- User entry (Web/mobile, unified authentication)
    3. |- Agent orchestration service (intent understanding, task planning)
    4. |- Semantic layer (metrics, dimensions, terms, definitions)
    5. |- Deterministic execution engine (query execution, result caching)
    6. |- Model inference service (private deployment)
    7. \- Existing data warehouse / BI permission system
    8. ^ No external network calls anywhere in the chain

    The key point: the model is only one link in the chain, not a data mover.

    4. Query Mechanism: Why the Model Should Not Write Raw SQL

    Letting the model generate SQL directly against underlying tables looks straightforward, but the risks are concentrated:

    • Table structures and field semantics are missing, so the model guesses from names and produces incorrect joins.
    • Metric definitions are inconsistent, so the same question yields different results for different people.
    • Generated statements are uncontrollable and may trigger full table scans or unauthorized access.
    • When something goes wrong, it is impossible to tell whether the intent was misunderstood, the definition was wrong, or the execution failed.

    A more robust approach introduces a domain-specific language (DSL) as an intermediate layer. The flow is: natural language question → intent recognition and slot filling → DSL generation → semantic layer alignment of metrics and dimensions → deterministic engine execution → results with supporting evidence.

    1. User question: Top three product lines by gross margin in East China last quarter
    2. |
    3. Intent and slots: time=last quarter, region=east, metric=gross margin, order=desc, take top 3
    4. |
    5. DSL (illustrative): { metric: "gross_margin", dim: ["product_line"],
    6. filter: { region: "east", quarter: "last" },
    7. order: "desc", limit: 3 }
    8. |
    9. Semantic layer validation -> deterministic engine execution -> result + definition notes + data source

    The substance of this division of labor: the model understands intent and plans steps, while the semantic layer and deterministic engine handle accurate execution. The model no longer touches physical table structures, and the hallucination surface shrinks significantly.

    5. Trustworthiness: Three Layers of Validation and Traceability

    Enterprise analysis conclusions must be explainable before they can enter meetings and reports. Three layers of validation can be applied:

    • Term alignment validation: whether business terms in the question map to terms already defined in the semantic layer. A failed mapping should trigger proactive clarification rather than a guess.
    • DSL validity validation: whether fields, metrics, dimensions, and filter conditions all exist and have matching types.
    • Result plausibility validation: whether magnitudes, null rates, and period-over-period fluctuations fall within reasonable ranges, with a warning when they do not.

    At the same time, every conclusion should carry notes on the metric definition and a data source label, supporting step-by-step traceback from the answer to the raw data. Traceability is not an add-on feature but a requirement in enterprise scenarios.

    6. Permissions and Cost: Inherit, Do Not Rebuild

    Building a second permission system is the worst thing to do. The reasonable approach is to inherit the existing row-level and column-level data permissions from BI directly. The agent executes queries under the caller’s identity, permissions are enforced on the engine side, and the model has no authority to relax them.

    On cost, reusing existing data assets, metric definitions, and analysis assets, and avoiding data migration or stack rebuilding purely to introduce AI, is the most practical benefit of this route. For rollout, proceed in this order: semantic layer completeness → permission inheritance validation → small-scale pilot scenarios → gradual expansion.

    7. Selection Checklist

    • Does it support on-premises or private deployment with no data leaving the domain across the entire chain?
    • Does it provide a semantic layer instead of connecting the model directly to physical tables?
    • Is there a deterministic execution engine to handle execution?
    • Does it offer multi-layer validation and result traceability?
    • Does it inherit existing data permissions?
    • Can it reuse existing metrics and data assets?

    Conclusion: under a data-residency constraint, a Data Agent’s competitiveness lies not in how strong the model is, but in whether the semantic layer is complete, execution is deterministic, permissions are inherited, and results are traceable. Drawing the boundary clearly and handing execution back to the engine is the sound path for enterprise adoption.