"4", so one case passes and one fails. Once it works, Score agent behaviour replaces the stub with your agent.
Before you begin
Before you start, make sure you have:- Runtime: Python 3.10 or later, or Node.js 20 or later.
- API key: A key that can create datasets, scorers, experiments, and results in your workspace, stored in your secret store. See Send bearer token.
- Workspace ID: In the web app or Atlan Trident Desktop, open the workspace and select Copy workspace ID from the More actions (⋯) menu at the top of the page.
- Evals access: Evals appears in the app. If it does not, ask your administrator to turn it on for your organization.
1
Install atlanai SDK
Install the SDK with its tracing packages. Every eval case is traced, so Python needs the
tracing extra. The TypeScript package includes tracing.- Python
- TypeScript
2
Set API key and workspace
Eval reads its credentials and workspace from the environment. Load the key from your secret store; do not paste it into source files or shell history.ATLAN_BASE_URL only when you use a gateway other than https://api.atlan.com.3
Create two-case eval script
The script defines two cases, a
task that stands in for your agent, and one scorer that returns 1 for a match and 0 otherwise. Keep the eval name, answer-regression, the same on every run: scorer identity and CI baselines are keyed on it.- Python
- TypeScript
Save as
eval_quickstart.py:4
Run eval script
The script runs both cases in your process, uploads one result and one trace per case, and completes the experiment.The output shows the experiment ID, the score summary, and one line per case. Your IDs differ:Copy the experiment ID. You use it in the next step.
- Python
- TypeScript
5
Verify experiment in Atlan Trident
The printed output comes from your process. Confirm that Atlan Trident stored the same results.
-
Check in the app: Open Evals, then Experiments, and select the experiment. It shows two cases. Select
geographyto see its trace: the input the task received and the answer it returned. -
Check in code: List the stored results.
AtlanClientdoes not read the environment, so pass each value.- Python
- TypeScript
arithmetic with accuracy 1.0 and geography with accuracy 0.0, each with a trace ID. If the script raised Eval() cannot run inside an event loop, see Eval errors.Troubleshooting
First-run failures include anEval call inside an event loop, tracing turned off with ATLAN_TRACING, and a scorer name error from an older SDK. See Eval errors for each error and its fix.
Next steps
- Score agent behaviour: Replace the stub with your agent and score the tools it calls.
See also
- How evals work: What an eval stores and when to use offline or online evals.
- Eval object fields: Fields and change rules for experiments, results, and scorers.
- Eval options and errors: Every
Evaloption, environment variable, status, and limit.