Peter Parker

Portfolio

Peter Parker

Production machine learning and applied AI, with the numbers to check.

Built in health and government, and most of it stays behind a wall. These projects put the work where it can be inspected: each one is built to end with a measured result in a table, reproducible from its public repository with one command.

The projects

Twenty projects, one standard.

A repository turns public only when it has a measured result to show, and its page here carries that result the same day. Until then a project may carry a plain-language page on what it will measure.

Click a project's name to open its page: how it works in full, its measured results where the repository is public, and the link to its repository. A name that is not a link has no page yet.

01 Shipped

Spend It Where It Changes the Outcome

Tells an organisation which customers, cases or patients to spend a limited intervention budget on: only the ones whose outcome the intervention actually changes. Retention offers, outreach, fraud review, clinical follow-up: a large share of every such budget goes to people who would have behaved the same way regardless. Ranking by risk finds a different list, and usually the wrong one.

  • Rosenbaum bounds and E-values
  • uplift modelling, not risk ranking
  • Dragonnet neural network (PyTorch)
  • budget-constrained allocation
  • LightGBM meta-learners (S/T/X/DR/R)
  • Qini and realised policy value
  • bootstrap interval on every score
  • Polars pipeline, committed seeds
02 Shipped

Model Selection at a Tenth of the Cost

Answers "which AI model should we use, and did the new version get worse?" with statistical confidence, using a fraction of the evaluation calls a full benchmark needs. For a team re-evaluating models every month, that is a day instead of a week and tens of dollars instead of thousands, and it names the benchmark questions that were never measuring anything.

  • adaptive testing, Fisher information
  • item response theory (2PL/3PL)
  • marginal maximum likelihood by EM
  • items needed per effect size
  • item bank, public per-item results
  • contamination: release-date DIF
  • local dependence, dimensionality
  • test-retest, position bias, framing
03 Live

AI Release Gate

No prompt or model change reaches users unless it is proven not to have regressed: the discipline a test suite gives code, applied to AI, with an audit trail a regulator can read. Includes a public month-by-month record of how the major vendors' "frozen" models silently change, the evidence teams wish they had when something breaks.

  • LLM evaluation platform (Python)
  • FastAPI and DuckDB dashboard
  • LLM-as-judge, calibrated by kappa
  • paired non-inferiority tests
  • bootstrap CIs and power analysis
  • CI release gate (GitHub Actions)
  • red-teaming: PII, prompt injection
  • OpenTelemetry tracing, Azure
04 Live

Inside the Boundary, On the Record

An AI gateway that lets a bank, insurer, hospital or government department use frontier AI models without personal data ever leaving the boundary, with a tamper-evident record of every call and a hard cap on every team's spend. The blocker most regulated organisations cite for AI adoption, removed, with the latency overhead measured rather than promised.

  • data-residency routing per request
  • provider routing by configuration
  • per-team budgets enforced pre-call
  • span and cost record per call
  • hash-chained, tamper-evident log
  • reversible PII redaction (Presidio)
  • semantic cache on Redis and pgvector
  • latency overhead per control
05 In progress

Every Promise in the Loan Agreement, Checked

Reads a three-hundred-page credit agreement, resolves the private dictionary of defined terms behind each covenant, and computes every promise the borrower's own filed accounts can support. The ones they cannot are cited and handed to a person rather than guessed at. A lender doing this by hand across hundreds of positions finds out about a breach a quarter late; this finds out the quarter it happens.

  • multi-hop retrieval over credit agreements
  • defined-term resolution
  • table-aware chunking
  • hybrid retrieval (BM25 plus dense)
  • cross-encoder reranking
  • covenant arithmetic checked against filings
  • verifier tested by mutation
06 Shipped

Frontier Quality at a Fraction of the Bill

Proves, with measurements, that a small model an organisation owns and hosts matches a frontier API on a high-volume task at a small fraction of the per-call cost, and shows exactly at what volume the switch pays for itself. For a team spending five figures a month on API calls, this is the project that finds most of it, with a calculator for your own prices.

  • QLoRA fine-tuning (PyTorch, PEFT)
  • vLLM and llama.cpp serving
  • AWQ / GPTQ / GGUF quantisation
  • break-even volume by utilisation
  • throughput at four concurrencies
  • structured extraction, XBRL truth
  • Pareto of quality, latency and cost
  • non-inferiority against the API
07 Live

Hundreds of Pages, Redacted in an Afternoon

An access-to-information request means days of staff reading every page. This turns it into hours of review. Rules, then Jev, an AI decision model, propose each redaction with the exemption it rests on, and a person approves every page with a full audit log. It also publishes what blunt PII tools never show: how often it keeps what must stay.

  • context-dependent PII redaction
  • Jev, a calibrated AI decision model
  • leak rate per category, with CIs
  • over-redaction published
  • layout parsing and OCR (PyMuPDF)
  • PDF text-layer leak test
  • rules, then Jev on the rest
  • reviewer workflow, audit log
