> ## Documentation Index
> Fetch the complete documentation index at: https://docs.promptlayer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Backtest Prompt Changes

> Test a new prompt version against historical request data before releasing it.

<Warning>
  Legacy Evaluations, Reports, and Datasets are deprecated for new workflows. Use [Tables](/features/tables/overview) for new evaluation, dataset, report, backtesting, and batch workflows. See [Migrate from Evaluations and Datasets](/features/tables/migrate-from-evaluations-and-datasets).
</Warning>

Backtesting lets you run a new prompt version against real historical inputs. Use it when you want to understand how a prompt change would have affected production or staging traffic.

## Create a historical dataset

Go to **Datasets** and click **Add from Request History**. This opens a request log browser where you can filter and select requests.

<Frame>
  <img src="https://mintcdn.com/promptlayer/2Nw4D0YQ3AERsqEA/new-quickstart-images/add-from-request-history.png?fit=max&auto=format&n=2Nw4D0YQ3AERsqEA&q=85&s=ddd3065e52d29e29d40f7ddbb153c972" alt="Adding from request history" width="2048" height="1376" data-path="new-quickstart-images/add-from-request-history.png" />
</Frame>

Filter by prompt name, date range, metadata, score, tag, or request content. Select the requests you want and click **Add Requests**.

The dataset captures the real inputs users sent, along with the outputs your current prompt produced.

## Run a backtest

Create an evaluation that runs your new prompt version against the historical dataset.

Add columns for:

* **New prompt output**: The response from your updated prompt version
* **Comparison**: An equality comparison, semantic similarity check, LLM-as-judge score, or human review column

<Frame>
  <img src="https://mintcdn.com/promptlayer/2Nw4D0YQ3AERsqEA/new-quickstart-images/backtest-results.png?fit=max&auto=format&n=2Nw4D0YQ3AERsqEA&q=85&s=a32c1d28bf237b4357692a9e40b7b289" alt="Backtest results" width="2500" height="1226" data-path="new-quickstart-images/backtest-results.png" />
</Frame>

Review the differences before assigning a production release label to the new version.

## Automate backtests

Attach the backtest evaluation to your prompt so it runs when you save a new version. This creates a regression check before the change reaches production.

Learn more in [Continuous Integration](/features/evaluations/continuous-integration).

## Next steps

* [Create datasets from history](/features/evaluations/datasets-create-from-history)
* [Evaluation pipelines](/features/evaluations/building-pipelines)
* [Release labels](/features/prompt-registry/release-labels)
