Mobile Betting · 03 / 26

Architecture Decisions for the Mobile Betting Platform

The overall decisions behind the mobile betting platform, recorded as ADRs (Architecture Decision Records): context, decision, consequences and alternatives.

How the decisions are recorded

Each decision is an architecture decision record (ADR): a short, dated document with its status, the context that forced the choice, the decision, the consequences and the alternatives rejected. These records cover the whole platform. The vendor pages that follow show how each choice is implemented.

Decision log

ADRDecisionStatusDate
ADR-001Eligibility, limits, odds, bet acceptance, settlement and payouts are deterministic code; models read, flag and draftAccepted2026-09-02
ADR-002All model traffic goes through one enterprise AI (artificial intelligence) gatewayAccepted2026-09-04
ADR-003Prisma AIRS scans every document, message, reply and tool call; writes fail closedAccepted2026-09-09
ADR-004Databricks is the data and AI platform, governed by Unity CatalogAccepted2026-09-11
ADR-005Protect first: protective actions are automatic, restrictive actions need a personAccepted2026-09-15
ADR-006Identity, location and gambling behaviour are classified as restricted and minimisedAccepted2026-09-18
ADR-007Keep the agent core portable: two reference builds behind one tool contractAccepted2026-09-23
ADR-008A release gate: no deploy unless the evaluation set passes, including safer gambling and fairness checksAccepted2026-09-30
ADR-009Marketing excludes at-risk and excluded players by hard rule; models can never widen exposureAccepted2026-10-06
ADR-010Harm detection is flag, intervene and escalate: no automatic account closure and no inducementsAccepted2026-10-09
ADR-011Add a player-facing assistant for questions about limits and toolsProposed2026-11-12

Status values: Proposed, Accepted, Superseded. Dates are the day the status last changed.

The records

ADR-001 Accepted

Eligibility, limits, odds, bet acceptance, settlement and payouts are deterministic code; models read, flag and draft

Context
These decisions are legal duties and money movements that regulators inspect. They must be reproducible, fast and independent of any probabilistic component.
Decision
The bet path, eligibility (age, location, exclusion), limits, odds, settlement from official results and payouts are code with unit tests and versioned rules owned by product, risk and compliance. Models read documents, flag markers of harm, fraud and suspicious betting, answer questions from the terms and draft from approved templates. A model never accepts a bet, sets odds, settles or pays.
Consequences
  • Results are reproducible for the same inputs.
  • Betting continues if every AI service is down.
  • A model upgrade cannot silently change an outcome.
Alternatives considered
  • Let a model decide eligibility or settlement (rejected: not reproducible, hard to defend to a regulator)
  • No models at all (rejected: documents, harm signals and support volume are the manual bottleneck)
ADR-002 Accepted

All model traffic goes through one enterprise AI gateway

Context
Teams would otherwise hold provider keys, pick models by name and log differently. Cost, scanning and provider changes would be solved many times, badly.
Decision
Applications call the gateway with a project key and a model alias. The gateway routes, retries, falls back, enforces budgets and rate limits, attaches metadata, applies guardrails and logs every call. Provider keys exist only in the gateway.
Consequences
  • One place to change a model or provider, validated by the evaluation set.
  • Budgets and guardrails apply by default.
  • The gateway is a critical dependency for AI features only, not for betting.
Alternatives considered
  • Direct provider SDKs (Software Development Kits) in each service (rejected: key sprawl, no shared controls)
  • A shared client library only (rejected: controls can be bypassed)
ADR-003 Accepted

Prisma AIRS scans every document, message, reply and tool call; writes fail closed

Context
Identity documents, chats and emails are untrusted input a model will read. Hidden instructions could try to pass verification, release a restriction or leak a player's data.
Decision
Runtime scanning sits on the gateway path and at the tool boundary. Extracted document text, retrieved terms, replies and tool arguments are scanned against a named profile. A block routes the item to a person. If scanning is unavailable, nothing that writes to an account or sends a message runs, while hard protections in code continue.
Consequences
  • Detection is consistent across every agent.
  • Added latency stays inside the interactive and batch budgets.
  • A scanning outage slows AI assistance, never protection.
Alternatives considered
  • Prompt-only defences (rejected: not enforceable)
  • Scan replies only (rejected: misses injection through documents and tools)
ADR-004 Accepted

Databricks is the data and AI platform, governed by Unity Catalog

Context
Account activity, features, cases, decisions, evaluation sets and the terms index are data with access rules. Splitting them splits the governance.
Decision
Keep operational copies, features, decisions and traces in Delta tables under Unity Catalog with masks on identity, location and behaviour data. Build the terms index with Vector Search from governed tables. Use MLflow for tracing and evaluation, model serving for harm, fraud and integrity models, and Lakeflow jobs for ingestion.
Consequences
  • One lineage and access model for data, features and models.
  • Analysts and evaluators use the tables the product writes.
  • Streaming feature freshness and quotas are design inputs.
Alternatives considered
  • A separate feature store, search service and warehouse (rejected: three access models)
ADR-005 Accepted

Protect first: protective actions are automatic, restrictive actions need a person

