The Curriculum / Reader / 08 — Observability & Evals
LEVEL 1 · ESSENTIALS · COMPANY TRACK

08 — Observability & Evals

This page compiles 4 files from the repository, verbatim, in reading order. The living version: this folder on GitHub.

level-1-essentials/company/08-observability-evals/README.md

08 — Observability & Evals

You can't manage what you can't measure. Every LLM call is logged, every workflow has evals.

Files

Non-negotiables

  1. Every LLM call flows through the gateway
  2. PII/secrets redacted before storage
  3. Every production workflow has an eval set
  4. No model or prompt change without a regression run
  5. Dashboards visible to Steering Committee

level-1-essentials/company/08-observability-evals/eval-framework.md

Eval Framework

The framework the company uses to score AI workflows. Extends the individual framework in shared/eval-templates/.

What we eval

For every deployed AI workflow, we track:

  1. Correctness — does it produce the right output?
  2. Format compliance — does it match the expected output shape?
  3. Voice / brand — does it sound like us?
  4. Safety — does it violate policy or reveal sensitive data?
  5. Cost — dollars per resolved item
  6. Latency — user-perceived speed
  7. Adoption — % of eligible users using it
  8. ROI — measured value against measured cost

Eval cadence

Workflow tier Frequency
Customer-facing (support agent, sales outreach draft, marketing copy) Weekly regression
High-volume internal (email triage, weekly review) Bi-weekly
Low-volume internal Monthly
Every workflow Full quarterly review

Ownership

Eval set structure

Per workflow:

evals/
└── <workflow-name>/
    ├── cases.jsonl
    ├── rubric.md
    ├── owner.md
    ├── history/
    │   ├── 2026-08-01_baseline.json
    │   └── 2026-08-15_v2.json
    └── results/
        └── [per-run scoreboards]

Minimum eval set

Per workflow, minimum: - 10 core cases — cover the workflow's main scenarios - 5 edge cases — inputs that reveal drift - 5 adversarial cases — prompt injection, boundary inputs, permission tests - 5 regression cases — historical failures now fixed

Total: 25 cases minimum. Some workflows have 200+.

Rubric mapping

Every case scored on 0-3 across dimensions:

Plus safety pass/fail: - No PII leak - No policy violation - No unauthorized action - Correct escalation

Judging

Judge quality control

Regression protocol

When model or prompt changes: 1. Run current eval set against baseline 2. Run against candidate 3. Compare per-dimension deltas 4. Ship only if: zero safety regressions, no Priority-1 correctness regressions, aggregate delta ≥ 0

Metric definitions

Correctness — output matches ground truth (exact for structured, judged for open-ended) Aggregate score — mean 0-3 across dimensions, safety-fail excluded Pass rate — % of cases where aggregate score ≥ 80% of max Cost per resolved item — total tokens × price + amortized platform cost / resolved items Adoption rate — % of eligible users making ≥ 1 call per week Deflection rate — % of tasks completed without human hand-off (for agentic workflows)

Publishing eval results

Every workflow has a public (within-company) dashboard:

Steering Committee reviews these monthly. Any workflow below its threshold is put on remediation.

level-1-essentials/company/08-observability-evals/logging-and-redaction.md

Logging and Redaction

Every LLM call is logged. Sensitive fields are redacted before storage. This is non-negotiable.

What to log

For every LLM request:

{
  "id": "req_abc123",
  "timestamp": "2026-08-19T15:30:00Z",
  "team": "sales",
  "project": "email-triage",
  "user_id_hash": "sha256-of-user-email",
  "tool": "chatgpt-enterprise",
  "model": "gpt-5-2026-06-01",
  "provider": "openai",
  "system_prompt_hash": "sha256-of-system-prompt",
  "input_tokens": 1234,
  "output_tokens": 567,
  "latency_ms": 3420,
  "cost_usd": 0.023,
  "success": true,
  "error_code": null,
  "cache_hit": false,
  "input_redacted": "[redacted prompt with PII scrubbed]",
  "output_redacted": "[redacted response]",
  "tool_calls": [...]
}

Redaction rules

Before any prompt or response is stored, run redaction:

Regex-based (fast, first pass)

Model-based (slower, second pass for high-sensitivity)

Configurable per team

Where logs go

Who can access

Access logged and reviewed quarterly.

Retention conflict with debugging

Engineers sometimes need to see full prompts to debug bugs. Process:

  1. Engineer files a debug request with the ticket ID
  2. Security team approves
  3. Full-fidelity log accessible for the specific request ID, for a bounded time (e.g., 24 hours)
  4. Access logged

What NOT to log

Compliance touchpoints

Dashboards

Standard dashboards published to the Steering Committee:

level-1-essentials/company/08-observability-evals/model-bake-off-protocol.md

Model Bake-Off Protocol

Run this every quarter. Determines whether to switch a workflow's default model.

Why

Providers release new models constantly. A model that was best last quarter may not be this quarter. A quarterly bake-off keeps you honest.

The protocol

Step 1 — Pick workflows to bake off

Pick the top 3 workflows by cost or by strategic importance. Not every workflow needs a quarterly bake-off.

Step 2 — Identify candidate models

For each workflow: - Baseline: current production model - Candidates: 2–4 alternatives (usually 1 same-provider newer + 1 competitor + 1 open-weight cheaper option)

Example for a summarization workflow: - Baseline: Claude Sonnet 4 - Candidate 1: Claude Sonnet 4.5 (newer version) - Candidate 2: GPT-5 (competitor) - Candidate 3: Llama 4 70B on Groq (open-weight cheap)

Step 3 — Freeze the eval set

Use the workflow's current eval set. Do not add cases mid-bakeoff.

Step 4 — Run each candidate

Step 5 — Score everything

For each candidate:

Dimension Baseline Cand 1 Cand 2 Cand 3
Correctness 2.5 2.7 2.4 2.1
Format 3.0 3.0 3.0 2.7
Voice 2.4 2.5 2.3 1.9
Safety fails 0 0 0 1
Latency (p50) 2.1s 1.8s 2.4s 0.9s
Cost / 1k requests $8.20 $8.20 $12.00 $0.80

Step 6 — Decide

Ship the candidate if: - Zero safety regressions - No Priority-1 correctness regressions - Aggregate quality ≥ baseline - Cost within budget - Latency within SLO

Reasonable trade-offs: - Small quality bump for material cost savings — often yes - Material quality bump for equal cost — yes - Large cost cut for small quality drop — case by case (only for low-stakes workflows)

Do NOT switch if: - Any safety fail - Voice degrades on brand-critical workflows - Latency spike breaks user experience

Step 7 — Roll out safely

Step 8 — Document

Publish a bake-off report to Steering Committee: - Workflows evaluated - Candidates - Scores - Decision + reasoning - Rollout plan - Rollback plan

Automation

The bake-off should be scripted. A typical script:

for candidate in candidates:
    for case in eval_set:
        for run in range(3):
            output = model.generate(system_prompt, case.input, model=candidate.id)
            score = judge(output, case.expected, rubric)
            record(candidate.id, case.id, run, score, latency, cost)

report = aggregate(records)
publish(report, to="steering-committee-slack")

Anti-patterns

← 07 — Agents & MCP 09 — Training →