Skip to content

Add examples/online: matchlab vs Splink, batch cost and online lookups - #627

Draft
will-langdale wants to merge 1 commit into
matchlabfrom
online-matchlab
Draft

Add examples/online: matchlab vs Splink, batch cost and online lookups#627
will-langdale wants to merge 1 commit into
matchlabfrom
online-matchlab

Conversation

@will-langdale

@will-langdale will-langdale commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Validate the Matchlab local API against the MoJ "Running Splink in Production" pipeline shape.

🛠️ Changes proposed in this pull request

👀 Guidance to review

🤖 AI declaration

✅ Checklist:

  • This is the smallest, simplest solution to the problem
  • I've read our code standards and this code follows them
  • All new code is tested
  • I've updated all relevant documentation (select all that apply)
    • API documentation (docstrings and indexes)
    • Tutorials
    • Developer docs

@will-langdale
will-langdale force-pushed the online-matchlab branch 2 times, most recently from 713e1cc to c70ab1c Compare July 27, 2026 17:53
Validate the Matchlab local API against the MoJ "Running Splink in
Production" pipeline shape: dedupe each source, link, cluster once.

- data.py reuses the companies benchmark generator for ~100k entities
- model.py trains the shared Splink model once and reuses the artefact
- pipeline_matchlab.py / pipeline_splink.py express the same job both ways
- benchmark.py reports expression, batch time and memory, and single
  online-match latency across DuckDB and SQLite

Finding: both pipelines recover the ground truth exactly. Matchlab's
batch build costs ~4x the time at roughly equal memory, because it runs
Splink per source pair, deduplicates, and materialises a queryable
resolution. That materialisation makes a single online match a point
select: ~5.3 ms in DuckDB versus ~0.013 ms in SQLite, ~400x faster.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012dPucpK8PqYNX5ChpCVc8U
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants