Before you begin
- Evals SDK: The
atlanaiSDK installed, withATLAN_API_KEYandATLAN_WORKSPACE_IDset. See Run your first eval. - Released metrics: The metrics the questions need show Live in Studio. See Release metrics.
- An agent you can call from code: A function that takes a question and returns the agent’s answer. It can wrap Claude, a Cortex agent, or your own agent.
- Questions with known answers: 15 to 30 to start. If your team already has an eval set, such as questions with expected SQL or expected numbers, use it.
Write golden questions
A golden question is one your business asks, with the answer an analyst has confirmed. Good ones:- Come from real use. Take them from executives’ requests, dashboards people check, or questions agents got wrong.
- Have one right answer. “What was average order value in March 2026?” has one. “How are sales going?” doesn’t.
- Name the metric that should answer them. That lets you tell a wrong number from a wrong metric.
- Cover how people phrase things. Include “AOV”, “average basket”, and “average order value” if people say all three.
Push questions to dataset
Store the questions as a dataset in your workspace, so every run is scored on exactly the same cases.source_kind to external and source_ref to where they came from. See Create eval datasets.
Wrap agent as task
Your task calls the agent and returns two things: the number it answered with, and the metrics it read. Record the metrics from the agent’s tool calls, where they ran, not from what the agent says: look forregistry__get_artifact calls on a metric, and extension__metric__search_metrics calls that found one.
Score answers
Score each case twice: is the number right, and did the agent read the metric it should have?Read what went wrong
Open the experiment in Evals. For each failed case, the two scores tell you where to look:
Open a case’s trace to see every tool call the agent made: what it searched for, which metric version it read, and the SQL it ran.
Check fix before everyone gets it
- In Studio, edit the metric. Saving creates a new revision, and agents keep reading the released one.
- Release the revision on a channel other than
latest, or pin your test agent to the new version. See Connect agents to your metrics. - Run the eval again with a new
candidate, for exampleconfig={"candidate": "aov-fix"}. - Compare the two experiments. See Compare two agent versions.
- If the score went up and nothing else went down, release the revision on
latest.
Next steps
- Turn production failures into test cases: Add the questions agents get wrong in real use.
- Run evals in CI: Score every change before it ships.
- Metric Studio errors: When an agent can’t find a metric.