← Blog

November 28, 2026 ·

Before an Agent Builds on Your Data, Prove What Every File Means

AI-built data pipelines need proof of what a file means before an agent computes on it. A valid raster can contain the wrong physical quantity, and neither its type nor its filename establishes otherwise. A written, source-verified data contract, enforced by deterministic code before analysis begins, makes that distinction explicit and binding.

Why semantic bugs are the dangerous failure mode in AI data pipelines

Founders watch for crashes, type errors and broken tests because these failures show that something has gone wrong. A semantic bug can pass those checks. The file opens, the values have the expected type, and downstream code accepts the result. Yet the calculation is catastrophically wrong because the input represents a different physical quantity from the one the calculation requires.

That distinction changes what testing must establish. A schema can show that a raster band holds numbers without showing whether they describe flood depth or ground elevation. Both can satisfy the same structural expectations. If an agent treats one as the other, correct arithmetic does not rescue the result, and a fluent explanation can make it harder for a decision-maker to question. The dangerous boundary is therefore not simply between valid and invalid data, but between a valid container and an unproven interpretation of its contents.

What actually happened on a real climate-risk platform

This happened with a set of rasters from a vendor on a climate-risk platform. Its filenames suggested flood depth, but the file families held at least two different physical quantities, ground elevation and wave height. Filename inference alone would have led an AI agent to compute confidently on the wrong layer. No automated check found the discrepancy. It was discovered by reading the vendor documentation and cross-referencing the file families against their source specifications.

The surrounding data made that confusion plausible. A coastal flood-risk model can combine elevation, slope, distance-to-river, precipitation, built-up index and SAR-derived flood extent, each from a different source with different native resolution and temporal coverage. The 2026 study A GeoAI framework for coastal flood risk assessment: integrating remote sensing and socioeconomic data documents a stack including SRTM DEM for elevation, HydroSHEDS for distance-to-river, CHIRPS for precipitation and Sentinel-1 GRD for SAR-derived flood extent. These layers share a spatial container while encoding different meanings. In such a stack, ground elevation, flood depth and wave height can use compatible units and the same data types, so domain specifications must show which quantity a band encodes.

How agents infer meaning from names, and why that inference is unreliable

Without an explicit contract, an agent has to infer meaning from the clues available to it, including filenames and directory structure. A loose pattern match can then become the basis for selecting an analytical input. The name appears relevant, the file is readable, and the requested operation seems possible. None of those observations proves semantic identity. A human data engineer reviewing a source specification has evidence that an agent relying on the path alone does not.

The 2026 NORA paper on an autonomous research agent for spatial data science describes what general-purpose agents fail to check. They do not enforce coordinate reference system consistency, verify data provenance or reliably select spatially appropriate methods. Its response includes a spatial data download skill for reproducible acquisition from authoritative geospatial sources. Provenance becomes an engineering responsibility. The specialized harness supplies constraints that general-purpose reasoning does not provide by itself.

The same risk arises outside spatial analysis when inputs have the same type and container format but mean different things. Names can help locate candidates, but they cannot establish that a candidate is suitable for a particular calculation. That raises an obvious question about prompting. Could a carefully written prompt tell the agent which file is which? It could communicate the mapping, but a prompt is advice rather than a gate, and the agent can reason around it when a filename superficially matches the request. The correction must therefore sit in the architecture that controls access as well as in the instructions that guide selection.

What a written, source-verified data contract actually contains

For a team building such a pipeline, the required artifact is a machine-readable manifest that maps each filename pattern to its documented meaning. Each entry for a file family must name the physical quantity, such as flood depth, ground elevation or wave height, along with its unit and vertical datum. It must also record source and vintage, resolution and coordinate reference system, and an integrity hash. These fields serve different purposes. Quantity establishes what the values describe, while the remaining fields establish their reference, origin, spatial characteristics and file identity.

Each entry must trace to a named upstream specification or metadata record that confirms what the band physically encodes. The source and vintage should show which satellite pass, DEM product or model run the data came from. The filename is only the lookup key. Treating it as both the key and the evidence would preserve the original ambiguity inside a more formal document.

Doniyorjon Mukhtorov and Young Im Cho’s November 2026 study, A Verifiable Data-Fusion and Explainable AI Approach for Urban Flood-Risk and Carbon-Emission Forecasting with ISO/IEC-Aligned Validation, illustrates the relationship between documented provenance and executable checks. It aligns twelve open sources on a common zone-and-hour key in a fused store with provenance tags and declarative quality rules. The tags document origin. The rules make compliance testable. Its use of spatial-block cross-validation and standard-aligned executable validation also distinguishes evidence others can test from prose that merely claims a pipeline is trustworthy.

