Skip to main content
Matcher can propose config-only match rules from a context’s history using AI, but AI output is never authoritative. Producing a suggestion creates no rule. Matcher creates a rule only when a human approves a suggestion. This guide covers the human-in-the-loop (HITL) rule-suggestion queue.
When Lerian enables rule suggestions for your environment, Matcher sends each suggestion request to the language-model provider Lerian configures for your environment. When the feature is not available in your environment, the operation answers 503. The payload is aggregates only. No raw transaction, money, or PII leaves Matcher.

Produce suggestions


Build aggregate, privacy-safe history features for a context, ask the AI advisor for candidate rules, and enqueue each surviving candidate in the review queue.
The response returns the newly created PENDING_REVIEW reviews (producing them creates no rule):
Candidate types come from the closed vocabulary: EXACT (strict equality), TOLERANCE (within an amount band), or DATE_LAG (allowing a settlement-date offset). The candidate is config only. It never carries a transaction, but its config can set monetary thresholds such as absTolerance.

List suggestions


Cursor-paginated list of rule suggestions for a context, optionally filtered by status.
Query parameters: status (PENDING_REVIEW, APPROVED, REJECTED), limit (1–200), and cursor. Reading the queue egresses nothing.

Approve a suggestion


Approving a PENDING_REVIEW suggestion creates the match rule through the deterministic configuration write path. This is the only path from an AI suggestion to an active match rule, and it runs only on explicit human approval.

Reject a suggestion


Rejecting a PENDING_REVIEW suggestion discards it and creates no rule. The request body is mandatory, but its reason field is optional (send {} to reject without a reason).
Matcher records the approving/rejecting principal for audit.

Lifecycle after approval


Once a suggestion is APPROVED, its createdRuleId links to a real match rule that participates in match runs exactly like a hand-authored rule. A review is a one-way state machine: a PENDING_REVIEW suggestion transitions to APPROVED or REJECTED once and cannot be re-decided. Attempting to re-decide, or to approve an already-linked review, returns 409. An approved candidate that fails validation returns 422.
Preview how a candidate rule would behave before you approve it with the read-only simulate endpoint. See Simulation.

Response codes