Back to portfolio

Case study · AI evaluation · Agentic workflow

Agentic AI Evaluation Platform

An evidence-grounded analytical review prototype that compares single-shot and tool-using workflows across synthetic model-monitoring cases. Schema-constrained findings cite traceable evidence IDs, a distinct reviewer agent checks them, deterministic validation and an explicit escalation policy decide what needs a human — evaluated end to end on 600 synthetic cases with 127 passing tests and a 9-page Streamlit dashboard.

Mock-provider disclosure: canonical results throughout this page come from a deterministic offline mock provider, used to evaluate architecture, traceability, validation, and workflow behavior. They are not measurements of a production model or deployed business system. The Anthropic tool-use loop is implemented, SDK-verified, and end-to-end unit-tested with a stubbed client, but it has not yet been executed against the live Claude API.

Problem

Reviewing model-monitoring anomalies is a judgment-heavy, easy-to-get-wrong task. A reviewer has to separate true anomalies from ordinary noise, recognize seasonality and recovery effects, notice when a metric's definition changed rather than its underlying behavior, assemble the evidence that actually supports a conclusion, write the finding up consistently, and leave a clear record of who decided what.

Intended user

Designed as a prototype for analysts or model reviewers who need to evaluate monitoring anomalies, trace findings back to specific evidence, compare architectures, and retain a clear human decision trail. No real analyst has used it in production — it's a working demonstration of the workflow, not a deployed tool.

Workflow before the tool

No measured baseline is claimed here. Qualitatively, this kind of review tends to be manual and inconsistent: an analyst reads a metric history, applies informal heuristics for what counts as an anomaly, and writes up a finding with no standard way to trace which evidence was used, compare one reviewer's judgment to another's, or check it against a transparent rule.

What I built

How it works

Evidence store

Stable, ID-addressable items per case — pre-rendered (single-shot) or retrieved via tools (agentic).

QA agent

Schema-validated finding citing specific evidence_ids.

Reviewer agent

Checks evidence support, severity, unsupported claims.

Deterministic validation

7 checks: evidence IDs exist, numeric consistency, tool-call limit, and more.

Escalation policy

Auto-approve or human review, with the exact reason recorded.

Where the LLM acts, where deterministic logic acts

LLM-dependentQA agent's finding · reviewer agent's check · (agentic only) deciding which evidence tools to call
Deterministic, no LLM involvedEvidence store & retrieval tools · schema validation · 7 output-validation checks · rule-based baseline · escalation policy

Only two calls in the whole pipeline touch a language model per case — the QA agent's finding and the reviewer's check. Everything downstream of those two calls (existence-checking evidence IDs, numeric consistency, the escalation decision) is plain code with no model involved, so it behaves identically on every run and is unit-tested without needing a model at all.

Single-shot vs. agentic: what the comparison shows

Both architectures draw from the identical per-case evidence — they differ only in delivery: single-shot renders it all into one prompt; agentic retrieves it via bounded tool calls. In mock mode, both conditions deliberately share the same underlying decision policy, so the comparison isolates the evidence-delivery mechanism, not decision quality.

Single-shot accuracy0.557
Agentic accuracy0.572
McNemar p-value0.503
Avg. tool calls0.00 → 3.36

The accuracy difference is not statistically significant (p=0.503) — exactly what the controlled design predicts, since both share the same decision policy. This result should not be read as evidence that the agentic architecture improves, or degrades, model quality. What it demonstrates is that the tool-retrieval, evidence-citation, and tool-call-limit machinery all work correctly end to end under a controlled comparison. Whether a live agentic Claude run would find different or better findings than single-shot is a separate question this mock comparison cannot answer.

Inputs and outputs

The agent's response is validated against a Pydantic schema (src/schemas.py) with extra = "forbid". Key fields, including the new evidence_ids:

AgentFinding {
  anomaly_detected: bool
  severity: "none" | "low" | "medium" | "high"
  anomaly_type: str
  summary: str
  observations: [str]              # facts only
  possible_explanations: [str]     # hypotheses only, never asserted as fact
  supporting_evidence: [EvidenceItem]
  evidence_ids: [str]              # must reference real items — checked
                                    # deterministically, not by the schema
  confidence_score: float          # validated in [0, 1]
  evidence_sufficiency: "insufficient" | "limited" | "adequate" | "strong"
  unsupported_claim_risk: "low" | "medium" | "high"
  requires_human_review: bool
  abstained: bool
  abstention_reason: str | None
}

