Catalog Gap Fill

Predict category, HS code, account code and tax class, and estimate unit price and weight, across workflow-blocking products. Smart-forms pattern applied to data instead of input UI.

Catalog Gap Fill: screenshot from the ERP demo
📋 ERP_predict_estimateERPE-commerce
Production anchorMulti-field gap fill — in the ERP demo's Retail profile, each missing field of a workflow-blocking product gets its own _predict with calibrated confidence, or an _estimate from comparable products for a number such as unit price, and fields no product in the category carries are marked as not applying.

The problem

Product catalogs accumulate gaps over time. New SKUs land without the full attribute set; old SKUs were imported before the current taxonomy existed; vendor-provided data is incomplete in predictable places. The gaps do not matter until they block a workflow — a missing HS code stops international shipping, a missing category breaks faceted search, a missing unit price blocks the PO autoroute.

The team that owns the catalog usually fills the gaps by hand. The same SKU appears in shipments, in similar-product clusters, in supplier feeds — the data to fill the gap exists somewhere, but the human is the one synthesizing it. The cost compounds: every new gap requires the human to be the conditional-probability engine again.

How it works

Multi-field gap fill is one query per missing field from the available context. Given the product's name, supplier and the attributes it already has, _predict fills the categorical fields — category, HS code, unit of measure, account code, tax class — each with its own confidence and $why, and _estimate fills the numbers, such as unit price and weight, from comparable products. A field that no product in the category carries is marked as not applying rather than invented. High-confidence fields can be applied in bulk; estimates, which have no probability, are left for a person to confirm.

The pattern matches Smart Form Fill but applied to data rather than to input UI. The form variant runs at user-input time; the gap-fill variant runs in batch over the existing catalog. Both use the same query shape — predict the unknown fields conditional on the known fields, with calibrated per-field confidence.

{
  "from": "products",
  "predict": "category",
  "where": {
    "name": "Multi-Surface Cleaner 750ml (Oulu)",
    "supplier": "Berner Oy",
    "hs_code": "3924.10",
    "unit_of_measure": "kg"
  },
  "select": [
    "$p",
    "$value",
    {
      "$why": {
        "highlight": {
          "posPreTag": "«",
          "posPostTag": "»"
        }
      }
    }
  ],
  "limit": 10
}

For the full architecture, see the technology overview. For the broader narrative across multiple use cases, read The Predictive Application.

See it live

This use case runs in the 📋 ERP demo today. Click through to the live application and inspect the queries that produce the result.

Open the live demo →

Frequently asked

How does this handle products with very little reference data?

Products with few similar siblings get low-confidence predictions. The system honestly says "I do not have enough comparable products to fill this gap" and leaves the field for human input. As similar products accumulate (or as the SKU itself accumulates history), the confidence rises and the field auto-fills.

Can we run this in batch across the entire catalog?

Yes. The query is the same; it just runs against many rows. A batch gap-fill surfaces a ranked list: high-confidence fills to apply, mid-tier suggestions for human review, low-confidence rows that need source-data correction. In the ERP demo, one click applies every prediction above 85% (or 70%) across the incomplete products.

What about supplier-provided data — should we trust it or predict?

Trust supplier data first; predict where it is missing. The two compose: supplier data fills what the supplier provided, and the gap-fill prediction handles the fields it left empty. For high-stakes fields (HS code, regulatory categories), the prediction is a suggestion not an auto-fill — humans confirm before commit.

How accurate is this on new product categories that do not exist yet?

Genuinely new categories return low confidence — the system has nothing to compare against. The fields for those products stay empty until either the human creates the category and applies a few examples, or similar enough products accumulate that the system can infer by similarity.

Does this work for service catalogs (not just physical products)?

Yes. The pattern is "predict missing fields from available context" — applicable to service catalogs, project templates, contract types, vendor profiles, anywhere a catalog of records has structured attributes. The threshold tuning differs by domain.