Package akka.javasdk.testkit.eval
TestKitSupport test. Cases run against the running
service and are scored on the reply and on the tool calls the runtime traced.
An EvalCase has the command sent to the agent and the
evaluators the reply and the tool calls are checked with. The command is the user message as a
String, or the command handler's own type. The built-in evaluators are in Evaluators. The test prepares the mocked tools before the run. Cases
are written in Java, or derived from recorded production interactions by EvalCaseParser. A derived case carries the recorded tool calls and
expects the recorded behavior as a baseline; the runner loads the recorded results into the
test's stubs through the ToolBindings given to it.
ExperimentRunner calls the agent in a fresh session per
case. Without a Gate every case must pass, which suits a mocked
model. With a real model gate the batch on rates. Tool and model evidence is read from the
runtime trace through TelemetryReader.
Criteria the built-in expectations cannot express, such as tone or completeness, go to a model
through Judge.
SupportAgentEvalTest in the akka-javasdk-tests module is a complete example.
-
ClassDescriptionEvalCase<C>One evaluation case: the command sent to the agent and the evaluators to run against the agent's reply and tool calls.Turns recorded production interactions into cases.The label used in the report to group an evaluator's results.One check over one case's evidence.What an evaluator found on one turn.The built-in evaluators, and the labels used in the report to group evaluator results.Cases bound to the agent under test, ready to run.The cases of an experiment, before the agent under test is named.Runs cases against an agent and collects the results.One attempt: one case's evidence and results from one run.One case over all its runs.The batch outcome: the attempts, the cases over their runs, and the gate's verdict.The outcome of a case over all its runs, or of a requirement over its conclusive runs.One requirement of a case over all runs: one evaluator at one position in the results of the case's attempts.What a batch run must satisfy, checked over all attempts.One turn: the input the agent was given, its reply as text and what the runtime traced while producing it.Decides how well a reply meets a criterion given as a sentence.The judge's answer.The agent behind
Judge.modelBased(akka.javasdk.testkit.TestKit): sends the model one request and reads back aJudge.Verdict.AJudgethat asks a model throughJudgeAgent.One tool call as recorded in production: the tool, the arguments the agent passed, and the result as recorded JSON.The report file as data: whatExperiment.run()writes totarget/eval-reports/<name>-<start time>.json, and whatReportDocument.read(java.nio.file.Path)gives back.One case in one run.One case over all its runs.One requirement of a case over all runs.All zero when no attempt carries model calls.Which injected stub serves which tool, for cases derived from recordings.Loads the recorded result of one call into its stub.