A real logged case (case_0000, from outputs/sample_agent_outputs.json — a mock-mode run, not a live model):

case_id: "case_0000"     model_id: "model_08"     metric: "score_mean"
scenario_type: "normal_variation"

pred_anomaly: false             confidence: 0.5985
pred_severity: "none"           evidence_sufficiency: "adequate"
unsupported_claim_risk: "low"   requires_human_review: false

deterministic_validation_passed: true
reviewer_decision: "approve"

Normal variation, correctly predicted as no anomaly, validation passed, reviewer approved, no escalation — the routine case. The Screenshots section below shows one where evidence, finding, reviewer output, and escalation are all visible together for a single case.

Error handling and validation

Tech stack

Evaluation

Mock-provider disclosure: the figures below are from the deterministic offline mock provider, not a live model.
Cases600
Agent precision0.593
Agent recall0.503
Agent F10.545
Rule-baseline F10.586
Unsupported-claim rate0.043
Schema compliance1.000
Deterministic-validation pass rate0.788
Escalation rate0.572
On the two F1 numbers above: the agent's F1 (0.545) is lower than the rule-baseline's F1 (0.586) in this condition, and across all 16 tested conditions the agent's F1 never exceeds the baseline. The rule baseline isn't a target the agent beats — it's a reference measurement: a simple magnitude-only rule that also predicts "anomaly" on 100% of the false_positive_trap and metric_definition_change cases, where ground truth is never an anomaly. Its per-scenario F1 on those trap types is 0.000 — it looks strong only because it also gets the easier majority of cases right. Raw decision F1 is one axis among several this study evaluates, not a leaderboard between the agent and the rule.

Calibration: expected calibration error 0.120, Brier score 0.261.

Design decisions

Adoption & documentation

Quick start (mock mode, no API key required):

python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python -m pytest                     # 127 tests, entirely offline

python -m src.experiment_runner      # single-shot + agentic + 20 more conditions
python -m src.reporting              # regenerate reports/research_summary.md
streamlit run app.py                 # 9-page dashboard shown below

Live-model experiments are optional, require anthropic and an API key, and are never run by default.

Screenshots

Streamlit Study Overview page showing the 8 research questions this study answers and headline metrics for one experiment condition, mock-provider disclosure banner visible
Study Overview — the dashboard's landing page: the 8 research questions the evaluation answers and headline metrics for whichever experiment condition is selected.
Streamlit Review Queue page listing cases with alert type, severity, confidence, and escalation reasons, mock-provider disclosure banner visible
Review Queue — every case with its escalation status and reasons, filterable to just what needs human review.
Streamlit Case Review page showing the experiment/model/metric/scenario/case selectors and a quarterly metric-history chart for one case
Case Review — case selection controls and the metric history the agent and reviewer see before producing a finding.
Streamlit Experiment Comparison page, bar chart of precision by prompt version on a full 0-to-0.6 axis, mock-provider disclosure banner visible
Experiment Comparison — precision by prompt version, grouped by any axis, with the mock-vs-live caveat stated directly beneath the chart.
Streamlit Methodology and Limitations page stating the mock-versus-live distinction and known limitations
Methodology & Limitations — the mock-vs-live distinction and known limitations, stated plainly, not in fine print.
Streamlit Calibration page showing a reliability diagram of observed accuracy versus confidence, expected calibration error 0.127, Brier score 0.261, for one experiment condition
Calibration — reliability diagram for one experiment condition (mock_ablation__000); this condition's ECE (0.127) differs slightly from the 0.120 cited above, which is computed on the primary condition — both are real, both are mock-provider figures.

Responsible AI

The system enforces evidence-based conclusions and an explicit observation-vs-hypothesis distinction, requires uncertainty and abstention fields, flags cases for human review via an explicit escalation policy, versions prompts and models, logs provenance, and uses only synthetic data. The agent is positioned as an assistant to analyst judgment, never as a replacement.

Limitations

What I'd improve next