Mobile Betting · 13 / 26

Databricks Data and AI (artificial intelligence) Platform

How Databricks holds the mobile betting platform's governed data, features, terms index, model serving, tracing and evaluation.

What Databricks does here

Databricks lakehouse for the mobile betting platform Account, bet and results extracts, session streams and agent traces land in Unity Catalog as bronze, silver and gold tables, with a terms index, features and masks on identity, location and behaviour data. Model Serving hosts harm, fraud and integrity models, and the agent application and MLflow tracing and evaluation read and write the governed tables. Account and bet extracts players · bets · wallets Session streams and results events · feeds Agent traces from the gateway Unity Catalog · betting_prod bronze · silver · gold knowledge · features · masks Model Serving harm · fraud · integrity Agent app retrieval + tools MLflow tracing · evaluation
One governed platform holds the data, features, the terms index, the serving endpoints and the evaluation loop.

Databricks is the data and AI platform for the betting platform. It keeps operational copies, features and decisions in governed tables, builds the terms index from the rules, serves the harm, fraud and integrity models and provides tracing and evaluation. The bet path and the orchestrator run in the application tier, and language models are reached through the AI gateway.

Governance in Unity Catalog

One catalog per environment, with schemas by purpose. Access is granted to groups, never to individuals, and sensitive data is protected in the table, so every notebook, dashboard and evaluation job inherits the control.

SchemaContentsWho can read
bronzeRaw bet and session events, results feeds, KYC pointers, account and wallet extracts as receivedData engineers
silverCleaned players, bets, sessions, deposits, KYC cases, risk scores, interventions and cases, with identity, location and behaviour as sensitive columnsEngineers and analysts, with masks
goldFeatures, evaluation sets, KPIs (Key Performance Indicators) and bias and fairness reportsCompliance, safer gambling, fraud and evaluation teams
knowledgeTerms-and-rules index and its source tableThe agent service principal
securityScan results and security events from the gatewaySecurity operations

Protecting sensitive data in the table

Row filters and column masks make the rule part of the table. Analysts see a masked identifier; a safer gambling lead sees it for a case they own.

Unity Catalog · masks and row filters
-- Player identifiers, contacts and location are masked except for approved roles
CREATE FUNCTION betting_prod.silver.mask_sensitive(value STRING)
  RETURN CASE WHEN is_account_group_member('safer_gambling_leads') THEN value ELSE '***' END;

ALTER TABLE betting_prod.silver.players
  ALTER COLUMN email SET MASK betting_prod.silver.mask_sensitive;
ALTER TABLE betting_prod.silver.session_events
  ALTER COLUMN player_id SET MASK betting_prod.silver.mask_sensitive;

-- Jurisdiction teams see only their players
CREATE FUNCTION betting_prod.silver.jurisdiction_filter(jurisdiction STRING)
  RETURN is_account_group_member('betting_global') OR is_account_group_member(CONCAT('betting_', jurisdiction));
ALTER TABLE betting_prod.silver.players
  SET ROW FILTER betting_prod.silver.jurisdiction_filter ON (jurisdiction);

The terms-and-rules index

Terms, house rules and policies are chunked by clause, tagged with jurisdiction, effective dates and a version, and stored in a gold table. A Vector Search index (the product is now branded Databricks AI Search) syncs from that table, so a rule change updates the index without a rebuild. The copilot filters by jurisdiction and effective date at query time, so it cannot cite a rule from another market or an expired one.

knowledge/search.py · filters are enforced at query time
from databricks.vector_search.client import VectorSearchClient

index = VectorSearchClient().get_index(
    endpoint_name="betting-knowledge",
    index_name="betting_prod.knowledge.terms_and_rules_index",
)

def search_terms(question: str, jurisdiction: str, on_date: str) -> list[dict]:
    hits = index.similarity_search(
        query_text=question,
        columns=["clause_id", "title", "text", "jurisdiction", "source_url"],
        filters={"jurisdiction": [jurisdiction, "all"], "effective_from <=": on_date, "effective_to >=": on_date},
        num_results=5,
    )
    return hits["result"]["data_array"]
A rule changes and the index follows Compliance publishes an amended house rule with an effective date. A job parses and chunks it, writes the clauses with jurisdiction and dates to the source table, and the index syncs from that table. At question time the copilot searches with a jurisdiction and date filter. Compliance Lakeflow job Source table Vector Search Support copilot publish amended rule document change event parse, chunk by clause write clauses with jurisdiction and dates sync from change feed embed and index search + jurisdiction and date filter cited clauses
A rule changes and the index follows

No rebuild is needed. Effective dates make sure a rule applies only when it should.

Serving, the gateway and tracing

Model Serving

Hosts the harm-marker, fraud and integrity models behind endpoints with scaling, versioning and monitoring, separate from the language-model gateway.

AI Gateway on endpoints

Rate limits, usage tracking, guardrails, fallbacks and inference tables for served endpoints, to complement the enterprise gateway.

MLflow tracing

Spans for each retrieval, model call and tool call, logged with the case and trace identifier from the gateway.

Agent evaluation

Runs the evaluation set with built-in and custom judges, and stores results in a gold table for comparison across releases.

Jobs that keep it current

JobScheduleWhat it does
Stream bet and session eventsContinuousLands events in bronze and builds streaming features with pseudonymised player ids
Ingest account, wallet and results extractsEvery 15 minutesUpserts silver
Refresh terms indexOn rule change, daily checkRe-chunks changed rules, writes the source table and syncs the index
Refresh featuresContinuous and nightlyBuilds harm, fraud and integrity features
Retrain and validate modelsWeekly, gatedTrains, evaluates and registers candidate models; promotion needs the gate and a bias check
Nightly evaluationNightly and on every releaseRuns the evaluation set, writes scores and alerts on regressions
Intervention fairness reportMonthlyCompares intervention and restriction rates across permitted segments and writes the review table
Nightly evaluation job A nightly job runs the evaluation set through the agents and the gateway, records traces in MLflow, scores the results and writes them to a gold table. A regression raises an alert. Lakeflow job Agent app AI gateway MLflow Gold table Alert run dataset v8 model calls replies traces per case score with scorers and judges scores write scores by version compare with last release regression found
Nightly evaluation job

What the data answers

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