Real-Time AI
Real-Time Event Scoring Pipeline
A low-latency scoring pipeline that applies models to streaming events and publishes decisions downstream.
Streaming
Mode
Offset replay
Recovery
Lag + drift
Monitoring
Architecture
Hover or tap any stage to see its role in the pipeline.
Data flow
Events publish to Kafka, workers enrich each event from the online feature store, models score in-process, decisions publish to an output topic with correlation IDs, and monitoring tracks lag, latency and score distributions.
Problem statement
Model scores were produced in nightly batches, so decisions were made against stale customer state.
Business objective
Score events as they happen and publish decisions to consuming systems within a strict latency budget.
Solution overview
A Kafka-based streaming pipeline with an online feature store, model scoring workers and a decision topic consumed by downstream platforms.
AI / ML approach
Stream processing with online feature lookup, warm model workers, backpressure handling and replay capability.
Model / LLM used
Batch-trained models served in warm streaming workers
Technology stack
PythonKafkaRedisSparkDockerAWS
Key capabilities
- Event-time scoring
- Online feature enrichment
- Replay from offset for backfill
- Lag and drift monitoring
Evaluation approach
- End-to-end latency percentiles
- Score distribution parity against batch baseline
- Consumer lag under peak load
Challenges
- Feature freshness versus latency
- Hot partitions
- Model reload without downtime
Solution decisions
- Online store for hot features, batch store for the rest
- Key rebalancing to spread partition load
- Blue/green model reload inside workers
Business impact
Moved decisioning from overnight batch to event time, so downstream systems act on current customer state.