Context
Waiting for a person to suppress marketing to someone who is losing control is itself a harm. A wrongful restriction is also a harm. The two need different treatment.
Decision
Actions that reduce risk and are required by policy, such as suppressing marketing and bonuses, applying a reality check or enforcing a self-exclusion, run automatically by rule. Actions that restrict a player beyond the rules, lower limits without a request, hold funds, close an account or file a report need a named person within their authority. Goodwill and exceptions need approval.
Consequences
  • Protection is immediate where it is clearly safe.
  • Restriction is explainable and reviewable.
  • Specialists focus on the cases that need judgement.
Alternatives considered
  • Everything needs a person (rejected: protection arrives too late)
  • Everything automatic on a score (rejected: wrongful restriction cost too high)
ADR-006 Accepted

Identity, location and gambling behaviour are classified as restricted and minimised

Context
Gambling history can be stigmatising and identity and location data are sensitive. Copying them into prompts, logs and analytics would multiply the exposure.
Decision
Classify identity documents, dates of birth, location, behaviour and payment tokens as restricted. Send a model only what a step needs, mask by role in the lakehouse, keep telemetry free of content and keep documents for the regulated period only.
Consequences
  • Lower exposure in logs, evaluations and vendor tools.
  • Evaluation data needs a masked copy.
  • Some investigations need an approved, audited unmask step.
Alternatives considered
  • Log everything and restrict access later (rejected: the data would already be copied)
ADR-007 Accepted

Keep the agent core portable: two reference builds behind one tool contract

Context
Platform choices differ between teams and may change. The tool contracts and policies are what must stay stable.
Decision
Define the tools, policies and evaluation set once. Build a Microsoft Foundry version and a LangGraph version with LangSmith against the same contracts and run the same evaluation set on both.
Consequences
  • Switching or comparing frameworks is a measured change.
  • Two builds cost more to maintain, so one is primary and the other a reference.
  • Contracts must be strict enough to be portable.
Alternatives considered
  • Commit to one framework with no abstraction (rejected: lock-in on the least stable layer)
ADR-008 Accepted

A release gate: no deploy unless the evaluation set passes, including safer gambling and fairness checks

Context
Prompt, model and rule changes can quietly miss harm, over-restrict players or treat groups unequally.
Decision
Every change runs offline evaluation on a versioned set of documents, harm scenarios, fraud and integrity cases, support questions and marketing cases, including adversarial and fairness cases. Safety, accuracy, groundedness, fairness and cost must meet thresholds. Production traces are sampled into new cases.
Consequences
  • Regressions are caught before they touch a player.
  • The evaluation set needs steady care.
  • Fairness metrics need permitted data and careful interpretation.
Alternatives considered
  • Manual spot checks before release (rejected: does not scale and misses regressions)
ADR-009 Accepted

Marketing excludes at-risk and excluded players by hard rule; models can never widen exposure

Context
Personalised offers can harm vulnerable players. Whatever a propensity or copy model suggests, the operator's duty comes first.
Decision
Exclusion lists (self-excluded, in a cooling-off period, flagged at-risk, under review) are applied by rule when offers are decided and again at send time. A model may rank within the permitted set and fill approved templates, but it cannot add a player to a send, raise a bonus or choose a time to send based on a harm marker. Copy is checked against advertising rules and approved by a person.
Consequences
  • The duty of care is enforced twice, in code.
  • Less personalisation, by design.
  • Exclusion data must be fresh at send time.
Alternatives considered
  • Let models optimise offers freely (rejected: unacceptable risk of exploiting vulnerable players)
  • No personalisation (rejected: leaves value on the table for low-risk players)
ADR-010 Accepted

Harm detection is flag, intervene and escalate: no automatic account closure and no inducements

Context
Models can miss harm and can wrongly flag people. A flag is a reason to look, not a conclusion.
Decision
Harm-marker models score sessions and accounts with reasons. Rules decide which approved intervention applies. High markers open a task for a specialist. No model closes an account, forfeits funds or sends text that urges play. Every score and action is recorded for the regulator.
Consequences
  • Players get a respectful, early nudge and a human when it matters.
  • Specialist capacity bounds how many cases are open.
  • Some harm is found later than a hard block would find it.
Alternatives considered
  • Automatic restrictions at a score (rejected: wrongful restriction cost too high)
  • Review everything after the fact (rejected: too late)
ADR-011 Proposed

Add a player-facing assistant for questions about limits and tools

Context
Players ask how limits, breaks and exclusion work. A grounded assistant could answer instantly and make tools easier to find.
Decision
Proposed: reuse the support copilot behind the app, read-only, able to explain tools and open the limit settings but never to change them for the player. Not accepted yet: it must never encourage play, and its handling of players in distress must be tested with specialists in a pilot.
Consequences
  • Same controls apply to a new channel.
  • Wording and escalation need specialist review.
  • Pending a pilot with safer gambling specialists.
Alternatives considered
  • Agent-facing copilot only (deferred: leaves common questions unanswered at night)

The principles behind them

Protect first

Where an action reduces risk and policy requires it, it happens at once. Where it restricts a player, a person decides.

Models propose, code disposes

Anything that accepts a bet, moves money or changes a player's status is decided by tested code or a person.

Never exploit

No model may be used to increase spend, extend a session or time an offer using a harm marker.

Measure before shipping

Safety, accuracy, fairness and cost are tested on every change, not argued about.

Build this for your business

This example is a player protection and operations platform for a licensed betting operator, but the same pattern, deterministic rules for every hard duty, a governed gateway, runtime security, protect-first automation and measured quality, fits any regulated, customer-facing service. We can scope a pilot on your own systems.

Book a discovery call