AI Root-Cause Diagnosis Engine — Fixly
By (author)Sehreen Atta Gul
read more
Read Me
AI Root-Cause Diagnosis Engine — Fixly
What it does
Analyzes an incoming incident (error log, stack trace, occurrence count) and produces a structured diagnosis: severity (LOW/MEDIUM/HIGH/CRITICAL), root cause explanation, confidence score (0–1), and whether an automated fix exists.
How diagnosis is built
1. Checks for a configured AI provider (Groq Llama 3.3); if available, sends the incident context and parses a structured JSON response.
2. If no AI key is present, falls back to a deterministic rule engine matching known error signatures (connection/timeout, null reference, syntax errors, permissions, memory).
3. Boosts confidence score based on occurrence count (recurring errors are more confidently classified).
4. Broadcasts a diagnosis:created WebSocket event so the live dashboard updates instantly.
Key design
The AI call always has a safe fallback — if the AI provider fails or isn't configured, the system never breaks; it degrades gracefully to rule-based diagnosis so the incident pipeline keeps working end-to-end.