Multi-Model Fusion - Entity Enricher Documentation

Multi-Model Fusion

When you run the same enrichment across multiple AI models, Entity Enricher can fuse the results into a single, high-confidence output. Fusion detects conflicts between model outputs and resolves them using deterministic rules or LLM-powered arbitration.

Fusion Pipeline

Model Outputs
Claude Result
GPT-4 Result
Gemini Result
Conflict Detection
Compare every field
across all models
Resolution
Rule-Based Merge
or
LLM Arbitration
Merged Result
Single output with
conflict audit trail

Step 1: Conflict Detection

The conflict detector compares every field across all model outputs. Fields where all models agree pass through unchanged. Fields where models disagree are flagged as conflicts that need resolution.

Comparison Rules by Field Type
TypeHow ComparedAgreement Means
ScalarNormalized exact match (trimmed, lowercased, rounded)All values equal after normalization
MultilingualThe run's primary language decides; translation differences only trigger a per-language mergeSame text in the primary language — phrasing variants of a translation are not disagreements
ArraySet comparison (order-independent) on the primary-language view of itemsSame items regardless of order or translation phrasing
ObjectPer-property while the identity fields prove both models describe the same thing — otherwise the whole object is one conflictAll nested properties match
Null / emptyA null, empty-string, or empty-array value is an abstention, not a claimThe filled value wins without counting a conflict
Example: Enriching “Sanofi” with 2 Models
Claude Output
revenue: 42.2
gmp_status: true
description: “Sanofi is a global...”
GPT-4 Output
revenue: 44.1
gmp_status: true
description: “Sanofi SA is a...”
Result: gmp_status = agreed | revenue = conflict (42.2 vs 44.1) | description = conflict (different text)

Step 2: Conflict Resolution

Conflicts are resolved using one of two methods, depending on whether you selected an arbitration model in the sidebar.

Option A

Rule-Based Merge

Deterministic rules are applied based on each field's data type. Almost always this needs no LLM call at all — resolution is instant and free. The one exception is numbers the models disagree about wildly, which no rule can honestly settle; see below.

Field TypeRuleRationale
StringMajority vote; tie goes to the longest valueMore detail is usually better
NumberModel value nearest the medianRobust to outliers, never a fabricated average
BooleanMajority; true wins tiesConservative default
MultilingualPer-language majority vote, union of languagesEach language resolved independently
ArrayKey-aware union: items group on their key fields, variant spellings fold together, matched items merge per-fieldOne row per logical entity, nothing lost
ObjectPer-field when identity agrees; otherwise one model's object is taken wholeBlending two objects that describe different entities would invent a third that neither model returned
Null vs ValuePrefer the filled valueMissing data is worse than any value

Tie-breaker: When votes are tied, the value from the higher-priced model wins (as a proxy for capability), followed by alphabetical model name ordering. For a whole object taken atomically, completeness — the number of filled leaves — comes between the two: with nothing to prove which entity is real, prefer the stronger model, then the answer that carries more information.

Nested objects are merged whole, not blended

Merging a nested object field by field is only safe while both models are describing the same thing. When the identity fields do not prove that — different keys, or no keys at all with a real disagreement underneath — the object becomes a single conflict and one model's version is taken verbatim. Otherwise fusion would assemble a chimera: this model's address on that model's company. One consequence is deliberate but worth knowing: the winner is taken with its blanks included, so a field the winner left empty stays empty — which can hold the entity back at the database admission gate. The reason rides along in the run's validation warnings.

When numbers disagree too far to merge

“Nearest the median” is right for models rounding differently and wrong for models contradicting each other — 0 versus 1854 is not a rounding difference. When the values' relative spread reaches 20%, that field is escalated to an LLM arbiter chosen automatically through your organization's usual model selection, and the call is billed like any other. Those fields are flagged as auto-escalated in the fusion audit trail, so a merge that cost tokens always says which fields caused it.

Option B

LLM Arbitration

When you select an arbitration model in the sidebar, conflicts are sent to an LLM for intelligent resolution. The arbitrator receives the entity context, schema field descriptions, and all conflicting values, then makes reasoned decisions.

What the Arbitrator Returns
Chosen ValueThe value it considers most accurate
Source ModelWhich model the chosen value came from
ReasoningWhy it chose that value over alternatives
ConfidenceHow confident it is in the decision (high, medium, low)

Fallback: If the arbitration model fails (timeout, error), the system automatically falls back to rule-based merge so you always get a result.

Step 3: The Merged Result

After conflict resolution, the system builds a single merged result and stores it as an “arbitration” record in the database. Every merged result includes an audit trail so you can trace how each conflict was resolved.

Audit Trail (Arbitration Metadata)

Every merged result includes metadata that documents the fusion process:

“method”: “rule_based” | “llm”
“source_record_ids”: [“uuid-1”, “uuid-2”]
“total_fields”: 23
“agreed_fields”: 18
“conflicted_fields”: 5
“decisions”: [{ path, chosen_value, rule_used, ... }]

The same audit trail is shown for any merged record on the History page, in its Overview tab. A merged record lists the models it merged rather than a model of its own — and when the merge was rule-based it made no LLM call at all, so it carries no prompt, no tokens and no cost.

What You See in the UI

After fusion completes, the “Merged” tab in the results panel shows:

1
Summary Header
Shows the resolution method (Rule-Based or LLM), and a count like “18 agreed / 5 resolved / 23 total fields”.
2
Merged JSON
The complete structured output combining agreed values and resolved conflicts into a single JSON document.
3
Conflict Report
Expandable cards for each conflict showing: the field path, the resolution method badge (Majority Vote, Median, Union, etc.), all model values with the chosen one highlighted, and reasoning text if LLM arbitration was used.

Automatic Fusion in Batch Processing

In batch enrichment, fusion happens automatically when you select two or more models. You do not need to click “Merge Results” manually — as soon as every model has succeeded for an entity, fusion runs and the merged result appears alongside the individual model outputs. A run in which one model failed is deliberately not fused: merging what is left would silently publish a partial answer as if it were the agreed one. Recover the missing model first — retrying its failed expertises fuses the run automatically once it is whole again.

Streaming fusion: During both single-entity and batch enrichment, fusion progress is streamed via Server-Sent Events. You see fusion_started, conflicts_detected, and fusion_completed events in real-time.

Rule-Based vs LLM Arbitration: When to Use Each

Rule-Based (Instant, almost always free)
  • Mostly factual/numeric data where voting logic works well
  • High volume or batch processing where cost matters
  • Simple schemas with few expected conflicts
  • When you want deterministic, reproducible results
LLM Arbitration (Additional Cost)
  • Complex schemas where context matters for resolution
  • Textual data (descriptions, summaries) where voting is insufficient
  • When you need explainable decisions with reasoning
  • High-stakes enrichments where accuracy is worth the extra cost