Run an optimization
Choose a dataset prompt column, set the objective and evaluation, launch a prompt optimization run, and stop or restart it from the dashboard.
About
Use a dataset’s Optimization tab to compare a prompt column with rewrites scored on the same task. For Ridgeline Outfitters, the task is to produce a single queue label that matches the one a support specialist assigned. The run saves trial prompts for review; it doesn’t replace the prompt in your column.
Open the run drawer
Start with a dataset that has the ticket text and the queue assigned by a support specialist:
ticket | queue |
|---|---|
| The rain jacket is too small. Can I exchange it? | RETURNS |
| My boots haven’t arrived. Where is my package? | SHIPPING |
- Use Run Prompt to create an output column named
predicted_queue. For the starting prompt, useWrite a helpful reply to this outdoor-gear support ticket: {{ticket}}. Keepqueueout of the prompt: it’s the answer your evaluation checks. - Open Optimization. Select Run Optimization if there are no runs yet, or Optimize Prompts above the list of existing runs.

Fill the run drawer
| Field | What to do for the routing example |
|---|---|
| Name | Use the generated name or enter ridgeline-ticket-routing. |
| Choose Column | Select predicted_queue, the column created by Run Prompt. Don’t choose the expected labels: this field identifies the prompt to rewrite. |
| Choose Optimizer | Leave GEPA selected. To change how candidates are proposed, see Choosing an optimizer. |
| Language Model | Choose a model configured for your workspace. |
| Optimization Objective | Enter Return only RETURNS or SHIPPING. Match the expected queue for each ticket. |
| Max Metric Calls | For GEPA, the drawer starts at 40. This is a budget for scoring, not the number of candidate prompts. Other optimizers show different fields. |
| Evaluations | Selecting the column loads its saved evaluations. Use an eval that checks whether two texts match. Map its response input to predicted_queue and its expected answer to queue. During a trial the response comes from the candidate, not the original cell. If the section says No evaluations added, select Add Evaluations, configure the eval, and save it. See Running evaluations for input mapping. |
If you switch optimizers, the drawer resets the objective and search parameters. Choose the optimizer first, then enter your objective.
Start the run
Select Start Optimization. On success, the dashboard shows Optimization created successfully and opens the run. You can return to it later by selecting its row in Optimization. Once it completes, compare the trials with the baseline.
The dataset run uses up to the first 50 rows in dataset order. Put both returns and shipping questions among those rows. Keep other tickets separate so you can check whether a winning rewrite generalizes.

Stop a run
In the run list, select Stop next to a Queue or Running status. In Stop optimization run, confirm with Stop Optimization. This terminates in-progress trials.

Restart a stopped run
Open a Cancelled run. On the Optimization Stopped panel, select Re-Run Optimization. The drawer reuses the original column, optimizer, model, and configuration. You can edit the settings, but not the column. Review the evaluations, then select Start Optimization to create a new run rather than resume the old one. If the old model is no longer available and the button is disabled, start a fresh run from the list and choose an available model.

If you can’t start
- Run Optimization or Optimize Prompts is disabled: you need permission to update datasets in this workspace.
- No columns available for optimization: Run a prompt on the dataset first, then reopen the drawer. An ordinary text column isn’t eligible even if it contains model output you pasted in.
- Add evaluations before starting your optimization run: The objective describes what you want, but doesn’t score anything. Attach at least one evaluation to the chosen column.
Next steps
- Read optimization results to compare candidate prompts and row scores.
- Optimize from the SDK to run the routing task from Python with Agent Learning Kit.
Questions & Discussion