Kenneth Teh / Lead Engineer← Portfolio

Demonstration / Decision systems

Eligibility Lab: explainable rules for multi-market products

An interactive multi-market eligibility policy simulator comparing Singapore, EU, and US decisions with versioned rules, reason codes, review paths, and next-best actions.

Kenneth TehWorking model

Multi-market policy simulator

One applicant. Three materially different decisions.

Change the applicant once and evaluate the same normalized facts against three versioned market policies. Select any result to inspect the rule trace and customer path.

Policy version
2 eligible0 review1 ineligible
Normalized applicant facts
Decision matrixSame facts / v1
Selected decision / SG-V1

Eligible

All required rules passed with no manual-review conditions.

PASS Age threshold / 18+PASS Identity / National identity documentPASS Risk boundary / ≤ 72PASS Product tier / Standard
01

The product problem

Eligibility begins as a handful of conditions and quickly becomes a product system: market availability, age, identity state, address evidence, product configuration, and policy versions all interact. The backend must return more than yes or no; product, mobile, support, risk, and QA need to understand the same decision.

02

The model

Normalize inputs once, evaluate explicit versioned rules, and return stable reason codes alongside the decision. Persist the inputs, rule version, outcome, and reasons as one audit event so the system can explain what it knew at decision time.

  • Separate fact collection from policy evaluation.
  • Make rule order and precedence explicit.
  • Return reason codes that are safe for downstream product flows.
  • Version policies so historical decisions remain reproducible.
03

How I would test it

Start with decision tables, then generate boundary cases around every threshold and market difference. Add invariants—for example, identical normalized inputs and rule versions must always produce identical results—and retain counterexamples as regression tests.

04

What this demonstrates

Product judgment belongs in the contract. A good eligibility API makes complex policy legible, gives support teams useful evidence, allows QA to reason about coverage, and lets the business evolve rules without turning every change into an incident.