Interview knowledge
Article

A beginner's guide to testing AI agents

Software testing used to be relatively straightforward. You wrote business logic, defined expected outputs, and verified them with unit, integration…

Read the original →

Highlights

Passages saved from the original.

  • Instead of fixed logic, we now build systems powered by models that are probabilistic. The same input can produce different outputs. Behavior depends on prompts, context, tool calls, and external data. The "correct" answer is fuzzy.
  • The possibilities for LLM-as-a-Judge are theoretically infinite. The danger of this type of evaluator is that it is also not deterministic and could return different results for the same set of inputs and outputs. The test is also sensitive to changes in the judge model. For these reasons, the LLM-as-a-Judge prompt needs to be properly built to remove as much ambiguity as possible.

Summary AI-generated

Summarised by an AI assistant when this source was saved. Double-check against the original.

In summary, the most interesting aspect is that testing AI agents requires building a continuous feedback loop that combines automated evaluators with manual trace review to manage non-deterministic behavior.

  • Adopt a continuous feedback loop using tracing, offline evals, online evals, and manual trace review.
  • Use a mix of deterministic code-based evaluators and LLM-as-a-Judge evaluators based on testability and cost.
  • Supplement automated tests with manual trace review to discover new failure modes in an infinite input space.

Notes this inspired