The manifest must itself be a versioned artifact. It belongs under version control with the data and must change whenever the vendor introduces a new file family. An integrity hash adds a concise check that the file is still the one covered by the entry. A README description cannot replace this contract because the pipeline needs fields it can evaluate before permitting analysis.

Why the semantic gate must be deterministic code, not an LLM judgment

Once the source mapping is in place, checking whether a requested raster belongs to the flood-depth family is a comparison against a contract. Deterministic code should perform that comparison before any tool call can invoke flood-depth analysis. Asking another LLM to approve the interpretation would leave the same uncertainty at a different point in the pipeline. The gate needs authority.

The model’s role should be narrowed to the decisions that need judgment, while testable machinery controls the conditions that must hold. In the raster case, the gate establishes that the requested operation is receiving a documented flood-depth layer. The LLM can then explain what a confirmed result implies for a property portfolio. It does not get to redefine the layer to make the requested analysis possible.

Atlan’s MCP architecture guide separates a production-grade server into interface, application, domain and infrastructure layers, with routing and validation in the application layer. That layer is the natural home for the semantic gate, with the manifest exposed through read-only MCP Resources and validation controlling whether action-taking Tools can proceed.

SaferPlaces Agentic AI, presented at EGU 2026, provides a related operational example rather than evidence of this exact manifest implementation. Its LLM agent orchestrates heterogeneous geospatial sources with configurable human-in-the-loop controls so users can validate assumptions and choose the level of automation. Interpretation is not left entirely unchecked. Although a deterministic gate adds a step to an already complex pipeline, that check is cheap and fast compared with a confident wrong answer reaching a downstream risk model or a city administrator’s dashboard.

How a blocking validation agent enforces the contract before analysis begins

Diagram: Five Checks That Block Before Analysis Begins. Visualizes: Show the sequential validation steps a blocking validation agent runs against the manifest before an analytical agent can access a raster file.

The implementation pattern is a dedicated validation agent with authority to block access before an analytical agent proceeds. Here, “agent” names a separate system component. Its checks execute deterministically against the manifest. Separation prevents the analytical agent from treating validation as an optional part of its own reasoning.

Validation first checks that the requested filename pattern matches a known entry in the manifest. The component then compares the entry’s physical quantity with the quantity requested for analysis. A name match is not enough. A ground-elevation entry cannot meet a request for flood depth just because both files are readable rasters. This second comparison is where the contract turns a suggestive filename into an enforceable constraint on use.

The next checks compare the source, vintage and CRS with the values recorded at ingest. The integrity hash must then match as well, establishing that the file has not been silently replaced or corrupted. This catches a different failure from misclassification. A vendor update can replace a file without changing the filename, so the pattern can remain correct while the file no longer matches the recorded artifact. Only after a pass does the analytical agent receive a handle to the file, with the relevant manifest entry included in its context.

NORA supports this separation with lifecycle hooks and safety gates that keep generation separate from evaluation. It does not define a named spatial domain gate with this exact sequence of checks. The fused-store study offers complementary evidence for executable validation through declarative quality rules and provenance tags, reporting that all 75 test cases mapped to ISO/IEC quality standards passed. These examples support the pattern without making them interchangeable implementations.

When the agent reads the contract first, the LLM's job becomes explanation, not interpretation

With file identity established before access, the analytical agent begins from documented facts. Its context includes the quantity, reference and provenance that the approved computation requires. That changes the work available to the LLM. Instead of spending reasoning effort deciding what the input might mean, it can synthesize a confirmed result and explain its implications to a decision-maker.

In a flood-risk underwriting tool built this way, the rules engine uses verified raster semantics to decide what to cover. The LLM writes the plain-language explanation of why that decision was reached, drawing on the confirmed layer identities. The score is already computed and verified. The model’s role does not include inventing a replacement score or choosing a more convenient interpretation of the input.

An engineer-CTO who takes products built quickly to production and was CTO on a flood-risk platform for the insurance sector treats machine-readable manifests as part of the job and has built a product’s MCP server, REST API and command-line interface from a single manifest.

For founders and operators, the operational implication is to establish the data contract before any analytical agent touches the dataset. That is the cheapest point in the project to discover that a vendor’s file families differ from what their names suggest. The contract is a prerequisite for safe use. Once it is enforced, the LLM becomes more useful because it can explain what the system knows without first having to guess what the data means.