Appearance
AI & Machine Learning Integration Deep Dive
Architecture: Hybrid Statistical ML + Pre-trained LLM
The AI subsystem consists of two complementary layers:
- Statistical ML Engine (
ml/): Runs locally on incoming telemetry with sub-millisecond execution times. - Pre-trained LLM API Integration (
ml/llm_engine.py): Queried on demand during active incident triage.
Statistical ML Modules (11 Total)
latency_anomaly.py: Calculates rolling exponential moving average (EMA) and standard deviation; flags z-score $> 3.0$.dependency_anomaly.py: Constructs service call graph; detects unexpected RPC edge additions.error_spike.py: Detects sudden step changes in error rates using Poisson process estimation.trace_anomaly.py: Evaluates whole-trace structural graph complexity against historical baselines.performance_regression.py: Compares latency distributions between deployment versions using Kolmogorov-Smirnov tests.slow_span_predictor.py: Predicts whether an in-flight trace will breach SLO based on early span durations.dynamic_sampling.py: Dynamically increases sampling rate for services currently exhibiting anomalous behavior.sampling_recommendation.py: Recommends budget-optimized sampling percentages per endpoint.semantic_search.py: Generates vector embeddings for span error messages and exception stack traces.root_cause.py: Causal graph traversal prioritizing deepest downstream failed nodes.llm_engine.py: Structured prompt builder and output parser.
LLM Integration & Prompt Guardrails
- Model Used: External pre-trained LLM API (OpenAI GPT-4o-mini / Claude 3.5 Sonnet)
- Zero Custom ML Training: No custom neural networks were trained; pre-trained foundation models are accessed strictly via API.
- Prompt Guardrails:
- All span attributes pass through the PII redaction engine before prompt assembly.
- System prompt enforces strict JSON schema output (
{ "summary": str, "root_cause": str, "remediation": [str] }). - Temperature set to
0.1for maximum determinism.