08 Shipped

How Many Crews, and How Sure

Forecasts demand (emergency-department arrivals, call volume, orders) with uncertainty ranges that actually hold when conditions shift, and turns them into a staffing number at a chosen service level. Overstaffing costs money and understaffing costs patients or customers; this puts a defensible number on both, site by site, rolling up to the region.

  • hierarchical probabilistic forecasting
  • skill against seasonal naive
  • adaptive conformal intervals
  • LightGBM, N-HiTS, PatchTST, TimesFM
  • statistical baselines
  • CRPS and pinball loss
  • MinT reconciliation
  • staffing cost against an oracle
  • coverage held through a shift
09 Shipped

Real-Time Fraud and Risk Decisioning Platform

Scores every transaction in under 50 milliseconds, thousands per second, before the money moves, and keeps working as fraud patterns shift, without the training-versus-production mismatch that quietly breaks most deployed models. The platform around the model is what organisations are actually missing, and this one ran live for thirty days behind a public dashboard.

  • Kafka-compatible streaming (Redpanda)
  • point-in-time leakage test
  • thousands of events per second
  • Feast store, online/offline parity
  • XGBoost and FT-Transformer (PyTorch)
  • p99 under fifty milliseconds
  • shadow deployment and rollback
  • expected-loss review queue
10 Shipped

From Failure to Reviewed Fix, in Minutes

When a production system fails, this captures the failure with its context, groups twenty symptoms of one bug into one ticket, writes a failing test that proves the bug, drafts the fix, has a second AI review it adversarially, and hands an engineer a ready-to-approve pull request. Triage in minutes instead of days, engineers back on new work, and nothing changes without a person saying yes.

  • agentic incident triage (LangGraph)
  • failing test before any fix
  • confidently-wrong rate published
  • failure clustering into one ticket
  • adversarial second-vendor review
  • honest hit rate on hidden tests
  • confidence routing with thresholds
  • human-gated pull requests
11 Live

Overload: AI Coaching Team for Runners

A coaching team for runners: AI specialists in injury prevention, fitness and race planning report each week to a head coach that writes next week's plan from what was actually run, and talks it through before anything is committed. Built by a data scientist and race-winning road runner after years on Garmin, Strava and TrainingPeaks.

  • Opus head coach, Sonnet specialists
  • VDOT from every training run
  • human-approved plans, costed per call
  • LangGraph coaching staff
  • pace corrected for heat, sun, hills
  • guardrails in code, not prompts
  • Strava, Garmin and Open-Meteo
  • race projection and age grading
12 Live

The Whole Field, Called Before the Gun

Before the gun, a predicted finish time and placing for every registered runner in a field of thousands, from their public race history, published in advance, with the error published once the results are in. For a runner that is a goal time with an honest range instead of a hunch; for a race director it is pacing, corral and medical staffing planned from expected finish times rather than guesses.

  • Bayesian hierarchical model (PyMC)
  • rolling-origin backtest
  • LightGBM quantile challenger
  • conformal prediction intervals
  • Monte Carlo placing simulation
  • bootstrap intervals throughout
  • course, heat and wind effects
  • predictions hashed before the gun
13 In progress

Grounded Email Response Drafting

For an inbox that receives hundreds of thousands of enquiries a year, a draft reply for each one, grounded in the organisation's own documents, with every claim cited to the passage that supports it and a clear escalation when the documents cannot answer. A person reads, edits and sends; the system sends nothing. Minutes per reply instead of tens of minutes, at cents per draft, with faithfulness measured against the passages rather than hoped for.

  • grounded response drafting
  • FastAPI reviewer UI
  • cents per draft
  • hybrid retrieval over a policy corpus
  • LangGraph triage and drafting
  • human approval before sending
  • citation precision and coverage
  • faithfulness with a calibrated judge
  • escalation when policy is silent
14 Live

Verified Media Briefing

One product, configured per team in a few lines, that reads the day's news and social feeds, groups every report of an event into one story by meaning, ranks what matters to that audience, and delivers a short briefing with every claim cited and every quote checked against its source. One system in place of dozens of people doing this by hand, for a few dollars a month each, with measured precision and recall.

  • LangGraph on GCP Cloud Run
  • RSS, GDELT, Bluesky and X
  • multi-source ingestion
  • cited summarisation
  • DuckDB storage
  • quote verification against source
  • per-audience relevance ranking
  • precision and recall on a labelled week
  • semantic story clustering
15 Live

Share the Data, Not the People

Hand a synthetic copy of a sensitive dataset to a partner, a vendor or a research team without handing over anyone in it, with the proof attached: each copy is attacked the way a regulator says and the way a researcher would, and the report says what it gives away, how well models trained on it work on the real data, and which settings to use. Seven synthesisers, three public datasets of real people, every number with its interval.

  • synthetic data, seven methods
  • differential privacy, AIM and MST
  • singling out, linkability, inference
  • membership inference attacks
  • train-on-synthetic, test-on-real
  • epsilon-utility-risk surface
