Merger Reconciler
Cross-ontology class matching, conflict classification, and resolution for M&A
pramiti-merger-reconciler matches and reconciles data models from different organizations during M&A integration. It identifies overlapping concepts, classifies conflicts, and suggests resolutions — with optional LLM-powered semantic similarity.
Install
Quick Start
The 4-Step Matching Algorithm
The match_classes() function uses a 4-step algorithm:
- Exact name match (score=1.0) — Classes with identical names
- Normalized name match (score=0.9) — Case-insensitive with suffix stripping (e.g., "CustomerData" matches "customer")
- Semantic LLM similarity (score=0.5-0.85, threshold=0.7) — Optional LLM-powered semantic comparison, capped at
max_similarity_pairs - Unmatched residuals — Classes that have no match in the other ontology
API Reference
ClassSpec
MatchResult
Conflict Classification (classify())
Classifies the nature of a match conflict:
- identical — Same name, same definition
- name_match_definition_conflict — Same name but different definitions (e.g., "Revenue" means different things)
- semantic_overlap — Different names but overlapping definitions
- complementary — Related but distinct concepts that can coexist
- unrelated — No meaningful relationship
Resolution Suggestions (suggest())
Generates a resolution proposal for each conflict:
- merge — Combine into a single definition
- rename — Keep both with disambiguated names
- choose_a / choose_b — Adopt one organization's definition
- create_new — Create a new unified definition
ILLMAdapter (Interface)
The NoOpLLMAdapter returns 0.0 for all comparisons, effectively disabling semantic matching.
Technical Details
- Name normalization strips common suffixes:
data,record,table,entity,type,class,model,info,detail - LLM call count is bounded by
max_similarity_pairsto control costs - The algorithm is deterministic when no LLM is used — same inputs always produce same outputs
- The
ReportSummarymodel provides aggregate statistics for the reconciliation: total matches, conflicts by type, resolution suggestions