Financial Fraud & Anomaly Detection — Saifs AI
financial_anomalyFlag unusual ledger entries, possible duplicate payments and earnings-manipulation red flags for human review. Inputs: transactions (entry id, date, amount or debit / credit, vendor / party, invoice number, account, user; Tally / QuickBooks / ERP headers as exported), invoices, numbers + field_name (Benford only), financials (company-year statements), watch_snapshot (from the last run), item (to explain), approval_limits, job (benford_analysis, flag_anomalous_transactions, detect_duplicate_payments, earnings_manipulation_score, watch_transactions, explain_flag). Returns decision cards first, Benford digit tests with chi-square and Nigrini MAD, entries for review with reasons, duplicate groups and split invoices, Beneish M-Scores, drift alerts and an updated watch snapshot. Uses Benford's law, Beneish M-Score and robust z-scores. Flags for review; not an accusation, not proof, not an audit opinion. Not for ids or bounded numbers (Benford is refused), credit scoring, or judging individuals. Bigger exports: financial_anomaly_get_engine.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "financial_anomaly"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job | No | Omit to run everything the inputs allow. | |
| item | No | What to explain: entry id, invoice number, {'row': n} or {'company': name}. | |
| seed | No | ||
| as_of | No | ||
| forget | No | ||
| mapping | No | Header -> standard field overrides. | |
| numbers | No | A single column of measured amounts for a Benford test only. | |
| invoices | No | AP invoices (same fields), checked with transactions. | |
| peer_min | No | ||
| min_value | No | ||
| date_order | No | ||
| field_name | No | Name of the numbers column (used for applicability: ids, codes and rates are refused). | |
| financials | No | Company-year statements for the M-Score: company, year, sales, cogs (or gross profit), receivables, current_assets, ppe, total_assets, depreciation, sga, current_liabilities, long_term_debt, net_income, cfo (Schedule III names fine). | |
| max_listed | No | ||
| transactions | No | Ledger / payment / journal / expense rows as exported: entry id, date, amount (or debit / credit), vendor or party, invoice number, account, user, department, currency. No emails, phones or ID numbers. | |
| snapshot_salt | No | Optional secret that salts the snapshot's hashed keys; reuse it every run. | |
| watch_snapshot | No | watch_snapshot from the last run (counts and salted hashes only). | |
| approval_limits | No | Approval limits, e.g. [10000, 100000] - for split-invoice and just-below-limit checks. | |
| currency_symbol | No | Symbol on the cards, e.g. '₹' (lakh / crore grouping) or '$'. Default: the currency the data is written in. | |
| m_score_threshold | No | ||
| split_window_days | No | ||
| min_duplicate_amount | No | ||
| duplicate_window_days | No | ||
| exclude_financial_companies | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| watch | No | ||
| alerts | No | ||
| status | Yes | 1 = processed, 0 = refused (see decisions) | |
| benford | No | ||
| explain | No | ||
| message | No | ||
| metadata | Yes | ||
| decisions | Yes | Plain-language cards, priority order. Relay these first. | |
| disclaimer | Yes | Review-only framing; relay it with every answer. | |
| duplicates | No | ||
| assumptions | No | ||
| watch_snapshot | No | ||
| transaction_flags | No | ||
| data_quality_report | No | ||
| earnings_manipulation | No |