client.spans.update_evaluations.
This guide assumes you have traces in Arize AX and are looking to run an evaluation to measure your application performance.
To add evaluations you can set up online evaluations as a task to run automatically, or you can follow the steps below to generate evaluations and log them to Arize AX:
1
Install the Arize SDK
2
Import your spans in code
3
Run a custom evaluator using Phoenix Evals
4
Log evaluations back to Arize AX
Install dependencies and setup keys
ARIZE_API_KEY and SPACE_ID from your Space Settings page (shown below) and set them as environment variables alongside your OpenAI key.

Import your spans in code
Once you have traces in Arize AX, you can visit the LLM Tracing tab to see your traces and export them in code. By clicking the export button, you can get the boilerplate code to copy paste to your evaluator.Run a custom evaluator using Phoenix Evals
Create a classifier for the LLM to judge the quality of your responses. You can utilize any of the Arize AX Evaluator Templates or you can create your own. Below is an example which judges the positivity or negativity of the LLM output.create_classifier relies on the judge’s tool-calling / structured-output support, so use a non-reasoning model such as GPT-4.1.
evaluate_dataframe function to run the evaluation using your classifier. You will be using the dataframe from the traces you generated above. It runs the judge calls concurrently and returns the dataframe with a tone_eval_score column holding the label, score, and explanation.
Log evaluations back to Arize AX
Use theupdate_evaluations method on the Arize SDK client to attach the evaluations you’ve run to traces. It requires four columns, and the <eval_name> must be alphanumeric and cannot have hyphens or spaces.
eval.<eval_name>.labeleval.<eval_name>.scoreeval.<eval_name>.explanationcontext.span_id
to_annotation_dataframe flattens the nested tone_eval_score column into label, score, and explanation while preserving context.span_id (the join key export_to_df already provides). Rename those to the reserved eval.<eval_name>.* columns and upload: