AI Engineer World's Fair 2026
How Evals and Prompts Shape Agent Behavior — Preetika Bhateja & Daniel Bump, YouTube Ads
Loading slides…
Read the talk
How Evals and Prompts Shape Agent Behavior
Reliable agents need more than better prompts: they need focused tools, shared rating criteria, trace inspection, and launch decisions grounded in recurring behavior.
From a talk by Preetika Bhateja and Daniel Bump
Before you start: Familiarity with LLM prompts, tool-using agents, and basic machine-learning evaluation will help.
Reliability starts with the agent’s foundation
How do you make an agent reliably do what you intended once real users begin interacting with it? For Preetika Bhateja and Daniel Bump, working on image and video models for YouTube Ads, building an agent is only the beginning. The harder problem is anticipating how it will use its capabilities and whether its behavior will remain acceptable in production. Evaluations provide a way to examine that behavior systematically.
Start with a focused set of LLM-friendly tools, and optimize those tools before expanding into comprehensive agent evaluations. Once that foundation works, an independent critique agent can inspect results and feed problems into a remediation loop. This gives the system a way to correct shortcomings that its base tools do not handle on their own.
With the basic structure in place, evaluations make changes assessable: did a modification help, and does an ablation—removing a component or change—show that it contributed value? Reliability depends on capabilities, guardrails, and evaluations together. An evaluator measures the system; it does not replace the tools and constraints that make good behavior possible.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Define success, then learn from the outputs
A generative system can succeed on a task in one run and fail in another. That variability makes a few successful demonstrations insufficient evidence of reliable behavior. Evaluation begins by defining the target output and making the criteria for success strict enough to measure across many runs.
Those criteria need not begin as a comprehensive evaluation system. Bump recommends inspecting outputs manually early on: explore the agent’s capabilities, notice obvious failures, change something, and see what happens. This informal work is not scalable, but it builds familiarity with the system while iteration is cheap. Prompt changes can matter substantially at this stage, and the architecture may still need radical revision.
The purpose of early inspection is to discover failure patterns that will later become evaluation cases. Moving to scaled raters too soon can create an evaluation rollercoaster: the team keeps recalibrating the evaluator while also changing the agent underneath it. The slide illustrates that churn, rather than reporting a measured performance curve. Stabilize your understanding of the task before investing heavily in its measurement.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Collect explanations for each quality dimension
A pass or fail tells you the judgment, but not what to improve. Ask raters to explain their decisions. This applies both when judging an output on its own and when comparing two models side by side: the explanation reveals why one result worked or why another was preferred.
Ads make the limitation of a single verdict especially clear. The team asked raters about several dimensions:
| Dimension | Rating question |
|---|---|
| Accuracy | Is the ad accurate? |
| Brand safety | Is the ad safe for the brand? |
| Expected behavior | Did the agent do what was expected? |
An ad can satisfy brand safety while failing accuracy. Preserving separate judgments and explanations makes that distinction available for diagnosis and subsequent training.
A small TypeScript record can preserve this structure without forcing every concern into one Boolean. Each dimension carries both a verdict and its explanation; an unresolved judgment remains visible instead of silently becoming a pass or fail.
typescript
type Verdict = "pass" | "fail" | "unknown";
type Dimension = "accuracy" | "brandSafety" | "expectedBehavior";
type Judgment = {
verdict: Verdict;
explanation: string;
};
type AdEvaluation = {
caseId: string;
judgments: Record<Dimension, Judgment>;
};
function needsReview(evaluation: AdEvaluation): Dimension[] {
return (Object.keys(evaluation.judgments) as Dimension[]).filter(
(dimension) => {
const judgment = evaluation.judgments[dimension];
return judgment.verdict !== "pass" ||
judgment.explanation.trim().length === 0;
},
);
}
This is a way to represent the evaluation feedback, not an automatic rule for deciding whether an ad is ready to launch.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Calibrate automated judges against people
When an LLM judge enters the evaluation process, its judgments also need evaluation. Bhateja describes monitoring agreement or disagreement through a sampling pipeline: have a human rater or expert and the automated judge assess the same cases, then track whether their agreement is trending within the team’s expected range.
Agreement monitoring should be paired with spot checks. Inspect the explanations behind pass/fail decisions, and look at agent traces when the final verdict leaves the behavior unclear. The reference data must also be broad enough to cover diverse use cases and consistent enough that humans agree on its labels. Otherwise, a disagreement with the judge may reflect an unstable reference judgment rather than a judge failure.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
The agent detected the disclaimer—and removed it
The team had a concrete preservation requirement: for legal reasons, the agent must never remove disclaimers. They repeated that instruction in the prompt, and behavior initially appeared satisfactory. Then edge cases emerged in which the agent recognized a disclaimer and removed it anyway.
An aggregate pass rate did not explain what had gone wrong. Inspecting the trace exposed the sequence: the agent detected a disclaimer, then indicated that it would remove it. That distinction matters for debugging. The visible failure was not simply an inability to detect the text; detection was followed by an action that violated the instruction. A trace is a diagnostic record, not direct access to the model’s underlying causal reasoning.
Bhateja made the failure concrete with a public-parks ad she created. Its headline reads “America, we can do better,” and the input includes a small paid-by disclaimer near the bottom right. After processing, the disclaimer is absent despite the instruction to retain it. The side-by-side frame shows the actual preservation failure; the account does not include a successful remediation.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Keep a test set outside the iteration loop
Agents inherit a familiar machine-learning problem: the data used to develop them does not guarantee generalization. Maintain cases that exercise edge conditions and broader capabilities, rather than testing only the situations the team has already optimized.
The traditional distinction between development, validation, and test data remains useful. Keep a test set, consult it sparingly, and refresh it with production data. Using it sparingly preserves its value as a check on generalization; refreshing it keeps that check relevant as actual usage changes.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Improve the evaluator and the agent together
Bump describes a quality-improvement loop that begins with human evaluation:
- Check the quality bar. If the result meets it, that iteration can finish.
- Diagnose the shortfall. Review the evaluation set and relevant measures, such as precision and recall.
- Change the appropriate component. Revise evaluation cases or the rating guide when the measurement is wrong; adjust the model, agent, or tools when behavior needs improvement.
- Evaluate again. Use the increasingly well-defined evaluator to assess changes and run ablations.
The evaluator and the agent can both evolve, but the evaluator needs to become dependable enough to tell whether an agent change helped.
As launch approaches, improvement alone is not the question. Identify where performance degraded and why. A change may introduce an acceptable trade-off, or it may cause a critical failure. The evaluation needs enough detail to distinguish those outcomes instead of hiding them inside an overall score.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Optimize patterns, not isolated runs
A tempting response to one failed run is to inspect its trace and immediately patch the prompt. But a nondeterministic system can make that patch look effective on the next run without resolving the underlying problem. Use an isolated failure to investigate a pattern, not as sufficient evidence for a prompt change.
Include multiple examples of important patterns in the golden set, then examine how often the agent fails across those examples. The unit of improvement is the recurring behavior, not one memorable output. Online evaluations extend that discipline to actual usage, checking that the data being evaluated still represents the real world.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Let evaluation mature with the product
The right evaluation system depends on what the product must do well and how mature the agent is. An MVP needs a different breadth of evidence from a production rollout. The product goal stays central while the cases, coverage, and evaluation operations become more demanding.
Keeping that system useful requires ongoing work: online evaluations, sampling pipelines, test sets refreshed with production data, and curated golden sets that change with the use cases. It also requires training the people doing the ratings, whether they belong to cross-functional product teams or a scaled rating operation. Templates and rubrics need clear examples so raters understand what is expected and can handle difficult cases consistently.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Define launch criteria before deciding to launch
Unclear expectations can leave many cases marked unknown, weakening the evidence available for a launch decision. Choose launch metrics deliberately, compare model variants through A/B differences or ablations, and inspect the regressions those comparisons reveal. Decide which degradations are acceptable and which block release.
The gatekeeping rule should be explicit early. Precision and recall may be appropriate for some judgments, while other model evaluations need different measures. The requirement is to connect the chosen metric to the behavior the product needs and specify what constitutes sufficient evidence to launch.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
How much judging should be automated?
The audience’s closing question asks whether all evaluations are performed by humans, whether LLM judges are also used, and how those judges are calibrated. Bhateja’s answer is use-case dependent: the team works across many systems, so there is no single judging arrangement that describes them all.
She does not disclose the detailed benchmarking setup or numerical calibration targets. The practice she does reaffirm is to maintain sampling pipelines and monitor disagreement between human and automated judgments. Automated evaluation therefore remains connected to human assessment as the cases and systems change.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Resources
Further reading
Google Cloud guidance on human-reference benchmarks, autorater calibration, customized rubrics and agent trajectory evaluation, with links to implementation tutorials.
Research testing whether changing a model's expressed reasoning changes its answers, showing that reasoning faithfulness depends on the model and task.
Full transcript
Loading transcript…