master-data-matching

Production-ready Master Data Intelligent Matching System. Use when: matching vendor/customer/employee records, deduplicating master data, resolving OCR-extracted entities against database records, or any entity resolution task across procurement/finance/sales/HR domains. Activates on: master data, entity matching, record deduplication, vendor matching, customer matching, OCR reconciliation, master data quality.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "master-data-matching" with this command: npx skills add master-data-matching

Master Data Intelligent Matching System

Overview

A production-ready skill for intelligent entity resolution across business domains. It combines exact-match and vector-semantic retrieval, OCR field mapping with confidence coloring, and human-in-the-loop verification with active learning.

Usage

import mdm from './index.js';

// 1. Get supported domains
mdm.getSupportedDomains(); // ['procurement', 'finance', 'sales', 'hr']

// 2. Build OCR-to-schema mapping with confidence colors
const mapping = mdm.buildOcrSchemaMapping(ocrFields, 'procurement');

// 3. Run full matching pipeline
const result = mdm.runMatchingPipeline(ocrEntity, 'procurement', dbRecords);

// 4. Format result as summary
console.log(mdm.formatMatchingSummary(result));

Key Features

Business Domain Isolation

Four isolated schemas:

  • procurement — vendor records (vendor_name, vendor_code, tax_id, contact, etc.)
  • finance — company records (company_name, registration_number, fiscal_year_end, etc.)
  • sales — customer records (customer_name, customer_code, industry, credit_limit, etc.)
  • hr — employee records (employee_name, employee_id, id_number, department, etc.)

OCR Field to Schema Visual Line Mapping

buildOcrSchemaMapping(ocrFields, domain) maps raw OCR field names to schema fields with confidence colors:

ColorScoreMeaning
🟢 green≥ 0.92High confidence mapping
🟡 yellow0.70–0.92Medium confidence mapping
🔴 red< 0.70Low confidence / unmapped
🔵 bluedb-onlyDatabase field, no OCR data

Dual-Path Entity Retrieval

dualPathEntityRetrieval(entity, domain, dbRecords) runs two parallel paths:

  1. Exact Match (threshold 0.92) — ALL critical fields must match exactly
  2. Vector Semantic (threshold 0.70) — weighted similarity across all fields

Results include needsHumanReview: true if confidence < 0.92 or no match found.

Field Value Verification

verifyFieldValues(ocrEntity, dbRecord, domain) returns 4-state verification per field:

StateMeaning
matchOCR and DB values agree
mismatchValues differ (requires human resolution)
new_infoField only in OCR (new information)
db_onlyField only in DB (not in OCR document)

Human-in-the-Loop

Every pipeline result generates a hitlRequest with:

  • Mismatched fields highlighted
  • New info fields listed
  • Available review actions: confirm_match, reject_match, create_new, update_fields

Use processHumanDecision(decision, state) to process human feedback and generate learning payloads.

Active Learning

updateActiveLearning(payloads, stats) tracks:

  • Per-domain confirmation/rejection/new-record rates
  • Per-field error rates
  • Auto-adjusts thresholds when field error rate > 30%

Example

import mdm from './index.js';

// Sample OCR entity from a vendor invoice
const ocrVendor = {
  vendor_name: 'Acme Corporation Ltd',
  vendor_code: 'V-5001',
  tax_id: '91110000123456789X',
  contact_person: 'John Smith',
  email: 'john.smith@acme.com',
};

// Existing database records
const dbRecords = [
  {
    id: 'rec_001',
    vendor_name: 'Acme Corporation Ltd',
    vendor_code: 'V-5001',
    tax_id: '91110000123456789X',
    contact_person: 'John Smith',
    email: 'j.smith@acme.com',  // slight email mismatch
    phone: '+86-10-12345678',
    address: 'Beijing Chaoyang District',
    bank_account: '6222021234567890',
  },
];

// Run pipeline
const result = mdm.runMatchingPipeline(ocrVendor, 'procurement', dbRecords);
console.log(mdm.formatMatchingSummary(result));

// Process human decision
const decision = { action: 'confirm_match', notes: 'Email mismatch acceptable' };
const { status, learningPayload } = mdm.processHumanDecision(decision, {
  domain: 'procurement',
  ocrEntity: ocrVendor,
  matchResult: result.matchResult,
});

// Update active learning
const newStats = mdm.updateActiveLearning([learningPayload], {});

API Reference

FunctionDescription
getSupportedDomains()List all supported business domains
getDomainSchema(domain)Get field schema for a domain
buildOcrSchemaMapping(ocr, dom)Map OCR fields to schema with confidence
dualPathEntityRetrieval(...)Run exact + semantic matching
verifyFieldValues(...)4-state field verification
runMatchingPipeline(...)Full orchestration pipeline
generateHitlReviewRequest(...)Build human review request payload
processHumanDecision(...)Handle human feedback
updateActiveLearning(...)Update learning stats from decisions
formatMatchingSummary(...)Human-readable result summary

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Huo15 Openclaw Enhance

火一五·克劳德·龙虾增强插件 v5.7.8 — 全面适配 openclaw 2026.4.24:peerDep ^4.24 + build/compat 同步到 4.24 + 14 处 api.on 全部去掉 as any 改成 typed hook(hookName 联合类型 + handler 自动推断 Pl...

Registry SourceRecently Updated
General

Content Trend Analyzer

Aggregates and analyzes content trends across platforms to identify hot topics, user intent, content gaps, and generates data-driven article outlines.

Registry SourceRecently Updated
General

Prompt Debugger

Debug prompts that produce unexpected AI outputs — diagnose failure modes, identify ambiguity and conflicting instructions, test variations, compare model re...

Registry SourceRecently Updated
General

Indie Maker News

独行者 Daily - 变现雷达。读对一条新闻,少走一年弯路。每天5分钟,给创业者装上商业雷达。聚焦一人公司、副业、创业变现资讯,智能分类,行动导向。用户下载即能用,无需本地部署!

Registry SourceRecently Updated