Use CaseJul 25, 2026 · 8 min read

ChatGPT database query reconciliation: verify the number before you share it

A plausible number is not a verified number.

When ChatGPT queries a database, the SQL can run successfully and the answer can still be wrong for the business decision. The query may use the wrong revenue definition, exclude a late-arriving source, inherit an old time zone, mix production and test tenants, or summarize a truncated result.

Before a database answer reaches a forecast, board slide, customer message, or operational decision, reconcile it against an explicit contract.

Write the answer contract first

Turn the question into a definition that another analyst could reproduce. Record the metric, population, tenant or business unit, environment, time window, time zone, currency, exclusions, grouping, freshness requirement, and expected output shape.

“What was revenue last month?” is underspecified. “Recognized subscription revenue for external production tenants in EUR for the previous calendar month, using finance definition v4” is testable.

If two reasonable definitions can produce different numbers, the connector should ask for clarification or use a named approved definition rather than guessing.

Bind the query to a known source

Identify the approved view, table set, or business operation that owns the metric. Schema discovery tells the model what columns exist; it does not establish which source is authoritative.

Prefer a versioned reporting view or narrow tool such as get_monthly_recognized_revenue over arbitrary exploration across similarly named tables. Include the source identifier and definition version in the result.

For a broader connection pattern, see the ChatGPT database connector.

Make scope structural

Tenant, environment, legal entity, region, and user scope should come from trusted authenticated context or an approved request—not from a conversational assumption.

Test internal tenants, deleted accounts, trial records, refunds, soft-deleted rows, and cross-tenant joins. A total can match last month's report by accident while including the wrong population.

Prove freshness

Record when the source was observed, when upstream data last completed, and whether the query used a primary database, replica, warehouse, or cached view. “Live database” does not guarantee every upstream business event is current.

Define a freshness budget for the workflow. If settlement data arrives overnight, an answer at 16:00 may be current enough. If the question concerns active incidents, five minutes may be too old.

When the freshness budget is exceeded, return a structured stale result instead of silently presenting the number as current.

Reconcile against an independent control

Choose at least one control that does not depend on the same query path:

  • a finance or operational report with a known close process;
  • a stored control total from the source system;
  • a second query built from a different aggregation path;
  • a small hand-checked sample with expected inclusions and exclusions;
  • a previous-period total plus a documented movement bridge.

Set tolerances before comparing. Exact counts may require equality. Currency totals may allow a documented rounding difference. A percentage may require both numerator and denominator to reconcile.

Inspect the result before the prose

Validate the structured database result separately from ChatGPT's explanation. Check row count, aggregate values, null handling, duplicate keys, currency conversion, date boundaries, truncation, and result bytes.

If the tool returns only formatted text, reconciliation becomes fragile. A useful result contract includes typed values, normalized filters, source, freshness, definition version, row count, truncation state, and trace ID.

Related: tool result contracts for AI database agents.

Use a movement bridge for material changes

If the result differs materially from the previous period or control, explain the movement before accepting it. Break the difference into new records, removals, status changes, late arrivals, corrections, currency effects, and definition changes.

A movement bridge catches a common failure mode: the total is arithmetically correct for the selected rows, but the selected population changed without anyone noticing.

Test known edge cases

  1. Run the query across a daylight-saving or month-end boundary.
  2. Include null, zero, negative, refunded, and duplicate records.
  3. Use a tenant with no matching rows.
  4. Exceed the maximum date range or result limit.
  5. Change a metric definition or reporting view version.
  6. Delay one upstream source beyond the freshness budget.
  7. Force timeout and retry behavior.
  8. Compare a rounded answer with the underlying precise values.

The expected response may be an answer, clarification request, bounded partial result, or refusal. “The query succeeded” is not a sufficient expected outcome.

Separate exploration from publication

Exploratory questions can tolerate provisional answers when their limits are visible. Publishing a number outside the conversation needs a stronger boundary.

Use a separate publish or export step that requires the answer contract, reconciliation result, evidence references, materiality assessment, and reviewer identity. Bind approval to the exact result or checksum so a later rerun cannot inherit an old approval.

Concrete example: monthly active customers

A product leader asks ChatGPT for monthly active customers. The first result is 8,412.

The approved definition excludes staff, test tenants, suspended accounts, and events generated by background jobs. The result contract shows production scope, UTC month boundaries, definition v3, warehouse refresh at 01:15 UTC, 8,412 distinct accounts, and no truncation.

A control report shows 8,397. Reconciliation finds 15 accounts whose suspension status arrived after the event fact table refreshed. The answer is marked provisional until the dimension refresh completes. The useful outcome is not a confident 8,412; it is an explainable difference.

Reconciliation checklist

  1. Define metric, population, scope, time, currency, and exclusions.
  2. Use an approved source and versioned business definition.
  3. Verify freshness and upstream completion.
  4. Inspect typed results, limits, nulls, duplicates, and truncation.
  5. Compare with an independent control and preset tolerance.
  6. Explain material differences with a movement bridge.
  7. Preserve evidence and trace linkage.
  8. Require a separate approval for external publication.

Where Conexor fits

Conexor provides MCP infrastructure for connecting ChatGPT and other AI clients to PostgreSQL, MySQL, SQL Server, and APIs through governed tools. Reconciliation adds the answer contract, controls, and evidence needed before a database result becomes a business fact.

Explore the ChatGPT database connector

Pair this checklist with audit-ready MCP database workflows.

Relay

Quick questions

Relay

Quick questions

Ask me