Applied AI and reliability engineering

Incident Triage Assistant

Grounded incident guidance with deterministic retrieval evidence.

Role
Solo developer across retrieval, structured AI output, CLI, Streamlit, tests, and evaluation
Evidence status
Retrieval verified; live Claude path pending a local API credential
Verified
2026-07-22

01

Problem and scope

The assistant turns an alert, log excerpt, or stack trace into a structured triage. A dependency-free BM25 stage retrieves relevant runbooks, then Claude is designed to return a typed root cause, severity, remediation plan, commands, citations, and escalation guidance.

  • Python
  • Claude API
  • BM25
  • Pydantic
  • Streamlit
  • pytest

02

Architecture

  1. Incident input

    Alert, error, log excerpt, or stack trace

  2. BM25 retrieval

    Ranked lookup across seven infrastructure runbooks

  3. Claude reasoning

    Prompt grounded in the top retrieved runbooks

  4. Typed triage

    Root cause, severity, steps, commands, citations

Text equivalent: the stages above flow from left to right, with each stage passing its result to the next.

03

Engineering decisions

Lexical retrieval first

Infrastructure errors share exact tokens with runbooks. BM25 keeps the first stage transparent, fast, offline-testable, and free of embedding infrastructure.

Typed output boundary

A Pydantic schema makes the model response usable by a CLI, interface, ticket, or future integration without brittle text parsing.

Retriever protocol

The retrieval interface can accept a semantic implementation later without changing the triage engine.

04

Verification evidence

  • All 16 offline tests passed on July 22, 2026.
  • All 10 labelled retrieval cases returned the expected runbook within the top three.
  • MRR was 1.000, so the expected runbook ranked first in every evaluation case.
  • The live Claude generation path was not run because no Anthropic key was available on the machine.
verified-2026-07-22
$ python -m pytest
16 passed in 0.17s
$ python evals/run_evals.py
hit@3: 10/10 (100%) · MRR: 1.000
△ live Claude evaluation pending credential

05

Limitations

Next step

Discuss the engineering behind this work.

Email PesanthDownload résuméRepository remains private