The Cost & Quality tab helps you compare an AI application’s gateway spend and token usage with its AI evaluation results over the same time period.
Use this view to identify periods where changes in spend or token consumption coincide with changes in evaluated response quality. You can then continue the investigation in AI Evaluation, AI Traces, or the related AI Gateway views.
Note
A change in cost or token usage does not by itself cause a change in response quality. Use this view to identify relationships that require further investigation, then validate them using sessions, traces, evaluation findings, and model or gateway telemetry.Open Cost & Quality
- Go to Infrastructure > AI Observability and select an AI environment.
- In AI Apps, open an application.
- Select Cost & Quality.
- Select the time range you want to investigate.
The Cost & Quality page uses the application and time range selected at the top of the application page.

Understand the summary
The summary cards provide application-level cost and usage information for the selected time range.
| Card | What it shows | How to use it |
|---|---|---|
| Spend in Range | Gateway spend attributed to the application during the selected time range. | Understand application spending for the investigation period and compare it with token usage and evaluation results. |
| Tokens in Range | Input and output tokens attributed to the application during the selected time range. | Determine whether a change in spend is accompanied by a change in token consumption. |
| Cost Efficiency | Application spend normalized per one million tokens. | Compare cost efficiency across comparable periods without relying only on total spend. |
For example, 1.00 / 1M TOK means that the displayed application cost is normalized to one million attributed tokens.
Note
Compare Cost Efficiency across periods only when the underlying gateway attribution and pricing configuration are comparable. Changes in model selection or gateway pricing can affect cost even when token volume remains similar.Understand the charts
A separate chart can be displayed for each available AI evaluation metric.
Examples include:
- Bias
- Coherence
- Completeness
- Faithfulness
- Groundedness
- Hallucination
- Helpfulness
- Relevance
- Safety
- Toxicity
The metrics available depend on the configured evaluator and evaluation data available for the application.
Chart values
Each chart compares cost, usage, and the selected evaluation metric over the same hourly interval.
| Chart element | Color | What it represents | Scale |
|---|---|---|---|
| Spend | Blue | Gateway spend attributed to the application for the hour. | Currency axis |
| Token Usage | Green | Tokens attributed to the application for the hour. | Token-usage axis |
| Agent Evaluation Score (P95) | Orange | P95 evaluation score for the selected metric across evaluated sessions for the hour. | 0–1 evaluation-score axis |
The chart uses separate axes because currency, tokens, and evaluation scores represent different units. Do not compare the physical height of two bars without checking the corresponding scale.
Understand the hourly comparison
Cost & Quality groups available values into hourly intervals. For each interval, compare:
- Spend
- Token usage
- Evaluation score
Use the hourly comparison to answer questions such as:
- Did token usage increase during the same hour that application spend increased?
- Did an evaluation metric change during a period of unusually high usage?
- Did quality change after application traffic or model usage changed?
- Did spending increase without a comparable increase in token consumption?
- Does a quality change appear only during specific periods?
Hover over an hourly data point or bar to review the values available for that interval. Depending on configured gateway telemetry, hover information can also include the team associated with a virtual key.
Understand the evaluation score
The orange Agent Evaluation Score (P95) bar represents the 95th-percentile value for the selected evaluation metric during the hourly interval.
P95 is the value at or below which 95 percent of the observed evaluation scores fall.
Interpret P95 according to the metric being displayed.
| Metric type | Preferred direction | Examples |
|---|---|---|
| Risk | Lower is generally better | Hallucination, Toxicity, Bias |
| Quality | Higher is generally better | Faithfulness, Groundedness, Coherence, Completeness, Helpfulness, Relevance |
| Efficiency | Higher is generally better | Applicable Agent Efficiency scores |
Do not interpret a high P95 score as automatically positive. For example, a high Hallucination score represents increased risk, while a high Faithfulness score represents stronger evaluated quality.
For metric definitions, thresholds, and pass rules, see AI Evaluation.
Understand repeated spend and token values
Spend and Token Usage are displayed alongside each evaluation metric so that you can compare the same cost and usage context with different quality or risk indicators.
For example:
| Evaluation chart | Values compared |
|---|---|
| Bias | Spend + Token Usage + Bias P95 |
| Coherence | Spend + Token Usage + Coherence P95 |
| Completeness | Spend + Token Usage + Completeness P95 |
The Spend and Token Usage bars repeated across these charts are not additional independent totals. Do not add spend or token values across evaluation charts.
Interpret cost and quality together
Use Cost & Quality to identify periods worth investigating rather than to establish direct causation.
| What you observe | What it can indicate | What to review next |
|---|---|---|
| Spend and token usage both increase | Increased application or model usage can be contributing to higher spend. | Application traffic, sessions, model usage, and token consumption. |
| Spend increases but token usage remains similar | Pricing, model selection, or gateway usage can have changed. | AI Gateway usage, model selection, and gateway cost data. |
| Token usage increases and quality decreases | Larger prompts, responses, or execution paths can coincide with poor evaluated results. | Affected sessions, traces, prompts, model calls, and tool calls. |
| Spend increases while quality remains stable | Higher usage can be increasing cost without a visible quality change. | Request volume and token consumption. |
| Quality changes while spend and tokens remain stable | Prompt, tool, retrieval, model, or workflow behavior can be contributing rather than usage volume. | AI Evaluation findings, affected sessions, and traces. |
| Risk score increases | Evaluation identifies increased risk for the corresponding metric. | Pass rule, judge reasoning, and impacted spans. |
| Quality score decreases | Evaluated response quality changed for the corresponding metric. | Affected sessions compared with representative sessions that performed as expected. |
Important
Correlation does not establish causation. A spend, token, or evaluation-score change occurring in the same hour is an investigation clue. Validate the suspected relationship with the underlying application sessions, traces, model calls, tool activity, and gateway data.Application cost attribution
Application-level cost requires gateway requests to be attributed to the corresponding AI application.
For LiteLLM-based gateway telemetry, configure the required end-user tracking and ensure that the application identity reported in requests matches the AI application identity expected by the integration.
Without the required application attribution:
- Gateway-level spend can still be available.
- Token totals can still be available from other telemetry sources.
- Application-level spend can be missing or incomplete.
Do not interpret missing application spend as zero spend.
For LiteLLM and AutoI prerequisites and gateway-level cost information, see AI Gateways.
Investigation workflow
Use these steps to investigate unexpected changes in cost, token usage, or evaluation quality.
1. Select the application and time range
Select the application and the time range in which the issue occurred. Use the same time range when checking related data.
2. Check the summary
Review Spend in Range, Tokens in Range, and Cost Efficiency to understand how spending and token usage have changed.
3. Check evaluation trends
Review the evaluation charts and compare score changes with spend and token usage during the same period.
4. Understand the evaluation scores
Check whether the metric measures risk or quality.
For example:
- Increasing Hallucination may indicate higher risk.
- Decreasing Faithfulness may indicate lower response quality.
5. Review affected sessions
Open AI Evaluation and check the affected sessions. Review the evaluation score, pass rule, judge reasoning, failed metrics, and impacted spans.
6. Check request traces
Open AI Traces to understand how requests were processed. Review token usage, model calls, LLM spans, tool calls, retrieval operations, latency, and execution steps.
7. Check gateway usage
Open AI Gateways to review gateway spend, model usage, token consumption, virtual-key usage, and budget limits.
8. Compare and confirm
Compare the affected period with a period when the application was working as expected. Review the application, evaluation, trace, model, and gateway data before identifying a possible cause.
Data availability
Cost & Quality depends on multiple data sources. A value or chart can be unavailable for several reasons.
| Situation | Possible reason |
|---|---|
| Spend is missing | Gateway cost telemetry is unavailable or requests cannot be attributed to the application. |
| Token usage is missing | Required token telemetry was not collected for the application or time range. |
| Evaluation score is missing | No applicable sessions were evaluated for the hour or the metric is not produced by the configured evaluator. |
| An evaluation chart is missing | No data is available for that evaluation metric. |
| Spend exists at gateway level but not application level | Application identity attribution is missing or does not match the expected application identity. |
| Latest hour has incomplete evaluation data | The evaluation cycle might not have completed yet. |
Collecting one signal does not automatically provide the others. Cost, token usage, traces, and AI Evaluation can have different collection, timing, and attribution requirements.
If per-application spend is missing, verify LiteLLM telemetry, end-user tracking, and application identity mapping before treating the value as zero.