> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Confidence scoring

> See how Matcher computes a 0–100 confidence score from amount, currency, date, and reference checks, and how EXACT, TOLERANCE, DATE_LAG, and FUZZY rules score.

Confidence scores indicate the reliability of an automated match on a scale of 0-100. Higher scores mean greater certainty that two transactions represent the same financial event.

## Overview

***

When Matcher identifies a potential match, it assigns a confidence score based on multiple factors.

This score defines how the match is handled:

* High scores (90+) are auto-approved
* Mid-range (60 – 89) scores require review
* Low scores (\<60) are treated as exceptions

<Frame caption="Matcher confidence scoring.">
  <img src="https://mintcdn.com/lerian-49cb71fc/SEOef3JqTInYAAau/images/en/d2/matcher-confidence-scoring.svg?fit=max&auto=format&n=SEOef3JqTInYAAau&q=85&s=9e5fda0d1c6d0b85552f1aff1dc1be7e" alt="Matcher Confidence Scoring" width="672" height="1026" data-path="images/en/d2/matcher-confidence-scoring.svg" />
</Frame>

## Score components

***

Matcher uses a **binary weighted scoring system** with four components. Each component evaluates to either a full match (1.0) or no match (0.0) — there are no partial scores within a component.

| Component       | Weight | Points (match / no match) |
| --------------- | ------ | ------------------------- |
| Amount match    | 40%    | 40 / 0                    |
| Currency match  | 30%    | 30 / 0                    |
| Date proximity  | 20%    | 20 / 0                    |
| Reference match | 10%    | 10 / 0                    |

### Amount match (40%)

The amount component has the highest weight because amount discrepancies often indicate different transactions.

| Condition                             | Score     |
| ------------------------------------- | --------- |
| Amounts match (within rule tolerance) | 40 points |
| Amounts do not match                  | 0 points  |

Amount matching depends on the active rule type. An EXACT rule requires identical amounts; a TOLERANCE rule allows variance within the configured `percentTolerance` and `absTolerance`.

### Currency match (30%)

Currency verification is binary — currencies either match or they don't.

| Condition          | Score     |
| ------------------ | --------- |
| Same currency      | 30 points |
| Different currency | 0 points  |

### Date proximity (20%)

Date scoring checks whether the transaction dates fall within the configured window.

| Condition                    | Score     |
| ---------------------------- | --------- |
| Dates within allowed window  | 20 points |
| Dates outside allowed window | 0 points  |

The allowed window depends on the rule: an EXACT rule requires the same date (respecting `datePrecision`), while a DATE\_LAG rule accepts a day difference inside its `[minDays, maxDays]` band (the `inclusive` flag controls whether `maxDays` itself counts).

### Reference match (10%)

For EXACT and TOLERANCE rules, reference comparison is binary.

| Condition                                      | Score                                                                                       |
| ---------------------------------------------- | ------------------------------------------------------------------------------------------- |
| References match (exact or case-insensitive)   | 10 points                                                                                   |
| Both references absent                         | 10 points (unless the rule sets `referenceMustSet`, which scores any absent reference as 0) |
| References do not match, or only one is absent | 0 points                                                                                    |

