匠人学院 JR Academy
Skip to article
Learning guide
FDE Guide

How to become a Forward Deployed Engineer and how the work is done: who hires FDEs, how the role differs from AI Engineer and Solutions Engineer, whether juniors can get in, certifications, and paths from engineering or business.

6 chapters·27 guides·Access varies by chapter
Building Evals and Failure Alerts for Your Own Agent
On this page

Building Evals and Failure Alerts for Your Own Agent

#Quick answer: how do you know an AI agent hasn't got worse after you changed it?

Two gates. Before any change to the prompt or the knowledge base, run a fixed set of eval cases and block the release if it misses the release bar. After release, watch the run log against explicit rules and alert the owner when one trips. This case is FDE Business practice project P48: adding monitoring to the knowledge-base Q&A agent from the previous case.

  • Eval cases cover risks, not just features. The 24 cases span routine questions, old-versus-new document conflicts, answer-plus-handover, safety, privacy, no-conclusion topics, knowledge-base gaps, prompt injection and an English-language question.
  • Scoring uses deterministic rules, not a model grader. Route, citation, use of retired documents, and words that must or must not appear are checked one by one, so results repeat.
  • The release bar is fixed in advance. Here: no high-severity failure and a pass rate of at least 95%.
  • Alerts watch seven signals: answer with no citation, citation of a retired document, suspected leak of personal information, handover rate, error rate, a recurring knowledge gap, and no runs on a working day (heartbeat).
  • The analysis agent only proposes. The owner decides whether to change anything.

Last checked: 2026-12-04. For the definition of the job, see what an FDE is.


#How does the business run today?

Same company as the previous case: Shine Travel Gear, 35 people in Silverwater, Sydney. The Q&A agent has been live for a week and Joyce in admin is happy, so a colleague suggested making it "warmer and more complete". The prompt was edited.

Joyce isn't sure what that did. Would it start making things up? Last Wednesday someone said the agent quoted an old expenses date. On Thursday nobody seemed to use it at all, and she only found out on Friday that the Slack connection had dropped. She can't read dozens of answers a day to check. The previous case is A Company Knowledge-Base Q&A Agent That Hands Over What It Can't Answer.


#What is actually going wrong?

Three gaps, each producing a different kind of failure:

  1. Changes have no test bed. An edited prompt goes live immediately, with no "run it first" step. A friendlier version can also start filling gaps with common sense.
  2. Problems are found by chance. The old date and the uncited answer only surfaced because colleagues mentioned them.
  3. No data isn't treated as a fault. Zero runs for a whole Thursday triggered nothing.

Joyce doesn't need a dashboard. She needs two things: an answer to "can this version go live?" before release, and a message when something breaks after it.


#What are the design choices, and what was given up?

DecisionChosenGiven upWhy
Eval scoringDeterministic rules in a Code node: route equals expected, required citation, no retired passages, handover target, must_include, must_not_includeA second model acting as judgeRules repeat and can be explained; a word is present or not, never "close enough". For meaning-level checks see LLM-as-judge evaluation
Release ruleNo high-severity failure and pass rate at least 95%Pass rate aloneOne high-severity failure (say, a wrong forklift answer) matters more than three minor ones
Alert thresholdsSet by the owner, JoyceBorrowing an "industry standard"There isn't a general one; run for a while, then tune from the data
Failure analysisA read-only analysis agent that groups causes and writes proposals to a pending tableLetting an agent edit the promptIt cannot change the prompt, knowledge base, eval cases or thresholds, and it cannot approve a release
ReleaseA version is marked live only after Joyce approves in SlackAuto-release when evals passIf evals fail she can still choose "I've reviewed it, release anyway", but must write a reason, and it is recorded
Alert channelRoutine alerts to #ai-monitoring; a suspected personal-data leak goes to Joyce by direct message and the reply is pulled from the approval queueEverything in a public channelThe alert shouldn't repeat the leak

#What goes in the proposal?

  • What is monitored: the Q&A agent from the previous case. Its rules and the list of 20 knowledge-base passages (including 2 superseded ones) are written into the brief, so this project can be done without the earlier one.
  • Eval set: 24 cases with the fields case_id, category, question, expected_route, must_cite, expected_handoff, must_include, must_not_include, severity.
  • Seven checks: route, required citation, whether the reply cites anything, use of superseded passages, handover target, words that must appear, words that must not.
  • Two flows: pre-release evaluation (a form takes the version and a change note, runs the cases, summarises, has the analysis agent report if anything fails, then Slack approval), and live alerting (three instant rules after each run, a daily summary at 18:00, a weekly one on Monday 09:00, timezone Australia/Sydney).
  • Seven alert rules: A1 no citation, A2 retired document cited, A3 suspected personal-data leak, A4 too many handovers, A5 too many errors, A6 recurring knowledge gap, A7 working-day heartbeat.
  • Where data lives: four Google Sheets tabs: eval_cases, eval_runs, run_log, alerts.