16 Live

Forms That Read Themselves

A vision-language model you own, fine-tuned to type your scanned forms in, measured against the frontier multimodal APIs and the classic OCR pipelines on more than 9,000 public pages with known answers. Every field right or wrong with its interval, cost per thousand pages, what breaks on a new form design or a bad scan, and how many fields a person still checks at 99 percent.

  • vision-language models
  • multimodal QLoRA, Gemma 4 2B and 4B
  • frontier multimodal baselines
  • OCR and rules baselines
  • unseen-template evaluation
  • scan degradation curve
  • review rate at 99 percent
  • cost per thousand pages
17 Live

Fraud Known by the Company It Keeps

A fraud model that scores the account alone misses the fraud that lives in the links between accounts. This measures how much, on millions of real and synthetic transactions: which laundering shapes each way of scoring catches, how many hops it takes, what happens after a dark market shuts down, and what a live score costs.

  • graph neural networks, PyTorch Geometric
  • graph features, XGBoost
  • tabular foundation model
  • temporal split, leakage test
  • recall by laundering pattern
  • k-hop ablation
  • Neo4j and DuckDB serving latency
18 In progress

Same Answers, a Tenth of the Servers

Real traffic comes in bursts, so a model server is either idle and paid for or full and late. This project replays a public production trace against small models that were already trained and published, on a cluster that scales itself and on one machine left on, and measures the cost of each correct answer, the latency a user sees, the minutes a new server takes, and whether the answers change when the servers are busy.

  • Kubernetes, built by Terraform
  • scaling on queue depth (KEDA)
  • spot nodes and scale to zero
  • vLLM serving, 2B and 7B models
  • Azure LLM trace, open-loop replay
  • cost per correct answer
  • cold starts and spot reclaims
  • same answers under load
19 In progress

Which Story First

A news feed that learns from its own clicks narrows what each reader sees, round after round, and the usual offline score cannot tell you which ranker will do better live. This project measures both: how many retraining rounds it takes for a feed to collapse onto a few topics, and what stops it; how wrong an offline estimate of a ranker is when it is sealed before the randomised truth is opened; and what relevance a reader gives up for each step of variety.

  • two-tower retriever (Keras 3)
  • cross-encoder re-ranking
  • HNSW index against FAISS
  • MIND-large, 15M impressions
  • off-policy estimates, sealed first
  • feedback-loop collapse
  • price of variety in relevance
  • DuckDB against PySpark
20 In progress

Learn Which Message Works, While Sending It

An organisation that sends one of several messages can learn which works for whom while it sends them, instead of running a fixed A/B test and then committing. This project measures what that buys, on a real randomised email experiment and 26 million logged recommendations: what a learning policy earns against a fixed split, how far off-policy estimates are from the truth, who pays for exploring, and how soon a policy notices when a message stops working.

  • contextual bandits, eight policies
  • Thompson sampling
  • off-policy estimators against truth
  • Open Bandit Dataset, Hillstrom
  • Vowpal Wabbit
  • regret against a fixed A/B split
  • exploration burden by segment
  • detection lag after a shift

Latest

What changed recently.

  1. 02 Model Selection at a Tenth of the Cost Shipped

    Seventeen decision models, which answer with a probability for each option instead of text, joined four current text models on the same calibrated questions and the same ability scale. The best rank alongside current text models for about five cents a full test. A defect that had dropped two models' settings since September was fixed and both were rerun, with little change. The demo now covers sixteen models.

  2. 10 From Failure to Reviewed Fix, in Minutes Shipped

    The site is up at triage.peterparker.ca. It fixes two real bugs in three before a person looks, and 46 of the 51 fixes it was confident enough to propose were right. Since v0.1.2 it has answered failing pull requests on 03 and 04 as comments, for US$0.82 so far.

  3. 14 Verified Media Briefing Live

    Public at v0.1.0, with the demo at digest.peterparker.ca. Against a person's labels, 69 to 100 percent of the stories each digest shows are worth showing, 99 percent of 111 sentences checked by hand say only what their sources say, and readers were briefed in half the time. All four audiences cost about CA$18 a month, and a month of unattended runs began on 9 November.

  4. 20 Learn Which Message Works, While Sending It In progress

    Planned and started: whether learning which message works while sending it beats a fixed A/B split, on a real email experiment and real logged recommendations, and who pays for the exploration. The repository is private for now.

  5. 18 Same Answers, a Tenth of the Servers In progress

    Planned and started: a public production trace replayed against small published models, on a cluster that scales itself and on one machine left on, to measure what each correct answer costs. No measured result yet; the repository stays private until there is one.

How this was built

I designed each of these projects and made the calls in it: what to measure, against which baseline, and what to do when a test came back wrong. I used AI coding assistants for implementation and drafting, which is now ordinary practice in software and machine learning work. Every number in every results table is reproducible from its repository with one command, and each repository also records one approach that was tried and did not work, with the evidence.