Inspiration
When a traditional microservice breaks, HTTP error rates spike and alerts fire immediately. When a production AI pipeline degrades—because an upstream provider silently updated a model checkpoint, user input topics shifted, or a retrieval index drifted out of sync—API calls still return 200 OK while answer quality quietly collapses. By the time human annotators or angry customer tickets surface the issue, thousands of degraded responses have already shipped. We built DriftWatch to give AI teams continuous, label-free statistical observability over live prompt embeddings, reasoning trajectories, and output distributions before silent regressions impact users.
What it does
DriftWatch ingests lightweight inference telemetry asynchronously from production LLM and RAG pipelines, detecting behavioral anomalies without requiring ground-truth human labels:
Multivariate Embedding Drift Detection: Projects live prompt and response embeddings onto low-dimensional reference manifolds, computing rolling Maximum Mean Discrepancy (MMD) and Wasserstein distances to flag out-of-distribution user queries or sudden output distribution shifts.
Silent Checkpoint & Behavior Fingerprinting: Continuously runs a canary suite of deterministic probe prompts alongside live traffic signatures (output length, refusal rates, JSON schema adherence, tool-call frequency) to detect unannounced upstream model weight or quantization changes within minutes.
Automated Slice Clustering & Root-Cause Attribution: Uses density-based clustering (HDBSCAN) to isolate the exact semantic topic cluster driving a quality drop, automatically generating a diagnostic report with representative failing traces.
How we built it
Telemetry Ingestion & Stream Engine: Built in Go using gRPC and Apache Kafka (with a lightweight SQLite/DuckDB single-node mode) to capture async inference payloads with zero impact on critical-path API latency.
Statistical & Embedding Compute Core: Implemented in Python using NumPy, SciPy, and scikit-learn (HDBSCAN and UMAP projections) paired with local ONNX embedding models for high-throughput vector analysis.
SDK & OpenTelemetry Integration: Built drop-in async callbacks for Python (OpenAI, LangChain, and LiteLLM wrappers) emitting standard OpenTelemetry semantic conventions.
Observability Dashboard: Created an interactive drift timeline and 2D cluster explorer in React, TypeScript, and Deck.gl capable of inspecting 100,000+ live production traces smoothly.
Challenges we ran into
Distinguishing harmless seasonal traffic shifts (such as Monday morning volume spikes) from genuine model degradation initially caused frequent false-positive drift alerts. We solved this by pairing unsupervised embedding distance checks with behavioral invariant monitors—only firing high-severity alerts when distributional drift coincides with shifts in structural output signals (such as elevated hedging language, increased retry counts, or falling retrieval similarity scores).
Accomplishments that we're proud of
Detected a simulated upstream model quantization regression in under 9 minutes using only 400 unlabeled production requests—days before standard user-feedback metrics registered a statistically significant dip.
Maintained under 0.8ms client-side SDK overhead via non-blocking ring-buffer batching.
What's next for DriftWatch
Adding automated traffic-shadowing triggers so detected drift clusters are automatically replayed against candidate fallback models for instant A/B recovery benchmarking.
Releasing native Prometheus exporters and Slack/PagerDuty alert integrations with embedded cluster summaries.