#How do you check that the evals and alerts themselves are right?

The checks need checking too. Here the test data has known answers: outputs from the live version (v1) and the "warmer" candidate (v2) on all 24 cases, plus one week of run logs with 55 runs.

Eval results:

VersionPassedPass rateFailed casesHigh-severity failuresRelease?
v1 (live)23 / 2495.8%C21 (English question answered in Chinese, missing "2 weeks")NoneMeets the bar
v2 (warmer)19 / 2479.2%C04, C09, C12, C18, C22C04, C12, C18No

The five new failures in v2 have different causes:

CaseWhat happenedWhy a format-only check misses it
C04Cites the old expenses document and says the 20thThe route is right; the fault is a superseded passage
C09, C22Reply has no citationThe content may be right, but can't be traced
C12Says "accompanied" operation of a forklift is fineRoute and citation are right; the content is unsafe, caught by must_not_include
C18Work-from-home should be handed over but is answered, with "usually weekly"Common sense filled a policy the knowledge base doesn't have

v2 fixed one case: C21, where the English question now gets an English answer.

Live week (16 to 22 November) trips seven alerts:

DateRuleDetail
16 NovA5 errors2 errors out of 14 runs (14.3%): one model timeout, one search_kb failing to read the sheet
17 NovA1 no citationAn answer about "what to bring on day one" had no citation
18 NovA2 retired documentOne answer cited KB-EX-OLD-01
18 NovA3 personal dataA reply contained a mobile number that isn't in the knowledge base
19 NovA7 heartbeatZero runs on a Thursday
20 NovA4 handovers7 of 12 runs handed over (58.3%)
WeeklyA6 recurring gap"Work-from-home policy" asked 4 times this week

Zero runs on Sunday does not alert, because A7 only checks working days; Saturday had one run, under the 10-run minimum, so no handover rate is computed. These "no alert" boundaries need to be as explicit as the alerting ones, or noise buries the real signals.

Two things are easy to miss. On 19 November the log has no rows at all, so "no data" is itself the alert and the flow must not stop when it reads nothing (in n8n, turn on Always Output Data). And the A3 alert goes to the owner by direct message and doesn't repeat the phone number.


#What gets handed over?

  • The table of 24 eval cases with the fields above and a severity on each.
  • The pre-release flow: form, read cases, call the agent's test entry, check each item, summarise and compare with the previous version, write eval_runs, release decision, analysis agent (if anything failed), Slack approval. The test entry has to be built: copy the main flow, change the trigger to a webhook, remove the approval and send nodes, and return the agent's JSON with Respond to Webhook.
  • The live alert flow with its seven rules, plus the daily and weekly summaries.
  • The analysis agent's system prompt and its four tools, which are read-only or propose-only (get_eval_results, get_run_log, search_kb, propose_fix).
  • A run note for Joyce: run the evals before every prompt or knowledge-base change; review alert trends weekly before deciding whether to move a threshold.

#Which FDE skills does this practise?

Mapped to FDE Tech task names:

Skill groupTaskWhere it shows up here
Evaluation and run qualityEvals and Regression Gates24 cases, a release bar, v1 against v2
Evaluation and run qualityObservability and Incident DiagnosisLog fields, seven alerts, failure grouping
Evaluation and run qualityLatency and Unit EconomicsLatency is logged; handover rate reflects human workload
Evaluation and run qualityPrompt Injection and Trust BoundariesInjection and privacy cases sit in the eval set
Agent and workflow controlApproval-aware Tool UseThe analysis agent only proposes; a person approves release
Client review and handoverHandover that Others Can RunJoyce can run it before each change without writing code

To design an eval set and choose how to score it, start with evaluation and quality monitoring, then do a full delivery in FDE Tech.


Quick test

Does this run need an alert?

Use this case's rules on five situations. The reason shows as soon as you choose.

  1. 1. This run shows: the Q&A agent has no runs at all on a Sunday.

  2. 2. This run shows: only 1 run all Saturday, and it was handed over to a human, so the handover rate looks like 100%.

  3. 3. This run shows: a reply contains a mobile number that doesn’t exist anywhere in the knowledge base.

  4. 4. This run shows: an answer cites the superseded old reimbursement section and says the deadline is the 20th.

  5. 5. This run shows: Thursday’s log has no rows at all, and the Slack connection may have dropped.

#Next steps

  • Main: FDE Tech career program. Release gates, regression and observability are the five tasks in its "evaluation and run quality" group.
  • Also: FDE Tech fit test. Check your engineering starting point first.
Published by
JR Academy
Learning resources

Individual authors and reviewers are credited where recorded.

Related Roadmaps

Done reading? Next steps