Duplicate invoice signal

Check whether an invoice is the same as one already received, despite a resend, a new number format or a different file.

F@f

Problem

Suppliers resend invoices as reminders, with new file names or slightly different numbers. Exact-match checks miss them, and the same invoice gets paid twice.

Goal

Hold likely duplicates for a person before approval.

Input / state

The new invoice header and candidates found in code by supplier and amount.

invoice
Supplier, invoice number, date, amount and description.
candidates
Recent invoices from the same supplier with similar amounts, found in code.

Decision question

NoulQuestion key duplicate_invoice

Is this the same invoice as one of the candidates already received?

What counts as yes and no

  • trueSame supplier, goods or services and period, even if the number, date format or file differs.
  • falseA different invoice, such as the next month's recurring invoice.

Allowed outcomes

Decided in your code from the answer and its confidence. Thresholds are yours to set and test.

  • Hold as duplicateProbability of yes is above your upper threshold.
  • UnclearProbability falls between your two thresholds.
  • Not a duplicateProbability of yes is below your lower threshold.

Example scenarios

Predefined demonstrations. No model is called; the outcome shown is an illustrative judgment.

Example state

{
  "invoice": {
    "amount": 640,
    "number": "INV-0118",
    "supplier": "Printshop",
    "description": "Brochures, April"
  },
  "candidates": [
    {
      "amount": 640,
      "number": "INV-118",
      "description": "Brochures April"
    }
  ]
}

Outcome

Illustrative
Hold as duplicate

Probability of yes is above your upper threshold.

Why

Same supplier, amount and service with a reformatted number.

Using it well

  • Find candidates in code by supplier and amount range; this question only compares a handful.
  • Recurring invoices for the same amount are the most common false alarm. Include the service period.

Request definition

POST https://api.typesafe.ai/v1/systemone
{
  "model": "jev-latest",
  "state": {
    "invoice": "<invoice>",
    "candidates": "<candidates>"
  },
  "questions": {
    "duplicate_invoice": {
      "type": "noul",
      "instructions": "Is this the same invoice as one of the candidates already received?",
      "criteria": {
        "true": "Same supplier, goods or services and period, even if the number, date format or file differs.",
        "false": "A different invoice, such as the next month's recurring invoice."
      }
    }
  }
}

Request shape from the System One API reference; a Kev server accepts the same body. Replace the placeholder state with your data. Requests need your own API key or server.

Version History

v1Current Versionabout 8 hours ago@f

Initial version

Comments (0)