⏱ 21 min read
Most AI architecture failures do not begin with bad models.
They begin with bad assumptions about reality.
A team stands up a feature store, a streaming pipeline, a model endpoint, and a tidy little monitoring dashboard. Predictions flow. Scores are emitted. A few Kafka topics hum in the background. Someone says the architecture is “event-driven,” which is usually enterprise shorthand for “we hope the timing works out.” event-driven architecture patterns
Then the business asks a simple question:
Why did customer 48127 receive two different risk scores in the same hour?
That question is where the romance dies.
Because once AI leaves the notebook and enters the enterprise, it stops being merely a model-serving problem. It becomes a reconciliation problem. The enterprise needs to know not just what score was produced, but which score is valid, what inputs it was based on, whether the downstream decision consumed the correct one, and how to recover when those answers don’t line up.
This is not glamorous work. It is the plumbing beneath the promise. But in banks, insurers, retailers, healthcare firms, and logistics operators, reconciliation is the difference between “AI-enabled operations” and an expensive machine for creating disputes.
The hard truth is this: AI pipelines inherit the oldest problems of enterprise systems. Late-arriving data. Duplicate events. Out-of-order updates. Partial writes. Replay side effects. Divergence between online and batch paths. Version drift between models and features. Human override without proper state semantics. All the old monsters are still here. They just wear a machine learning badge.
So if your architecture includes dual scoring, champion-challenger models, online inference plus offline recomputation, or asynchronous microservices over Kafka, you need reconciliation as a first-class architectural concern. Not a report at the end. Not a compliance afterthought. A core part of the design. microservices architecture diagrams
That is the theme here: AI pipelines need the same disciplined accounting mindset that enterprises have long applied to money, inventory, and orders. Predictions may be probabilistic. Operations cannot be.
Context
There is a pattern I keep seeing in enterprise AI programs.
The first generation is centralized and awkward: a data science team runs batch scoring overnight, pushes results into a database, and the consuming application reads from there. It is slow, politically messy, and operationally blunt. But it has one great virtue: there is usually one place where people can reconcile what happened.
Then the organization modernizes.
The model is deployed as a real-time service. Features arrive from event streams. A decisioning engine combines scores with business rules. A case management system captures overrides. Model monitoring is pushed into another platform. A data lake stores training history. A feature store claims to unify offline and online data but still leaks abstraction in all the usual places. Kafka becomes the bloodstream. Microservices become the religion.
And with each improvement, a subtle thing happens: the number of architectural boundaries increases faster than the number of semantic guarantees.
That gap is where reconciliation problems breed.
In a classic transaction system, we already know how to think about this. Orders are placed, payments are authorized, shipments are dispatched. If records diverge, finance and operations have mature reconciliation processes because the business understands the domain states and their consequences.
AI systems often skip this discipline because teams treat predictions as technical artifacts rather than domain facts. But a fraud score, credit score, demand forecast, or next-best-action recommendation is not just a number. In business terms, it is a decision input with lineage, timing, and accountability.
That means the architecture must represent these semantics explicitly.
Domain-driven design matters here. Not because we need more sticky notes about bounded contexts, but because reconciliation only works when domain meanings are stable. You cannot reconcile “a score” unless you know whether it means:
- the latest model output,
- the score used for the actual business decision,
- the score produced from complete features,
- the score produced under degraded mode,
- a provisional score pending enrichment,
- or a replayed score generated for audit.
Those are not implementation details. They are different domain states.
If you collapse them into one field called risk_score, you have already lost.
Problem
At the center of the problem is a mismatch between how AI teams think systems behave and how distributed systems actually behave.
AI teams often imagine a pipeline:
- event arrives,
- features are assembled,
- model scores,
- decision is made,
- outcome is stored.
Linear. Clean. Presentable on a slide.
Real enterprise systems are messier:
- the customer event arrives twice,
- one feature comes late from a core system,
- the online feature value differs from the offline training value,
- a fallback model scores because the primary endpoint times out,
- the decision engine consumes the first score while the second score arrives milliseconds later,
- the monitoring service records one version,
- the case management system stores another,
- and the batch recomputation next morning disagrees with both.
Now add champion-challenger or dual scoring.
The organization wants to run the incumbent model and a candidate model in parallel. Good instinct. Safer migration, richer evaluation, less faith-based deployment. But dual scoring doubles the need for clarity:
- Which model’s score was used for the operational decision?
- Which one was shadow-only?
- Were both computed from the same feature snapshot?
- Did one score fail and silently degrade?
- Was the challenger absent for some traffic segment?
- Did replay use the same model version and transformation logic?
- Can we explain differences to auditors and business operators?
Without reconciliation, dual scoring becomes theater. It produces numbers, not confidence.
This is especially acute in Kafka-based microservice ecosystems. Kafka is excellent for decoupling producers and consumers, retaining event history, and enabling replays. It is also excellent at allowing teams to spread inconsistency faster unless the event contracts and domain states are disciplined.
The issue is not Kafka. The issue is magical thinking.
An event stream is not a source of truth. It is a log of things that happened, or were believed to have happened, by a system at a point in time. Reconciliation is how the enterprise decides which of those things matter, which are authoritative, and what to do when they conflict.
Forces
Several forces make this hard. They pull against each other.
Low latency versus complete context
Real-time decisioning wants an answer now. Reconciliation wants certainty. Those goals are cousins, not twins.
If you wait for every feature from every upstream source, latency grows and customer journeys suffer. If you score with partial data, you need a domain concept of a provisional or degraded score and a mechanism to reconcile later.
Local autonomy versus enterprise consistency
Microservices encourage teams to own their data and move independently. Good. But AI decisioning often spans multiple bounded contexts: customer profile, account behavior, fraud signals, policy rules, and case management. A score emitted by one service may be interpreted differently by another.
If every team invents its own semantics for “latest,” “final,” or “approved,” reconciliation becomes archaeology.
Replayability versus side effects
Kafka gives you replay. Enterprises love replay until it triggers a second customer notification, a duplicate adverse action letter, or a phantom case assignment.
Scoring pipelines are often replay-safe; decision pipelines often are not. Reconciliation has to distinguish between analytical reprocessing and business-effective state transitions.
Model evolution versus comparability
Models change. Features change. Thresholds change. That is healthy. But reconciliation depends on being able to compare like with like.
If your challenger score uses a subtly different feature derivation or a different event-time cutoff than the champion, you are not comparing models. You are comparing worlds.
Probabilistic outputs versus deterministic operations
The model may output a probability. The business operation must still choose one action. That action must be auditable, reversible in some cases, and attributable.
This is where DDD helps. The domain should not expose “a prediction happened.” It should expose concepts like:
DecisionRequestedScoreCalculatedDecisionCommittedDecisionSupersededOutcomeObservedManualOverrideAppliedReconciliationExceptionRaised
These are semantically meaningful events. They give architecture something real to reconcile.
Solution
The solution is to treat AI scoring as a reconcilable domain process, not a black-box technical function.
That leads to a few opinionated principles.
1. Separate scoring from decision commitment
A score is an input. A committed business decision is a domain fact.
Do not let every scoring event implicitly mean “the business has decided.” Introduce a decision service or domain component that explicitly records which score, from which model, using which feature snapshot, was used to commit an operational action.
This sounds obvious. Many enterprises still get it wrong.
2. Introduce a canonical scoring record
Every scoring attempt should produce a canonical record with:
- correlation ID / decision ID
- subject identity and version
- event-time and processing-time
- feature snapshot reference or hash
- model name and version
- scoring mode: champion, challenger, shadow, fallback
- score value and explanation payload reference
- status: success, degraded, partial, failed
- decision eligibility flag
- lineage metadata
This is not merely logging. It is a domain artifact for reconciliation.
3. Model “effective score” as a domain concept
There may be many scores for a customer in a period. Reconciliation needs to answer: which one was effective for a given business action?
So define explicit semantics:
ObservedScoreEligibleScoreEffectiveScoreSupersededScore
You cannot reconcile what you cannot name.
4. Reconcile across three planes
AI systems usually need reconciliation in three distinct planes:
- Data reconciliation: were the right inputs used?
- Decision reconciliation: was the right score used by the business process?
- Operational reconciliation: did all systems record the same outcome and lineage?
Most teams only do the first and call it MLOps.
5. Build dual scoring as a governed pattern, not ad hoc parallel calls
Champion-challenger should be an explicit architectural pattern with consistent lineage, routing, and comparison logic. Otherwise every team bolts it on differently and nobody can trust the results.
Here is a practical reference shape.
The key point is that both champion and challenger write to a shared score registry with common semantics. The decision service chooses the effective score according to policy. Reconciliation validates that all downstream effects align with that committed choice.
6. Use event-carried state carefully
Kafka topics can carry scoring events, but do not assume consumers will reconstruct correct domain truth from a stream of loosely governed events. Use compacted topics or state stores where appropriate for latest-effective views, and immutable append-only streams for audit lineage.
The enterprise needs both:
- a history of what happened,
- and a current answer about what is effective now.
Those are different data products.
Architecture
A sensible architecture is not one big platform. It is a collaboration of bounded contexts with hard semantic edges.
A useful domain decomposition often looks like this:
- Customer/Party Context: identity, account relationships, profile facts
- Feature Context: derived variables, feature lineage, freshness, quality flags
- Model Execution Context: scoring requests, outputs, model versions, runtime telemetry
- Decisioning Context: policy rules, thresholds, action commitment, eligibility
- Case Management Context: human review, overrides, investigations
- Reconciliation Context: cross-context verification, exception handling, replay coordination
- Audit/Compliance Context: immutable evidence and explainability references
Notice what is absent: “AI Platform” as a magical super-context. Platforms are useful. Domains are what keep you honest.
A typical event-driven architecture might look like this.
A few details matter a lot.
Score Registry
This is the beating heart of reconciliation. It stores immutable scoring records and enough metadata to compare champion and challenger outputs fairly. It is not just observability exhaust.
If the architecture lacks a score registry, people will attempt to reconstruct history from logs, traces, model metrics, application databases, and Kafka offsets. That is not architecture. That is digital forensics.
Decision Ledger
The decision ledger records business-effective commitments: what action was taken, based on which score, under which policy version, with what fallback mode if any. This should be append-only and auditable. In heavily regulated environments, this ledger matters more than the raw model endpoint logs.
Reconciliation Service
This service periodically or continuously compares:
- scoring attempts versus decision commitments,
- expected versus actual downstream actions,
- online versus recomputed scores,
- champion versus challenger coverage,
- and source feature freshness versus policy requirements.
Its output is not just metrics. It raises domain exceptions:
- missing score,
- duplicate effective score,
- stale feature usage,
- uncommitted score consumed,
- decision-action mismatch,
- replay side effect detected.
This is where enterprise architecture earns its salary.
Domain semantics of time
You need at least three kinds of time:
- event time: when the business fact occurred
- processing time: when the system processed it
- decision time: when the score became effective for an action
Conflate them and you will spend six months arguing with auditors and operations teams.
Migration Strategy
Most enterprises do not get to redesign AI decisioning from scratch. They have a batch model in production, a scoring API emerging, and too many dependencies to freeze the world. So the right migration is usually a progressive strangler.
Not a revolution. A patient takeover.
Step 1: Wrap the legacy scoring flow with a canonical registry
Do not replace the model first. Introduce the score registry and decision ledger around the existing process. Even if the old world is batch-based, start producing canonical scoring records and explicit decision commitments.
This gives you visibility before change.
Step 2: Add dual scoring in shadow mode
Bring in the new scoring path as challenger only. Same business events, same feature snapshot contract where possible, same score registry. No operational decisions are made from it yet.
At this stage, your goal is not proving the new model is “better.” Your goal is proving the new path is reconcilable.
Step 3: Reconcile online and batch outputs
For a period, compare:
- legacy batch score,
- online champion score,
- challenger score,
- and actual committed decision.
This exposes semantic drift: feature mismatch, timing differences, policy inconsistencies, incomplete identity resolution.
Most migration programs discover the biggest issue is not model quality. It is that the old and new systems are not answering the same business question.
Step 4: Strangle decision slices, not whole domains
Move a segment first:
- one channel,
- one geography,
- one product,
- one customer cohort.
The point is to migrate bounded slices where business semantics are manageable. Do not cut over “all fraud decisions” in one theatrical weekend.
Step 5: Promote challenger selectively
Once reconciliation exceptions are stable and understandable, allow the challenger to become effective for a subset of traffic. Keep champion running in parallel for a while. The architecture should make rollback a routing change, not a committee meeting.
Step 6: Retire legacy paths only after exception patterns are boring
Boring is good. Boring means the remaining anomalies are known classes with documented response playbooks. Until then, you do not have operational maturity. You have hope.
Here is the migration pattern in simple form.
This is classic strangler thinking applied to AI. The old capability is not ripped out. It is enclosed, observed, compared, and gradually displaced.
Enterprise Example
Consider a retail bank modernizing credit card fraud detection.
The legacy setup is familiar. Authorizations flow into a mainframe-adjacent rules engine. A nightly batch process recomputes fraud risk segments for portfolio analysis. A data science team has built a new real-time model using transaction velocity, merchant embeddings, device risk, and customer behavior features. The bank wants champion-challenger deployment on Kafka-centric infrastructure.
Sounds straightforward. It never is.
The domain problem
A transaction authorization can be:
- approved,
- declined,
- step-up authenticated,
- or routed to investigation.
The business does not care that the model output is 0.87. It cares whether the authorization decision was appropriate, explainable, and consistent with policy.
Meanwhile:
- device intelligence arrives slightly late from a vendor feed,
- customer travel flags come from another domain service,
- merchant enrichment may revise after the initial event,
- and fraud analysts can manually reverse certain actions.
So the bank establishes explicit domain states:
FraudScoreObservedFraudDecisionCommittedAuthorizationActionSentAnalystOverrideAppliedOutcomeConfirmedReconciliationExceptionRaised
Now the architecture can reason.
The technical shape
Kafka carries transaction and enrichment events. A feature service assembles an online feature vector with freshness flags. The scoring orchestrator calls both champion and challenger models. Both outputs go into the score registry with a shared transaction correlation ID and feature snapshot hash.
The decision service applies business rules:
- if champion score is available and fresh, use it;
- if champion fails and fallback policy permits, use a simpler backup model;
- challenger score is shadow-only unless transaction is in pilot segment;
- if features are stale beyond tolerance, route to step-up rather than auto-decline.
The decision ledger records exactly which path was taken.
The reconciliation service then checks:
- did an authorization action exist for every committed decision?
- did any downstream system consume a shadow score as effective?
- were stale features used in violation of policy?
- did batch recomputation produce materially different scores because late merchant enrichment changed the feature set?
- were analyst overrides captured as superseding decisions rather than silent data edits?
What they discovered
The first migration wave found that champion and challenger disagreed often on cross-border transactions. The model team suspected data skew. The real cause was uglier and more normal: the old path used authorization-time currency normalization, while the new feature pipeline used settlement-time reference rates for some replayed events.
This is exactly why reconciliation belongs in architecture. The issue was not in “the model.” It was in the semantic contract of the feature.
Once corrected, discrepancy rates dropped sharply. More importantly, the bank could defend why.
That is enterprise AI done properly: less magic, more accounting.
Operational Considerations
A few operational disciplines separate robust systems from expensive demos.
Idempotency
Scoring events and decision events must be idempotent with clear keys. Kafka replay, consumer retries, and partition rebalances are facts of life. If your downstream action service cannot detect duplicate decision commitments, reconciliation volume will explode.
Data retention and lineage
Retain enough lineage to answer historical questions. In regulated domains, that often means:
- model artifact version,
- transformation code version,
- feature values or feature snapshot references,
- policy/rule version,
- explanation artifact reference,
- user or service identity for overrides.
Storage is cheaper than reputational repair.
Freshness and completeness policies
Every feature should carry quality metadata. Not every score is equally trustworthy. Reconciliation should distinguish:
- valid score from complete fresh features,
- valid score under degraded mode,
- invalid or non-eligible score.
Again: if you do not model the semantics, operators will improvise them in spreadsheets.
Human workflow integration
Exceptions need somewhere to go. A reconciliation queue with no operating process is just an expensive dead letter office. Case management, analyst workbenches, and support procedures matter.
Monitoring that reflects domain truth
Latency, throughput, and endpoint error rates are necessary. They are not enough. Add metrics such as:
- percent of decisions with canonical score lineage complete
- champion/challenger coverage parity
- effective-score uniqueness violations
- stale-feature decision rate
- replay-produced side effect rate
- unresolved reconciliation exceptions by domain type
That is monitoring people can run a business on.
Tradeoffs
There is no free lunch here.
Reconciliation adds complexity. It introduces extra state, more metadata, more storage, and more explicit process. Teams wanting pure low-latency elegance will complain. Some of them are right.
A score registry and decision ledger create central architectural gravity. If done badly, they become bottlenecks or political choke points. If done well, they become enterprise memory.
Dual scoring also costs money. You run more inference, retain more metadata, and build more comparison logic. If the business case is tiny and the operational risk is low, that overhead may not be justified.
There is also a cultural tradeoff. Data science teams often prefer flexibility; enterprise operations prefer determinism. Reconciliation is where those preferences collide. The answer is not to let one side win. It is to define clear contracts between exploratory work and operational commitments.
My bias is simple: for any AI system that affects customers, money, compliance, or material operations, pay the reconciliation cost upfront. It is cheaper than paying it under executive escalation.
Failure Modes
Here are the common ways this architecture still goes wrong.
Semantic collapse
Teams reduce everything to a generic prediction_event. No distinction between observed, effective, fallback, or superseded states. Reconciliation becomes impossible because all facts have been flattened.
Hidden feature drift
Champion and challenger use “the same” features that are actually derived through different code paths. Comparison results look like model differences but are really pipeline differences.
Replay pollution
Historical replay republishes events onto operational topics and triggers downstream actions. This is one of the oldest mistakes in event-driven architecture. It remains popular because engineers are eternal optimists.
Ledger bypass
A service makes a business action directly from a score, bypassing the decision ledger. Now the enterprise has actions with no authoritative decision commitment. Auditors love these moments because they reveal who was pretending.
Human override as mutable update
An analyst changes a row in place rather than creating an explicit superseding decision event. The system loses the trail of what happened and why.
Exception fatigue
The reconciliation service raises thousands of issues but there is no triage model, no severity taxonomy, no business ownership. Soon everything is red and nothing matters.
When Not To Use
Not every AI pipeline needs this level of machinery.
Do not build a full reconciliation architecture when:
- the model is purely advisory and has no automated business effect,
- the consequences of inconsistency are trivial,
- the pipeline is batch-only and consumed analytically with no operational commitments,
- the traffic volume and risk profile do not justify dual scoring overhead,
- or the domain itself is still too unstable to define meaningful semantics.
A marketing content recommendation experiment, for instance, may not need a decision ledger and exception workbench. A real-time credit decline system absolutely does.
This is the usual architectural rule: match the rigor to the blast radius.
Related Patterns
This approach overlaps with several enterprise patterns.
Event Sourcing
Useful for preserving immutable domain history, especially in decision and override flows. But event sourcing alone is not reconciliation. It gives you history, not necessarily cross-context agreement.
Outbox Pattern
Essential when services publish scoring or decision events reliably alongside local state changes. Prevents one of the nastier inconsistency classes.
Saga / Process Manager
Helpful for coordinating asynchronous decision workflows across scoring, actioning, and case handling. Reconciliation often sits beside or above sagas, validating what really occurred.
CQRS
A good fit when you need separate write models for committed decisions and read models for “latest effective score” views.
Strangler Fig Pattern
The right migration pattern for replacing batch or legacy scoring paths progressively while preserving comparability and fallback.
Data Quality and Record Matching Patterns
Particularly important when identity resolution affects whether scores and actions can be reconciled to the same party or account.
These patterns matter, but domain semantics matter more. The enterprise does not reconcile technologies. It reconciles business facts expressed through technologies.
Summary
AI pipelines are not exempt from enterprise reality. They are soaked in it.
Once models influence actions, the architecture must answer hard questions:
- Which score was produced?
- Which score was effective?
- What inputs and versions created it?
- What decision did it trigger?
- Did every downstream system reflect that same truth?
- What happened when reality disagreed?
That is reconciliation.
The architecture I favor is straightforward in spirit, even if it demands discipline in practice:
- explicit domain semantics,
- canonical scoring records,
- a decision ledger for committed business facts,
- governed dual scoring,
- Kafka used with respect rather than faith,
- progressive strangler migration,
- and a reconciliation service that treats exceptions as first-class operational events.
The memorable line is this:
If money gets reconciled, and inventory gets reconciled, then AI-driven decisions should be reconciled too.
Because in the enterprise, a prediction is only interesting for a moment.
A reconciled decision is what survives.
Frequently Asked Questions
What is enterprise architecture?
Enterprise architecture aligns strategy, business processes, applications, and technology in a coherent model. It enables impact analysis, portfolio rationalisation, governance, and transformation planning across the organisation.
How does ArchiMate support architecture practice?
ArchiMate provides a standard language connecting strategy, business operations, applications, and technology. It enables traceability from strategic goals through capabilities and services to infrastructure — making architecture decisions explicit and reviewable.
What tools support enterprise architecture modeling?
The main tools are Sparx Enterprise Architect (ArchiMate, UML, BPMN, SysML), Archi (free, ArchiMate-only), and BiZZdesign. Sparx EA is the most feature-rich, supporting concurrent repositories, automation, scripting, and Jira integration.