Retail Facial Tracking · 13 / 26

Databricks Data and AI (artificial intelligence) Platform

How Databricks holds the retail platform's anonymous aggregates, event data, policy index, model training and validation, tracing and evaluation, without images or templates.

What Databricks does here

Databricks lakehouse for the retail face platform Anonymous counts, gate and match events without faces, consent and deletion records, and evaluation results land in Unity Catalog as bronze, silver and gold tables, with a policy index, features and masks. Models are trained and validated on consented, balanced data with MLflow and registered, and a gated process deploys approved versions to edge appliances. Model Serving handles offline and non-real-time use only. Anonymous counts zone · slice · number Gate and match events no faces · banded scores Software traces from the gateway Unity Catalog · retail_prod bronze · silver · gold knowledge · features · masks Training and validation MLflow · subgroup tests Model registry gated promotion Evaluation tracing · scorecards validate
One governed platform holds the aggregates, the models, their validation and the evaluation loop. Matching runs on the edge, not here, and no image or template is stored here.

Databricks is the data and AI platform for development and monitoring. It keeps anonymous counts and face-free event data in governed tables, trains and validates the matcher and the spoof detector on consented, balanced data with subgroup checks, registers approved versions for a gated release to edge appliances, and provides tracing and evaluation. Member references are masked by role, and templates and images never enter the lakehouse.

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
bronzeAnonymous counts, gate events and traces as receivedData engineers
silverCleaned counts, consents, match proposals, deletions and model outputs, with member references maskedEngineers and analysts, with masks
goldEvaluation sets, fairness reports, KPIs (Key Performance Indicators) and device health viewsPrivacy, quality and evaluation teams
knowledgePrivacy policy and notice index and its source tableThe documentation service principal
securityScan results and security events from the gatewaySecurity operations

Protecting member references in the table

Row filters and column masks make the rule part of the table. Analysts see a masked reference; a privacy steward sees it for an approved review.

Unity Catalog · masks and row filters
-- Member ids and consent detail are masked except for approved roles
CREATE FUNCTION retail_prod.silver.mask_member(value STRING)
  RETURN CASE WHEN is_account_group_member('privacy_stewards') THEN value ELSE '***' END;

ALTER TABLE retail_prod.silver.match_proposals
  ALTER COLUMN member_ref SET MASK retail_prod.silver.mask_member;
ALTER TABLE retail_prod.silver.consents
  ALTER COLUMN member_ref SET MASK retail_prod.silver.mask_member;

-- Store teams see only their own store
CREATE FUNCTION retail_prod.silver.store_filter(store STRING)
  RETURN is_account_group_member('retail_global') OR is_account_group_member(CONCAT('store_', store));
ALTER TABLE retail_prod.silver.count_records
  SET ROW FILTER retail_prod.silver.store_filter ON (store_id);

The policy index

Privacy policies, notices, retention rules and regulator guidance are chunked by clause, tagged with jurisdiction, version and effective dates, and stored in a gold table. A Vector Search index (the product is now branded Databricks AI Search) syncs from that table, so a policy change updates the index without a rebuild. The copilot filters by jurisdiction and effective date at query time, so it cannot cite a superseded notice or another country's rule.

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

index = VectorSearchClient().get_index(
    endpoint_name="retail-knowledge",
    index_name="retail_prod.knowledge.policies_index",
)

def search_policies(question: str, jurisdiction: str, on_date: str) -> list[dict]:
    hits = index.similarity_search(
        query_text=question,
        columns=["clause_id", "title", "text", "version", "source_url"],
        filters={"jurisdiction": [jurisdiction, "all"], "effective_from <=": on_date, "effective_to >=": on_date},
        num_results=5,
    )
    return hits["result"]["data_array"]
A policy changes and the index follows The privacy office publishes an amended notice with a version and 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. Privacy office Lakeflow job Source table Vector Search Privacy copilot publish amended notice 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 policy changes and the index follows

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

Training, validation and release of models

Training with MLflow

Experiments, datasets and code are tracked, so every model version is traceable to its consented data.

Subgroup validation

False match, false non-match and spoof-detection rates are reported with confidence intervals by permitted group, including skin tone, age and sex, before a version can be promoted.

Gated promotion

A model moves through the registry only with passing privacy, accuracy, fairness and fault-injection results and sign-off under change control.

Edge deployment

Approved versions are packaged and staged to edge appliances through a controlled, reversible release, never directly from the cloud.

Jobs that keep it current

JobScheduleWhat it does
Ingest anonymous countsContinuousLands counts in bronze and upserts silver, enforcing suppression
Ingest gate and match eventsContinuousLands events without faces or templates
Refresh policy indexOn change, daily checkRe-chunks changed policies, writes the source table and syncs the index
Reconcile templates and consentsNightlyCompares the register with active consents and raises orphans
Retrain and validate modelsOn demand, gatedTrains candidates on consented data, evaluates by group and registers them; promotion needs the gate
Nightly evaluationNightly and on every releaseRuns the evaluation set, writes scores and alerts on regressions
Fairness reportQuarterlyReports error rates by permitted group for the quality review
Nightly evaluation job A nightly job runs the evaluation set through the documentation assistant and the advisors, 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 v6 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 speculative and not a recommendation to deploy, but the same pattern, consent first, a deterministic privacy gate, a governed gateway, runtime security, advisory-only AI and measured fairness, fits any service that handles sensitive personal data. We can scope a pilot on your own systems.

Book a discovery call