> ## 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 calculates a 0–100 confidence score from amount, currency, date, and reference checks to grade every match.

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/UsUgoha8b-OkDZPH/images/en/docs/matcher-confidence-scoring.jpg?fit=max&auto=format&n=UsUgoha8b-OkDZPH&q=85&s=bf02027246a02be02441043209ba9e62" alt="Matcher Confidence Scoring" width="1204" height="1297" data-path="images/en/docs/matcher-confidence-scoring.jpg" />
</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 | Match     | No match |
| --------------- | ------ | --------- | -------- |
| Amount match    | 40%    | 40 points | 0 points |
| Currency match  | 30%    | 30 points | 0 points |
| Date proximity  | 20%    | 20 points | 0 points |
| Reference match | 10%    | 10 points | 0 points |

### 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 allows up to `maxDays` difference.

### Reference match (10%)

Reference comparison is also binary.

| Condition                                    | Score     |
| -------------------------------------------- | --------- |
| References match (exact or case-insensitive) | 10 points |
| References do not match or are absent        | 0 points  |

## 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

Because each component is binary, the confidence score is always one of these values:

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

Intermediate values (e.g. 87, 72, 55) never occur.

## Calculation examples

***

### Exact match (score: 100)

Two transactions with identical values on the same day:

| Component | Source     | Target     | Match? | Points |
| --------- | ---------- | ---------- | ------ | ------ |
| Amount    | \$1,000.00 | \$1,000.00 | Yes    | 40     |
| Currency  | USD        | USD        | Yes    | 30     |
| Date      | 2024-01-15 | 2024-01-15 | Yes    | 20     |
| Reference | PAY-001    | PAY-001    | Yes    | 10     |

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

### High confidence match (score: 90)

All fields match except reference:

| Component | Source     | Target     | Match? | Points |
| --------- | ---------- | ---------- | ------ | ------ |
| Amount    | \$1,000.00 | \$1,000.00 | Yes    | 40     |
| Currency  | USD        | USD        | Yes    | 30     |
| Date      | 2024-01-15 | 2024-01-15 | Yes    | 20     |
| Reference | PAY-001    | —          | No     | 0      |

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

### Medium confidence (score: 70)

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

| Component | Source     | Target     | Match? | Points |
| --------- | ---------- | ---------- | ------ | ------ |
| Amount    | \$1,000.00 | \$1,000.00 | Yes    | 40     |
| Currency  | USD        | USD        | Yes    | 30     |
| Date      | 2024-01-15 | 2024-01-25 | No     | 0      |
| Reference | PAY-001    | REC-999    | No     | 0      |

**Final Score: 70** → Needs review

### Low confidence (score: 40)

Only amount matches:

| Component | Source     | Target     | Match? | Points |
| --------- | ---------- | ---------- | ------ | ------ |
| Amount    | \$1,000.00 | \$1,000.00 | Yes    | 40     |
| Currency  | USD        | EUR        | No     | 0      |
| Date      | 2024-01-15 | 2024-01-25 | No     | 0      |
| Reference | —          | —          | No     | 0      |

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

## Confidence tiers

***

Matcher categorizes matches into tiers based on score:

| Tier              | Score Range | System Behavior          | Typical Volume |
| ----------------- | ----------- | ------------------------ | -------------- |
| **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.
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.

## 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">
    Because scoring is binary, a score of 70 means exactly "amount + currency matched, date + reference did not." Use this to diagnose matching issues.
  </Accordion>
</AccordionGroup>

## Next steps

***

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

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