---
title: Evaluator Versions
description: >-
  Track every change to a custom evaluator as a numbered version, compare
  versions, restore an earlier one, and filter evaluation results by version.
breadcrumbs: >-
  Docs > Agent Observability > Investigate > Evaluations > Custom LLM-as-a-Judge
  Evaluators > Evaluator Versions
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Evaluator Versions

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com, us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ({% placeholder "user-datadog-site-name" /%}).
{% /alert %}

{% /callout %}

Datadog keeps a numbered version of every change you save to a custom evaluator. Each evaluation result records the version that produced it, so you can:

- See what changed between two versions of an evaluator
- Compare how two versions performed on your data
- Restore an earlier version if a change made results worse
- Filter evaluation results to a single version

Versions apply to custom evaluators. [Managed evaluators](https://docs.datadoghq.com/llm_observability/investigate/evaluations/managed_evaluations.md) do not have versions.

## How versions are created{% #how-versions-are-created %}

Saving an evaluator creates a version. Only one version, the published version, runs on your data at a time.

- Save and Publish: Saves your changes as a new version and publishes it. The new version starts running, and the previously published version stops.
- Save as Draft: Saves your changes as a new version without publishing it. The published version keeps running, and the draft produces no results. An evaluator has at most one draft. Saving the draft again updates it instead of creating another version.
- Publish: When you view a draft, the Save and Publish button reads Publish. Selecting it makes the draft the published version.
- Enable and Disable: In the evaluator's options menu, Enable and Disable start or stop the evaluator without creating a version.

The editor shows whether the version you are viewing is Published or Draft.

## View version history{% #view-version-history %}

1. In Datadog, navigate to the Agent Observability [Evaluators page](https://app.datadoghq.com/llm/evaluations) and open a custom evaluator.
1. In the evaluator's options menu, select Version History.

The panel lists every version of the evaluator, newest first, with the date it was saved and what changed. Select a version to view its configuration.

To load a version into the editor, select Open in Editor. Older versions open read-only. To edit an older version, restore it first.

## Compare two versions{% #compare-two-versions %}

1. In Version History, select Compare.
1. Select the two versions you want to compare.

The comparison shows the differences between the two configurations, such as changes to the prompt, model, or evaluation scope. It also shows how each version performed, including evaluation volume, pass rate, cost, and token usage. To switch which version appears on each side, select Swap versions.

## Restore a version{% #restore-a-version %}

1. In Version History, find the version you want to go back to.
1. Select Restore this version.

Datadog publishes the restored configuration as a new version. Earlier versions are never changed, so the history still shows every version you saved.

If the evaluator has a draft, Datadog asks you to confirm. Restoring a version replaces the draft.

## Filter results by version{% #filter-results-by-version %}

On the evaluator's Results and Health tabs, use the Version selector to show results from one version. By default, the tabs show All versions. The published version is labeled (published).

The selector appears after an evaluator has at least two published versions. Drafts are not listed, because they produce no results. Charts mark the point where each version's first result appears, so you can see when a change took effect.

To query or visualize results from one version elsewhere in Agent Observability, use the syntax `@evaluation.<evaluation_name>.eval_version`.

For example:

```
@evaluation.helpfulness-check.eval_version:3
```

Results produced before an evaluator had versions do not include a version.

## Further Reading{% #further-reading %}

Additional helpful documentation, links, and articles:

- [Custom LLM-as-a-Judge Evaluators](https://docs.datadoghq.com/llm_observability/investigate/evaluations/llm_as_a_judge_evaluations.md)
- [Prompt Templating](https://docs.datadoghq.com/llm_observability/investigate/evaluations/llm_as_a_judge_evaluations/prompt_templating.md)