<Note>
  **FUZZY rules score the reference on a continuous scale.** For a FUZZY rule, the 10% reference slot carries a graded `ReferenceScore` between `0.0` and `1.0` (a similarity measure) rather than a strict `0`/`1`. A near-identical reference contributes close to the full 10 points while one that barely clears the fuzzy gate contributes proportionally less. As a result, FUZZY matches can produce non-multiple-of-10 scores such as 97 or 99. See [Possible scores](#possible-scores) below.
</Note>

<Warning>
  **DATE\_LAG rules do not score references.** For DATE\_LAG rules the `ReferenceScore` is always `0.0`, so the 10% reference component contributes `0` points regardless of the reference values. The maximum achievable DATE\_LAG score is therefore 90 (40 + 30 + 20 + 0), which by design keeps date-lag matches in the manual-review path.
</Warning>

## Calculation formula

***

The confidence score formula:

```
confidence = round(
  (amountMatch × 0.40 +
   currencyMatch × 0.30 +
   dateMatch × 0.20 +
   referenceScore × 0.10) × 100
)
```

Where each factor is either `1.0` (match) or `0.0` (no match).

The weights are hardcoded constants and are not configurable per context.

### Possible scores

For **EXACT**, **TOLERANCE**, and **DATE\_LAG** rules, every component is binary, so the confidence score is always one of these values:

**0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100**

For these rule types, intermediate values (e.g. 87, 72, 55) never occur. (For DATE\_LAG the reference component is always `0`, so its scores never include the final 10 points.)

For **FUZZY** rules this does not hold. Because the reference component is a continuous `ReferenceScore` (0.0–1.0), FUZZY matches can produce intermediate scores such as **97** or **99**. Note that regardless of the resulting score, a FUZZY match is **never auto-confirmed** — see [FUZZY matches never auto-confirm](#fuzzy-matches-never-auto-confirm).

## Calculation examples

***

### Exact match (score: 100)

Two transactions with identical values on the same day:

| Component | Comparison                 | Points |
| --------- | -------------------------- | ------ |
| Amount    | $1,000.00 vs $1,000.00 ✓   | 40     |
| Currency  | USD vs USD ✓               | 30     |
| Date      | 2024-01-15 vs 2024-01-15 ✓ | 20     |
| Reference | PAY-001 vs PAY-001 ✓       | 10     |

**Final Score: 100** → Auto-confirmed

### High confidence match (score: 90)

All fields match except reference:

| Component | Comparison                 | Points |
| --------- | -------------------------- | ------ |
| Amount    | $1,000.00 vs $1,000.00 ✓   | 40     |
| Currency  | USD vs USD ✓               | 30     |
| Date      | 2024-01-15 vs 2024-01-15 ✓ | 20     |
| Reference | PAY-001 vs — ✗             | 0      |

**Final Score: 90** → Auto-confirmed

### Medium confidence (score: 70)

Amount and currency match, but date and reference do not:

| Component | Comparison                 | Points |
| --------- | -------------------------- | ------ |
| Amount    | $1,000.00 vs $1,000.00 ✓   | 40     |
| Currency  | USD vs USD ✓               | 30     |
| Date      | 2024-01-15 vs 2024-01-25 ✗ | 0      |
| Reference | PAY-001 vs REC-999 ✗       | 0      |

**Final Score: 70** → Needs review

### Low confidence (score: 40)

Only amount matches:

| Component | Comparison                 | Points |
| --------- | -------------------------- | ------ |
| Amount    | $1,000.00 vs $1,000.00 ✓   | 40     |
| Currency  | USD vs EUR ✗               | 0      |
| Date      | 2024-01-15 vs 2024-01-25 ✗ | 0      |
| Reference | PAY-001 vs REC-999 ✗       | 0      |

**Final Score: 40** → Exception (below 60)

## Confidence tiers

***

Matcher categorizes matches into tiers based on score:

| Tier (score)             | System behavior          | Typical volume (illustrative) |
| ------------------------ | ------------------------ | ----------------------------- |
| **Auto-Approved** (≥ 90) | Automatically confirmed  | 70-80%                        |
| **Needs Review** (60-89) | Queued for manual review | 15-25%                        |
| **Exception** (\< 60)    | Treated as unmatched     | 5-10%                         |

### How confidence tiers are applied

When Matcher proposes a match, it evaluates the confidence score and applies the following steps:

1. If the score is **90 or higher**, the match is automatically confirmed for EXACT and TOLERANCE rules; FUZZY and DATE\_LAG matches always require manual review.
2. If the score is **between 60 and 89**, the match is queued for manual review.
3. If the score is **below 60**, no match is created and the transaction becomes an exception.
4. Reviewed matches can be either confirmed or rejected, updating their final status.

This ensures high-confidence matches flow automatically while keeping human control where it matters.

### FUZZY matches never auto-confirm

The auto-confirm behavior above applies to EXACT and TOLERANCE rules; FUZZY and DATE\_LAG matches always require manual review. Matches produced by **FUZZY** rules are **never auto-confirmed**, regardless of their confidence score — even a FUZZY match scoring 90 or above is always queued for manual review.

This is by design: a fuzzy reference only contributes the 10% reference slot, so the financial fields (amount + currency + date) alone can already reach the 90 threshold. Capping FUZZY below auto-confirm guarantees that a human reviews the fuzzed reference before the match is committed — "fuzzy proposes, never commits."

## Confidence thresholds

***

Matcher uses fixed thresholds to determine how matches are handled:

| Threshold    | Score | Behavior                                           |
| ------------ | ----- | -------------------------------------------------- |
| Auto-confirm | >= 90 | Match is automatically confirmed                   |
| Match        | >= 60 | Match is proposed for manual review                |
| Exception    | \< 60 | No match created; transaction becomes an exception |

These thresholds are not configurable per context.

## Weights

***

The component weights (40/30/20/10) are hardcoded constants. They cannot be adjusted per context or per rule.

| Component | Weight | Rationale                                                       |
| --------- | ------ | --------------------------------------------------------------- |
| Amount    | 40%    | Amount is the strongest indicator of a valid match              |
| Currency  | 30%    | Currency mismatch usually means different transactions          |
| Date      | 20%    | Date proximity adds confidence but allows for settlement delays |
| Reference | 10%    | References are helpful but often missing or inconsistent        |

## Best practices

***

<AccordionGroup>
  <Accordion title="Monitor tier distribution">
    Track the percentage of transactions in each tier. Unusual shifts may indicate data quality issues or rule misconfiguration.
  </Accordion>

  <Accordion title="Use dry-run mode to test rules">
    Since confidence depends on which rules match, always dry-run rule changes before committing. This prevents unexpected increases in manual review volume.
  </Accordion>

  <Accordion title="Review matches near the 60-point boundary">
    Periodically review matches just above the exception threshold. These often reveal opportunities for rule improvements.
  </Accordion>

  <Accordion title="Understand scores as rule outcomes">
    For EXACT, TOLERANCE, and DATE\_LAG rules, scoring is binary, so a score of 70 means exactly "amount + currency matched, date + reference did not." Use this to diagnose matching issues. FUZZY rules are the exception: their graded reference component can yield intermediate scores (e.g. 97), so a FUZZY score should be read as "financial fields matched plus a partial reference similarity."
  </Accordion>
</AccordionGroup>

## Next steps

***

<Card title="Match Rules" icon="scale-balanced" href="/en/matcher/configuration/matcher-match-rules" horizontal>
  Configure rules that influence scoring.
</Card>

<Card title="Multi-Currency" icon="coins" href="/en/matcher/reference/matcher-multi-currency" horizontal>
  How FX affects confidence scoring.
</Card>
