Event-Driven AI in Commerce: How Tanqory Interprets Signals in Real Time
Research blog — architecture, methods, and evidence for Tanqory's event-driven AI stack
Executive Summary
Commerce is increasingly defined by what happens between events: a price change, a stockout, a payment retry, a search reformulation, or a social spike. Tanqory treats AI not as an offline modeling exercise but as an event-driven control system. Our stack ingests heterogeneous signals, attaches context and consent, infers causality where possible, and routes actions with latency, fairness, and trust guardrails. This post details the Event Signal Fabric (ESF) and Decision Orchestration Layer (DOL) that power Tanqory's real-time interpretation of demand, risk, and opportunity.
Highlights:
- Event-first data plane with schema contracts, residency, and consent baked in.
- Causal uplift and synthetic controls to separate signal from noise (Athey and Imbens, 2016; Abadie et al., 2010).
- Contextual bandits and constrained planners for decisions under latency and fairness budgets (Agarwal et al., 2014; Patil et al., 2021).
- Control-inspired regulators smooth volatility and prevent overreaction during spikes (Deng et al., 2013 for variance reduction; Box et al., 2015 for time-series stability).
- Observability, privacy, and auditability as first-class features to sustain trust (Dwork and Roth, 2014; Kohavi et al., 2020).
1. Why Event-Driven AI Matters in Commerce
1.1 Limitations of Batch-First AI
Batch pipelines deliver models days or weeks late, missing transient intent and operational shocks. This leads to:
- Latency between signal and action; demand fades before interventions land.
- Correlation traps: weekly aggregates obscure causal levers (Pearl, 2009).
- Reliability gaps: models drift quietly without on-path guardrails (Kohavi et al., 2020).
- Trust erosion: customers see stale promises and irrelevant offers (Gefen et al., 2003).
1.2 Event-Driven Benefits
- React within minutes to search reformulations, payment retries, or carrier incidents.
- Preserve causal interpretability by capturing temporal ordering and treatment timing.
- Maintain fairness and safety with on-path checks rather than offline audits only.
- Reduce decision latency so merchandising, pricing, and support stay aligned with real conditions.
2. Design Principles
- Event-first: every meaningful state change is an event with schema, consent, and residency flags.
- Causal preference: uplift models, synthetic controls, and natural experiments over pure correlation (Athey and Imbens, 2016; Abadie et al., 2010).
- Constraint-aware: fairness, latency, privacy, and cost budgets enforced at decision time (Patil et al., 2021; Dwork and Roth, 2014).
- Separation of reasoning and execution: ESF senses and reasons; DOL acts with rollbacks.
- Human-in-the-loop for high impact: operators review high-risk changes; explanations accompany recommendations (Lundberg and Lee, 2017).
- Observability and audit: full trace from event to action to outcome, exportable for regulators and partners.
- Multi-region readiness: per-region routing, localization, and fairness thresholds to respect heterogeneity.
3. Architecture Overview
3.1 Event Signal Fabric (ESF)
- Ingest and Contracts: Kafka-like bus; schemas enforced with registry; consent/residency tags on every event.
- Signal Normalization: deduplication, watermarking for late events (Kleppmann, 2017); enrichment with region, device, cohort.
- Feature and Signal Store: online/offline parity; freshness SLAs (<15 minutes for critical behavioral signals); lineage captured for audit.
- Quality Monitors: null thresholds, distribution drift (Kullback and Leibler, 1951), volume anomalies.

3.2 Decision Orchestration Layer (DOL)
- Causal Services: uplift models, synthetic controls, IV-based estimators for natural experiments.
- Predictive Models: gradient-boosted trees for tabular reliability (Chen and Guestrin, 2016); lightweight Transformers for sequence signals under latency caps (Vaswani et al., 2017).
- Policy Engine: contextual bandits with fairness/latency constraints (Agarwal et al., 2014; Patil et al., 2021), planners for multi-step actions (pricing + assortment + promise shaping).
- Safety Layer: consent and residency enforcement, bias checks, p95/p99 latency guards.
- Action Connectors: merchandising, pricing, CMS, supply chain orchestration, support tooling.
4. Signal Taxonomy and Engineering
4.1 Behavioral and Intent Signals
- Search queries and reformulation chains; query entropy as focus proxy (Huang et al., 2020).
- Clickstreams, scroll depth, dwell, backtracks; cart edits and wishlist dynamics.
- Session context: device, locale, referral, bandwidth.
4.2 Commerce and Operational Signals
- Inventory and promise accuracy; substitutions; node congestion.
- Pricing changes, discounts, fees, taxes; elasticity probes.
- Payment retries, decline codes, fraud scores.
- Support tickets, CSAT, refund reasons; trust posture (Gefen et al., 2003).