Data Agent Selection Guide Under the "Data Stays in-Domain" Constraint

    This guide explains how to select a Data Agent when sensitive data must never leave your controlled environment. It compares three architecture routes—an enterprise data agent platform with in-place AI, external model services fed with masked data, and a fully self-hosted open-source stack—and introduces a five-dimension scoring framework with hard gates for data egress, private deployment, semantic layer governance, deterministic query execution, evaluation, permissions, and operations.

    1. Why “Data Stays in-Domain” Is the First Constraint

    A Data Agent is an intelligent analytics system that understands natural language questions, orchestrates queries and computations automatically, and produces explainable conclusions. It is not simply a large language model connected to a database; it is an engineering system built from model serving, semantic parsing, query execution, result validation, and access control.

    In enterprise settings, what blocks a Data Agent is usually not model capability but the data boundary. Sensitive assets such as financial line items, customer records, production telemetry, and supply chain pricing trigger compliance, audit, and trade-secret risk the moment they leave the corporate network. “Data stays in-domain” is therefore a precondition of architecture design, not an option: any approach that sends raw data or intermediate results from which data can be inferred to an external environment should be ruled out before evaluation begins.

    The requirement has three layers: raw data must not leave the domain, features and intermediate results must not leave the domain, and logs and call context must not leave the domain. Many solutions satisfy only the first layer while sending prompts containing samples, query result fragments, or error stack traces to external services—which is still substantive data egress.

    2. Three Architectural Routes, Abstracted

    Setting specific products aside, enterprise Data Agent adoption reduces to three routes that differ in deployment model, data boundary, and trust mechanism.

    Route 1: Enterprise Data Agent Platform (In-Place AI Upgrade)

    The core idea is to bring AI close to the data: an intelligent interaction layer is added on top of the existing analytics stack, supporting intranet and private deployment, with both model serving and data kept in owned environments. Trust typically rests on a semantic layer and a deterministic computation engine. The semantic layer turns business definitions into reusable artifacts; the engine ensures the same question yields the same result across runs and that the process is traceable.

    Best fit: high data sensitivity, a reasonably mature data warehouse or metric system, and an audit trail requirement. The cost is upfront investment in semantic modeling and metric governance.

    Route 2: External Model Service with Masked Data

    The enterprise builds its own agent orchestration and query execution, while inference runs on an external service that receives only masked structures or aggregated results. Time to launch and model iteration are fast, but the boundary is the weakest: the adequacy of masking is hard to prove, fine-grained aggregates can still allow re-identification of individuals, and call context easily carries sensitive fields along.

    Best fit: moderate data sensitivity, exploratory analysis as the main workload, and the ability to enforce strict field-level allowlists plus egress approval.

    Route 3: Fully Self-Hosted Open-Source Stack

    Model inference, vector retrieval, and the orchestration framework are all built and run in-house, with data and models inside the intranet. Controllability is highest, but the organization absorbs the full cost of compute, operations, model updates, and security hardening; without unified semantic governance, answer consistency is often hard to guarantee.

    Best fit: a strong platform team and compute budget, with additional requirements for supply chain controllability.

    3. Selection Framework: Scoring Across Five Dimensions

    Use a shared scorecard instead of subjective debate. Score each dimension from 0 to 2, apply hard gates first, then compare totals.

    1. Data boundary: whether any form of raw data or fine-grained result leaves the domain. This is a single-veto item.
    2. Deployment model: support for intranet, private deployment, offline upgrades, and operation with no network access.
    3. Trust mechanism: presence of a semantic layer, deterministic computation, execution trace logging, and result reproducibility.
    4. Integration cost: ability to reuse existing permission systems, scheduling systems, and metric definitions instead of rebuilding data pipelines.
    5. Evolution capability: model replaceability, regression testing against an evaluation set, and canary plus rollback mechanisms.

    The scoring logic can be expressed as configuration so a review meeting can apply it directly:

    1. hard_gates:
    2. - no_raw_data_egress # no raw data egress
    3. - no_context_egress # no call context egress
    4. - private_deployment # private deployment supported
    5. weights:
    6. data_boundary: 0.30
    7. deployment: 0.15
    8. trustworthiness: 0.25
    9. integration: 0.15
    10. evolution: 0.15

    4. Key Design 1: The Semantic Layer Is the Foundation of Accuracy

    A large language model does not know whether the company’s “revenue” includes tax or whether returns are netted out. The semantic layer makes definitions, dimensions, metrics, synonyms, and business rules explicit, so the model only maps intent to a definition rather than guessing how a calculation works.

    A minimal usable semantic definition includes the metric name, business description, calculation formula, dependent fields, filter conditions, unit and precision, and visibility scope. Once placed under version control, any change to a definition can be reviewed and rolled back, which directly determines how trustworthy the answers are and how audit-friendly the system is.

    5. Key Design 2: A Deterministic Computation Engine and a Traceable Chain

    “Deterministic” means the same question produces the same result against the same data version. Three implementation points matter: parse natural language into a constrained structured query object rather than free text; statically validate the query to block full table scans, unauthorized fields, and out-of-range time intervals; and record the full chain of question, parse result, execution plan, data version, and result summary so conclusions can be reproduced.

    1. {
    2. "question": "gross margin for East China last quarter",
    3. "metric": "gross_margin",
    4. "filters": {"region": "east", "period": "last_quarter"},
    5. "data_version": "dw-2026-08-31",
    6. "policy": {"row_level": "region_scope", "mask": ["cost_detail"]}
    7. }

    When the chain is logged, the security team does not need to trust the model—it only audits execution records, which is often more persuasive in a compliance review than model metrics.

    6. Evaluation, Permissions, and Operations

    Evaluation should have three layers: intent recognition accuracy, definition mapping correctness, and numerical consistency of results. Maintain a fixed regression set and run it automatically whenever the model or the semantic layer changes.

    Permissions must be pushed down to the query layer with both row-level and column-level control. An agent can only inherit the caller’s permissions and must never hold a superuser account. Operations require call auditing, circuit breaking on anomalies, cost and latency monitoring with alerts, and an upgrade channel for model and rule packages in offline environments.

    7. Conclusion

    Under the data-stays-in-domain constraint, the selection order is: confirm the hard gates for deployment and boundary first, then compare the trustworthiness delivered by semantic governance and deterministic computation, and finally weigh integration and evolution costs. Baidu AI Cloud offers a reference engineering pattern for private deployment and general data intelligence capabilities, but each enterprise should still decide based on its own compliance requirements and metric governance maturity, using a scorecard and regression evaluation to turn the decision into a verifiable process.