# Set up an optimisation run

Configure a run on the Optimizer's Setup tab, from the agent and dataset through evaluator weights, guard rails, the search space and the trial budget, and launch it.

**Setup** is the Optimizer's form. A checklist of what the launch needs sits above it, five numbered sections describe the run, a sticky bar at the bottom sums it up in one sentence, and **Launch optimization** starts it. Nothing is saved until you launch; **Cancel** returns to History.

**Who can use it:** the **Builder** role or higher. The agent must be published, the optimiser tier configured by an administrator, and at least one evaluator weighted. Where one of those is missing, **Launch optimization** is disabled and names the first thing it is waiting for, rather than going grey without a reason.

Video: Set up an optimisation run (2:24), https://katonicdocsmedia.blob.core.windows.net/docs/optimizer-set-up-a-run/51fcb0606604/index.html; on YouTube: https://www.youtube.com/watch?v=8DxvkbQPOYs

## Prerequisites

- A published agent (live or in canary).
- A dataset in Storage with the cases to score against. **Upload new** in the Dataset section opens Storage.
- Evaluators in **Evaluations**. **New evaluator** in the Evaluators section opens that tab.

## Open Setup

![The Setup tab of a new optimization run: the header New optimization run, the Before you launch checklist with four of five checks ready, section 01 What to optimize showing the Customer Support Agent marked live with a Change button and a facts row, and section 02 Dataset with the trial and final eval split sliders.](https://docs.katonic.ai/img/agents/optimizer-set-up-a-run/optimizer-setup.png)
*New optimization run opens on Setup: five numbered sections from What to optimize to Budget & sampler, and a launch bar that sums the run up.*

### What the launch is waiting for

Above the form, a row per prerequisite says whether it is met: the optimiser tier, an agent, that the agent is published, the dataset and an evaluator with a weight. Each unmet row carries the fix, which either scrolls to the section of this form that sets it or opens the page that does. A sixth row reports whether a prompt is bound to the agent; it is informational and never blocks a launch.

Select **New run** on History, or arrive from Prompt Studio's Test tab or the Profiler with the agent already chosen. If you came from **Send all fails to Optimizer** or **Optimize against this set**, a banner at the top says how many cases were carried over and that they are saved as a new dataset, already selected below.

  
**Step 1. Pick what to optimise**

![Section 01 What to optimize with the Customer Support Agent selected and marked live, a Browse library button, the facts Tenant, Model, Tools and Knowledge, and the Change list open listing the workspace's agents with Document Drafter marked draft and disabled.](https://docs.katonic.ai/img/agents/optimizer-set-up-a-run/optimizer-setup-target.png)
*What to optimize: the agent whose live prompt the run scores, its version chip and facts, and the Change list, where a draft agent is greyed out because only a published agent can be optimised.*

    **What to optimize** shows the agent whose live system prompt the run scores, with its version chip and a summary of its prompt. **Change** lists every agent in the workspace; a draft is greyed out and marked **draft**, because the optimiser runs against a published version only. **Browse library** opens the agent gallery. The facts row names when the agent was **Last edited**, its **Model** and temperature, and how many **Tools** and **Knowledge** sources it binds. If a draft is selected, a banner reads **This agent is a draft** and offers **Open agent** so you can publish it first.

  
**Step 2. Pick the dataset and its split**

![Section 02 Dataset with the dataset support-conversations-q4 of 200 cases selected, an Upload new button, and two sliders: Trial split at 140 cases and Final eval split at 60 cases, each with a caption explaining what the slice is used for.](https://docs.katonic.ai/img/agents/optimizer-set-up-a-run/optimizer-setup-dataset.png)
*Dataset: the cases every candidate is scored against, split into the Trial split that scores each trial and the Final eval split that re-scores the top candidates.*

    **Dataset** lists your datasets with their case count. Two sliders divide the cases. **Trial split** is the slice every candidate is scored on; it starts at about seventy percent of the dataset. **Final eval split** is held back, and the top three candidates are re-scored on it at the end. The two are independent, so you can set both low for a cheap smoke run; the run then scores only their sum. Changing the dataset recomputes an untouched split and clamps one you set by hand.

  
**Step 3. Weight the evaluators**

![Section 03 Evaluators & objective listing the workspace's evaluators, each with a checkbox, a type pill and a Weight stepper, the first enabled at weight 1, a New evaluator button, and two sliders labelled p95 latency cap and cost per call cap.](https://docs.katonic.ai/img/agents/optimizer-set-up-a-run/optimizer-setup-evaluators.png)
*Evaluators & objective: your evaluators as rows with a weight each, the type pill (exact, llm-judge or regex), and the two guard rails, the p95 latency cap and the cost per call cap.*

    **Evaluators & objective** lists the workspace's evaluators as rows. The first is enabled at weight 1; tick the others you want and use the **Weight** stepper, from 0 to 10, to set how much each counts. The pill on each row says how it scores: **exact**, **llm-judge** or **regex**. The objective is the weighted blend of the enabled evaluators. Below them, **p95 latency cap** (0.5 to 3.0 seconds) and **cost per call cap** are guard rails a candidate must stay within; they never add to the score. The section says so when the workspace has no evaluators yet, and when the list could not be loaded, in which case launch stays disabled.

  
**Step 4. Choose the search space**

![Section 04 Search space as a grid of eight knob cards: Instructions and Temperature switched on, Few-shot pool and Order marked unavailable, and Model, Tools, Top-p / penalties and Output schema off, each with a one-line description and a range line; below it section 05 Budget & sampler with Trials, Runs / trial, Est. wall time and Est. spend, and the launch bar with Cancel and Launch optimization.](https://docs.katonic.ai/img/agents/optimizer-set-up-a-run/optimizer-setup-search-space.png)
*Search space: eight knobs, each with what the sampler may change and its range. Instructions and Temperature are on by default; Few-shot pool and Order are not available yet; the rest keep their baseline. Below it, Budget & sampler and the launch bar that sums the run up.*

    **Search space** is a grid of eight knobs. A knob that is on is something the sampler may change; a locked knob keeps its baseline value. On by default: **Instructions**, which evolves an addendum appended to the system prompt and leaves the base prompt intact, and **Temperature**, swept from the agent's own value between 0.1 and 0.9 in steps of 0.2. **Top-p / penalties** is off by default. **Few-shot pool** and **Order** read **unavailable**, because the optimiser does not vary examples or their order yet. **Model**, held at the baseline so trials stay comparable, **Tools** and **Output schema** keep their baseline values. Select an available card to switch it on or off.

  
**Step 5. Set the budget and launch**

**Budget & sampler** takes the number of **Trials**, from 1 to 200 and 20 by default. **Runs / trial** repeats the Trial split you set, **Est. wall time** and **Est. spend** are rough estimates that grow with the trial count, and the spend includes the judge and the final evaluation. The launch bar reads back the run: which agent, against which dataset, how many trials and the weighted objective. **Launch optimization** posts the run and opens **Live run**. If the platform refuses it, the bar is preceded by **Couldn't launch optimization** with the reason.

## Verify

The page moves to **Live run** with the pill reading **Queued** or **Running** and the run's id in the header. In History, the run appears at the top of the agent's list with the status **queued** or **running**.

## Troubleshooting

- **Launch optimization is disabled.** The button names the first thing it is waiting for, and the checklist above the form shows all of them at once: the optimiser tier, an agent, a published agent, a dataset, an evaluator with a weight above zero. A previous run still launching also holds it.
- **Configure a model for the optimizer first.** The amber banner at the top means no tier is set. **Open Settings** goes straight to the **Optimizer** tab of Platform Settings, where an administrator picks one.
- **Couldn't load datasets.** The evaluation service did not answer. Open **Evaluations** to check it, then reload Setup.
- For the messages a launch can return, see [Optimizer troubleshooting](/agents/optimizer-troubleshooting).

## Related

- [Optimizer](/agents/optimizer)
- [Follow a run and inspect its trials](/agents/optimizer-follow-a-run)
- [Evaluations](/agents/evaluations)
- Storage

Source: https://docs.katonic.ai/agents/optimizer-set-up-a-run
