Write evaluation scenarios
Each scenario has a question and optional ground truth: an expected answer, assertions, or both. The ground truth that a scenario needs depends on the evaluators you select.
| Field | Console column | Used by |
|---|---|---|
|
|
Query |
Every scenario. The question that agentic retrieval answers. |
|
|
Expected answer |
Correctness. The answer that a correct response matches. |
|
|
Assertions |
Goal success rate. Statements that a correct response satisfies, scored together. |
|
|
– |
Optional. A unique ID of 1–64 letters, numbers, hyphens (-), and underscores (_) that starts with a letter or number. If you omit it, AWS Context uses the scenario’s position in the set, starting at 0. |
Use the following practices when you write scenarios:
-
Draw questions from what your agents actually ask, such as questions from agent traces or support requests.
-
Cover each source and each important entity type, so a regression in one area shows up in the scores.
-
Give each scenario the ground truth that its evaluators use. Without an expected answer, Correctness checks only factual accuracy, not agreement with an expected answer. Without assertions, Goal success rate judges only whether the response met the user’s goals.
-
Write expected answers that state facts, not wording, because Correctness disregards style and presentation.
-
Write each assertion as one statement that a correct answer satisfies, such as a fact it must include. Goal success rate judges a scenario’s assertions together, by intent rather than exact wording, and gives one pass or fail result.
-
Keep each question answerable from the Agent Context. If retrieval can’t answer within its time budget, the evaluators don’t score the scenario.
In the console, choose Upload scenarios to load a JSON, Markdown, or YAML file, or choose Add manually from its menu to type scenarios. Choose View examples to see the file formats.