For the complete documentation index, see llms.txt. This page is also available as Markdown.
Enterprise only

Verify Blocking

How to inspect the blocking model, understand its coverage, and fix missed matches caused by blocking

The blocking model filters your dataset before any similarity comparisons happen. Records in different blocks are never compared. This is what makes Zingg scalable, but it also means that if the blocking model puts two matching records in different blocks, those records will never be matched and the match will be missed regardless of how well the similarity model is trained.

If your results are missing matches you expect to see, or if the match job is slow, start here.

verifyBlocking tells you what percentage of your known matching pairs are being blocked together correctly. Run this test after configuring Zingg and again after training if you suspect missed matches.

What verifyBlocking output contains

The verifyBlocking phase produces two output directories under zinggDir/modelId/blocks/timestamp/:

Output path
What it contains

counts

Record count per block. Shows how many records are in each block. Very large blocks indicate poor blocking specificity.

blockSamples

The top 10% of records associated with each block. Use this to understand which records are being grouped together and whether the groupings make sense.

right-long

If verifyBlocking shows low coverage, what to do in order

Poor blocking coverage means matching pairs are being placed in different buckets and never compared. Four causes account for most cases:

Skewed or limited training samples

The blocking model learns heuristics from your labeled training data. If your training data is skewed, for example, all your labeled pairs are from a single state, city, or category, the blocking model learns blocking rules that are too narrow for the full dataset.

Fix: Run findTrainingData again and label pairs that represent the full distribution of your data. If your dataset has records from 50 states, your training data should include pairs from multiple states not just the largest.

Manually added training samples overriding learned rules

If you supplement your training data with manually created pairs rather than pairs selected by findTrainingData, those pairs may teach the blocking model rules that are too specific to those exact examples. The blocking model needs representative pairs selected by Zingg's own candidate selection logic, not hand-curated ones.

Fix: Use findTrainingData to generate candidate pairs. Add manually created training data only to supplement coverage gaps, and ensure they are diverse enough that the blocking model can generalize from them.

Too few training examples

30 to 50 labeled match pairs is a good starting point for Zingg; these pairs are used to learn the blocking as well as the similarity model. But the blocking model may need more examples, especially on large datasets with many field variations, before it learns blocking rules that are generic enough to cover the full problem space.

Fix: Run findTrainingData and label for an additional round. Pay particular attention to match pairs that cover different field value patterns: different name formats, address abbreviations, and missing field combinations.

Non-differentiating columns in the schema

If your field definitions include columns that are the same or nearly the same across a large proportion of your records, for example, a country code that is "US" for 99% of records, those columns produce very large blocks. Large blocks slow down matching and indicate that the blocking model is not creating useful partitions.

Fix: Mark non-differentiating columns as DONT_USE in your field definitions. DONT_USE fields are excluded from both blocking and similarity; they appear in output but do not influence matching.

TODO

  1. Add more labeled training pairs of the type being missed. Focus on pairs that represent the variation patterns missing from your current training set.

  2. Review your field match types. Fields marked DONT_USE are excluded from blocking as well as similarity. If a field has a strong identity signal - a consistent identifier that appears across matching records - consider changing it from DONT_USE to FUZZY.

  3. Check whether missed pairs share a common characteristic. If all missed pairs have empty values in a key field, empty fields cannot contribute to blocking. Either remove that field from your blocking config or improve data completeness upstream.

  4. If standard blocking consistently misses a specific pattern in your data, consider custom blocking functions.

right-long
right-long

Run the verifyBlocking phase

Python

CLI

Python

CLI

CLI

Reading the output

verifyBlocking produces two output directories under zinggDir/modelId/blocks/timestamp/:

  • counts - block size distribution

  • blockSamples - sample records from each block

Read the output to inspect block coverage:

What to do if coverage is low

If verifyBlocking shows that many known matching pairs are not being blocked together, try these in order:

  1. Add more labelled training pairs of the type being missed. The blocking model learns from the same training data as the similarity model.

  2. Check your field match types. Fields set to DONT_USE are excluded from blocking. If a key identity field is set to DONT_USE, matching pairs that differ on other fields may end up in different blocks.

  3. Try the WIDER blocking strategy (Enterprise only) if large blocks suggest the tree is over-relying on one or two fields → Blocking Strategies: DEFAULT vs WIDER

right-long

Last updated

Was this helpful?