Appearance
Extraction Tiers
Waspada AI uses a two-tier extraction system that balances speed, accuracy, and resource usage.
Tier 1: Regex Engine (Deterministic)
Always available. Zero model download required.
The regex engine runs instantly and handles the majority of Malaysian financial document patterns:
| Pattern | Example | Regex |
|---|---|---|
| Malaysian NRIC | 880101-14-5678 | \d{6}-\d{2}-\d{4} |
| Bank Account (8-17 digits) | 1234567890 | \d{8,17} |
| SWIFT/BIC Code | MBBEMYKL | [A-Z]{4}MY[A-Z0-9]{2} |
| Phone (MY format) | +60123456789 | \+?60\d{9,10} |
| URLs | https://scam.com | Standard URL regex |
| Transaction Amount | RM 1,500.00 | RM\s*[\d,]+\.?\d* |
Supported Banks (BIC Resolution)
| Bank | BIC Code |
|---|---|
| Maybank | MBBEMYKL |
| CIMB | CIBBMYKL |
| Public Bank | PBBEMYKL |
| Hong Leong | HLBBMYKL |
| RHB | RHBBMYKL |
| AmBank | AMMBMYKL |
| Bank Islam | BIMBMYKL |
| Bank Rakyat | BKRMMYKL |
| Alliance Bank | AFBQMYKL |
| Affin Bank | ARBKMYKL |
| OCBC | OCBCMYKL |
| UOB | UOBBMYKL |
| HSBC | HBMBMYKL |
| Standard Chartered | SCBLMYKX |
| BSN | BSNAMYK1 |
| Agrobank | AGOBMYKL |
| Bank Muamalat | MBABOREA |
| GXBank | GXSPMYKL |
| Touch 'n Go | TNGDMYNB |
Measured Accuracy (CI gate)
Corpus 2026-07-11 — 37 synthetic Malay receipt layouts (Tier-1 regex).
Gate: precision ≥ 0.90 and recall ≥ 0.85 on account + BIC.
| Field | Support | Precision | Recall | F1 |
|---|---|---|---|---|
| mule_account_number | 29 | 100% | 100% | 100% |
| mule_bank_bic | 32 | 100% | 100% | 100% |
| scammer_alias | 35 | 100% | 100% | 100% |
| malicious_urls | 3 | 100% | 100% | 100% |
Full extraction metrics write-up (including NER/OCR gate limits and DuitNow QR handling) available on request.
CI gate scope
The gate measures Tier-1 regex on clean labeled text only. It will not fail if the DistilBERT NER model regresses after a dependency bump. Full-pipeline / OCR eval stays on the private corpus until a pinned model artifact is CI-cacheable.
DuitNow QR (no account on the slip)
Many DuitNow QR receipts never show a recipient account number — only a name and sometimes a bank/e-wallet. The eval corpus labels those as mule_account_number: null on purpose. Inventing an account from a DuitNow reference ID is a false positive. Product response: extract alias/BIC when present, keep disposition advisory, and ask the user for a second (account-transfer) slip when possible.
Tier 2: NER Engine (AI-Powered)
Available after background model download (~40MB).
The NER engine uses a quantized DistilBERT model to extract entities that regex cannot reliably identify:
| Entity Type | NER Label | Maps To |
|---|---|---|
| Person name | PER | scammer_alias |
| Organization | ORG | mule_bank_bic (via bank name lookup) |
When Tier 2 Activates
Tier 2 only runs when Tier 1 results are incomplete:
Regex extracts account + BIC + alias → REGEX_ONLY (skip NER)
Regex extracts account + BIC only → Run NER for alias → HYBRID
Regex extracts nothing → Run NER for all → NER_ENCODERPerformance Optimization
For 95%+ of digital bank receipts, Tier 1 Regex is sufficient. The NER model is only invoked for ambiguous, informal, or handwritten evidence where regex patterns fail.
Extraction Tier Labels
| Tier | Meaning | Typical Latency |
|---|---|---|
REGEX_ONLY | All indicators extracted by regex | < 10ms |
NER_ENCODER | NER model used for extraction | 100-200ms |
HYBRID | Regex + NER combined | 100-200ms |