View Cost and Quality Trends on the AI Operator PageBeta
To find out whether a release or an accepted AI Operator suggestion changed what a Service costs per conversation, use the Service Cost History card on the Service's AI Operator page. It charts the Service's own production traffic and marks each release on the day it went live.
About This Taskโ
You see the Service Cost History card, and the cost figure in its header, only if you have the costs:read permission. If you don't see them, ask your workspace admin for access. The Service also needs an AI Operator; see Set Up an AI Operator for a Service.
The card sits above the run cards, next to the Runs table. The figure beside the card title is the Service's live cost per conversation over the past week. It is the latest point of the chart, so the two always agree. Today is still in progress, so the latest point and the header figure can change during the day. To learn about the Runs table, see View Past Runs.
Chart Elementsโ
The chart is built from the production conversations of the Service, not from optimization replays. It draws the cost line and the daily conversations in one plot, each on its own axis: cost per conversation on the left, conversations per day on the right. It includes:
- 7-day average: a line showing the cost per conversation as a rolling average, read on the left axis. Each point is the cost of the 7 days up to that day divided by the number of conversations in those days, so a quiet day counts only in proportion to its traffic.
- Low sample: segments of the line drawn dashed where the 7 days behind a point hold fewer than 20 conversations. Treat these segments with caution, because little traffic makes the average noisy.
- Conversations per day: bars read on the right axis. They show daily traffic, so you can see whether a move in the line comes with a change in traffic and judge how much to trust it. Today's bar is fainter because the day isn't over.
- 7-day window: hover over a day to see which 7 days its point averages over.
- Release: a dashed vertical line on the day a version went live, labeled with its version, for example
v345. Rollbacks get a line too. Releases on the same day share one line, for examplev328โv334. Revisions that never served traffic, such as failed deployments, and re-activations of the version that is already live don't get a line. - Accepted suggestion: a green dashed line, with a dot on the cost line, for a version created by accepting an AI Operator suggestion. Its label shows how much the version changed cost per conversation compared with the version live before it, for example
v274 ยท โ51%. To open the suggestion, see step 6 under Read the Chart. - Tooltip: hover over a day to see the date, the cost per conversation, and the number of conversations in the 7-day window and on that day.
- Range selector: switch between 30d and 90d. The default is 90d. If the Service's data starts later than the range, the chart starts where the data starts.
Read the Chartโ
- Open the Service and go to its AI Operator page.
- Find the Service Cost History card.
- Select 30d or 90d so the range covers the releases you want to compare.
- Compare the line against the release lines to see whether a change in cost per conversation lines up with a specific release.
- Check the bars and dashed segments before you draw a conclusion. A change on days with few conversations is a weak signal. For example, a cost spike on a few conversations may come from one long conversation.
- For a green line, read the percentage in its label to see how much the accepted suggestion moved cost per conversation. To see what the suggestion changed, click the line or its dot. The page opens the suggestion's card, expanding Earlier suggestions if the card is in that list.
- If cost per conversation keeps rising after a release, start an optimization run; see Start an Optimization Run.
If the chart shows no production conversations yet, the Service has had no traffic in the selected range. Check again after the Service has handled conversations. If release lines look off by a day or sit at a revision's creation date, the Service's activity log hasn't loaded yet or couldn't be read; refresh the page.
See What Each Optimization Run Costโ
The Service Cost History card shows your Service's cost per conversation. To see what the AI Operator itself spent on each run of a goal, such as replaying your dataset, evaluating answers, and generating suggestions, open the run costs drawer. Use it to check how much an optimization run cost and which phase accounts for most of it.
- Open the Service and go to its AI Operator page.
- In the goal bar, click View costs. The button appears once the goal has at least one run.
- Check the summary card at the top of the drawer for the total cost of the runs in it and the total for each phase.
- Read the table below it. Runs are listed newest first, and each row shows when the run started, its result, the baseline version, the cost of each phase, and the run's total. Hover over the time to see the exact date and time, and over a cost to see the number of LLM calls and the input and output tokens behind it.
- To see what each suggestion cost, expand a run. Suggestions carry the same names as their suggestion cards, for example Swap model. For each suggestion, you see the cost of replaying it and of evaluating it.
- To go further back, click Show older runs.
The cost phases are:
- Baseline replays: running your dataset through the current pipeline version.
- Baseline evaluation: scoring the baseline answers.
- Optimizer: generating suggestions.
- Suggestion replays: running your dataset through each suggestion.
- Suggestion evaluation: scoring the answers each suggestion gives.
Cost Statesโ
A cost cell doesn't always show a number:
โmeans the step didn't run for that run.- Pricing means some calls are still being priced. The total for that run stays blank until pricing finishes. While the drawer is open and the tab is in focus, the costs refresh every 10 seconds until pricing finishes or the run completes.
- A warning
โmeans some models have no price. Hover over it to see which models. To fix it, set a price for them. For details, see Set Model Prices. - Not recorded means the run took place before the AI Operator recorded its spend, so no cost is available.
The summary leaves out runs whose total isn't available yet, instead of counting them as $0, and tells you how many it left out. When the pricing finishes, those runs are included in the summary.
What an Optimization Run's Cost Includesโ
An optimization run's cost covers everything the run set off, counted at the moment it started. Use this when a run's total looks higher or lower than you expect.
- Repeated work counts. If a suggestion is replayed again, or the baseline or a suggestion is evaluated again, the earlier attempts stay in the cost. Replayed turns are counted one by one, so a test case that stopped partway still counts the turns that ran. An optimizer call that returned no suggestions also counts.
- Reused work isn't counted twice. When a run reuses baseline replays or earlier evaluation results, the run that paid for them first carries their cost.
- Recent turns can appear late. A replayed turn is counted once its token usage is written, which usually takes a few seconds.
- Optimizer calls are billed to the optimizer's workspace. Its cost still appears in the run's total.
To read the same breakdown in your own tooling or scripts, call the run's spend endpoint, GET /api/v2/workspaces/{workspace_id}/deployments/{deployment_id}/optimization-goals/{goal_id}/runs/{run_id}/spend. It returns the total, the cost of each of the five phases, and the cost of each suggestion's replay and evaluation. For a run that started before spend was recorded, the total is null because the cost is unknown, not zero.
Related Informationโ
Was this page helpful?