DEV Community

Mads Hansen
Mads Hansen

Posted on

Every AI database answer needs a source trail

An AI answer without provenance is just a confident paragraph.

That may be fine for brainstorming.

It is not enough for database answers that drive product, finance, support, or operations decisions.

When an agent returns “MRR is up 8%,” the useful question is not only whether the number came from a database.

The team also needs to know:

  • which source system was queried
  • which schema or view version was used
  • which metric definition applied
  • which tenant, region, role, or user scope constrained the result
  • whether the result came from live data, a replica, or a cached snapshot
  • what freshness window was attached to the answer

Wrong database answers are not always hallucinations.

Often they are grounded in the wrong source, an old replica, a stale metric definition, or the wrong tenant scope.

Longer version: Query provenance for AI database agents

The practical rule:

Do not ask the model to invent provenance after the fact. The database/MCP layer should produce it as part of the tool result.

Top comments (0)