← All courses

EDGE FDE

Intermediate

On-Device AI Eval Harness for CI

Catch regressions in CI so a prompt change does not quietly break the product.

Evaluations harness with trajectory grading and Swift Testing CI gates.

Grade behavior, not string equality. Fail the pull request when ToolsAllPass drops. iOS 27 and macOS 27 only.

What you'll learn

Notes that shaped this framing: Alex Lieberman (@businessbarista) on evals, from a call with Viv Trivedy (@Vtrivedy10). The rest of the course stays on Apple Evaluations in Swift.

Lessons

  1. Equality tests fail on language models
  2. Meet Apple's Evaluations framework
  3. Grade the tool trajectory
  4. Gate CI on metrics
  5. Grow the set without user text

Key concepts

Takeaways

Agent briefs

FAQ

Why not test LLM output with string equality?

String equality is the wrong test for language models. Grade behavior instead. An eval encodes what the team thinks is right.

Which framework does the course use?

Apple's Evaluations framework on Xcode 27 on a Mac, with Swift Testing CI gates. iOS 27 and macOS 27 only.

How do I grade tool calls?

TrajectoryExpectation and ToolCallEvaluator cover tool paths and side effects, so you grade what the agent did, not just the final text.

How does CI fail a pull request?

Gate CI on a mean metric threshold the team can say out loud. The pull request fails when mean ToolsAllPass drops below it.

Do evals need real user text?

No. Use fixtures, not the live user vault. Grow a reviewed sample set without putting raw user text in the default repo.

Related courses

Stream tokens and measure speed · Trace every step of an AI call · Version prompts like product copy · Turn feedback into a better local model · AI Full-Stack Operator · Test Local Decision Models (/v1/systemone)

Official references

Evaluations · WWDC26 298 · WWDC26 299