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:

ticketqueue
The rain jacket is too small. Can I exchange it?RETURNS
My boots haven’t arrived. Where is my package?SHIPPING
  1. Use Run Prompt to create an output column named predicted_queue. For the starting prompt, use Write a helpful reply to this outdoor-gear support ticket: {{ticket}}. Keep queue out of the prompt: it’s the answer your evaluation checks.
  2. Open Optimization. Select Run Optimization if there are no runs yet, or Optimize Prompts above the list of existing runs.

The Ridgeline routing dataset’s empty Optimization tab, with Run Optimization beside Check docs

Fill the run drawer

FieldWhat to do for the routing example
NameUse the generated name or enter ridgeline-ticket-routing.
Choose ColumnSelect predicted_queue, the column created by Run Prompt. Don’t choose the expected labels: this field identifies the prompt to rewrite.
Choose OptimizerLeave GEPA selected. To change how candidates are proposed, see Choosing an optimizer.
Language ModelChoose a model configured for your workspace.
Optimization ObjectiveEnter Return only RETURNS or SHIPPING. Match the expected queue for each ticket.
Max Metric CallsFor GEPA, the drawer starts at 40. This is a budget for scoring, not the number of candidate prompts. Other optimizers show different fields.
EvaluationsSelecting 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.
The Run Optimization drawer shows predicted_queue, GEPA, the routing objective, and a 40-call budget, then scrolls to the saved ridgeline-queue-match evaluation.

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.

The routing run is marked Running. Optimization Steps shows initialization complete, the baseline evaluation in progress, and trials not yet started.

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.

The Stop optimization run dialog warns that in-progress trials will be terminated and offers Cancel or Stop Optimization.

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.

The routing run is marked Cancelled. The Optimization Stopped panel offers Re-Run Optimization.

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

Was this page helpful?

Questions & Discussion