MAY 16, 2026AI

Prompting an AI model to help reconcile two files: patterns that work

If you're going to use an AI assistant for reconciliation, the prompt is where you decide whether it helps or quietly hurts. These are the patterns that keep the model on the work it's actually good at — mapping, classifying, explaining — and off the arithmetic it isn't. Steal them as-is; they work with any capable model.

The golden rule of reconciliation prompts

Ask the model to reason about structure and language, never to compute the result. Which column maps to which is a good prompt. Reconcile these and tell me the total variance is a bad one — it invites a fluent, unverifiable number. Every pattern below follows from that rule.

Pattern 1: Field mapping

Give the model the column headers and a few sample rows from each source, and ask only for the mapping.

Here are the headers and 3 sample rows from two exports.
SOURCE A: order_id, Order Total, Placed On
SOURCE B: Order #, amount_cents, created_at
Map each Source A field to its Source B equivalent. For each pair, note
any format difference (currency units, date format). Do not compute
anything. List unmapped fields separately.

You get a reviewable mapping plus a heads-up that one side is in cents and the other in dollars — which is exactly the kind of trap that causes fake mismatches.

Pattern 2: Primary key proposal

These are the columns of a retail inventory export:
sku, location_id, on_hand, updated_at.
Propose the minimal set of fields that uniquely identifies a row.
Explain why a single field is or is not sufficient. Reason from the
field meanings; do not assume.

The model reasons that sku repeats across locations and proposes sku plus location_id. You still validate by counting distinct keys, but it pointed you at the composite key immediately.

Pattern 3: Classifying a list of differences

Once you have computed the differences in code, you can hand the model the list to categorize.

Below is a list of reconciliation differences (already computed).
For each, classify as: timing, fee/adjustment, value error, or missing
record. Give a one-line reason. Do not change any numbers.
[paste the computed differences]

Pattern 4: Explaining variance to a human

This order reconciles with a 12.50 difference. Context: order placed
May 2, refund issued May 9, processor fee 2.9% + 0.30. In two
sentences, explain the likely cause for a finance reviewer. Flag if
the numbers do not support your explanation.

This is the model at its best: turning a flagged row into a sentence a reviewer can act on, while being told to flag when the story does not fit the figures.

What never to put in a reconciliation prompt

  • Add these up or what is the total — arithmetic belongs in code.
  • Decide if these match across a large set — matching belongs in deterministic logic.
  • Thousands of rows pasted in for the model to process — it will truncate, sample, or hallucinate coverage.
  • Anything where a wrong, confident answer would be acted on without review.

Putting it together

Used this way, the model is a fast assistant for the setup and the story, and your code or tool is the source of every number. The prompts above are deliberately tool-agnostic — they work with any capable assistant — because the discipline is in what you ask, not which model answers. For where this fits the bigger picture, see what an AI agent can and cannot reconcile.

Frequently asked questions

How do I prompt an AI to reconcile two files?

Do not ask it to reconcile. Ask it to map fields, propose a primary key, and classify or explain differences you have already computed. Keep the matching and arithmetic in deterministic code, and use the model only for the language and judgment steps.

Why should I not ask an AI to calculate reconciliation totals?

Language models predict text rather than compute, so they can return plausible but wrong totals and different answers on re-runs. Totals and matching must be reproducible, which means they belong in code, not in a model response.

Do these prompt patterns work with any AI assistant?

Yes. The patterns constrain what you ask — mapping, key proposal, classification, explanation — rather than relying on a specific model features, so they transfer across any capable assistant.