## TL;DR

The agent matched a misread merchant string to the wrong vendor with false confidence. Require a minimum match confidence for vendor flags, route low-confidence matches to manual review, and never flag a vendor on a guess.

## Error

```text
agent misread the merchant and flagged the wrong vendor
```

## Steps

1. Review the misread: compare the OCR merchant text with the flagged vendor. Expected: the mismatch is visible.
2. Add a confidence threshold to vendor matching: below it, the agent reports "unmatched" instead of a vendor name. Expected: guesses stop becoming flags.
3. Route unmatched merchants to a manual review queue with the receipt image. Expected: humans resolve what the agent cannot.
4. Feed reviewer corrections back into the vendor alias list. Expected: the same misread resolves correctly next time.
5. Track the wrong-vendor flag rate as a quality metric. Expected: a number that must trend down.

## When to use

- An agent flags the wrong vendor from a misread merchant.
- Vendor flags lack a confidence measure.

## When not to use

- The merchant is read correctly but categorized wrong (a categorization problem).
- The vendor list itself has duplicates (dedupe the vendor master).

## Tool compatibility

- Custom agent vendor matching; manual review queues.

## Variant phrasings

### Wrong vendor flagged on expense

Same failure, shorter wording.

### Merchant mismatch caused false flag

Names the causal chain.

## Why it happens

Fuzzy matching always returns a best match, even when the input is garbage. Without a confidence floor, the best bad match becomes an authoritative-sounding wrong flag.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_xuMEBCw_m9COvMZlENYL2g
