Skip to main content
The Cost evaluator calculates costs based on actual token usage returned by the LLM Provider and its public pricing. The steps below describe how to set up the Cost evaluator:
1

Select the Cost evaluator

Selecting the cost evaluator
2

Link a dataset

Give a name to the evaluator, link a dataset to it, and select the cost threshold.Linking datasets to the cost evaluatorChoose among the following:
  • less than: Keep costs below your threshold.
  • greater than: Flag expensive responses above your limit.
  • equal to: Match exact cost requirements.
3

Execute the evaluation and see the results

Click on Evaluate to run the evaluation and see the results.The results of the cost evaluator
Note on Prompt Chaining: When your prompt uses prompt variables (child prompts), the cost evaluator includes the costs from all child prompts in the total. The reported cost represents the cumulative cost of the entire prompt chain, including the main prompt and all referenced prompts executed during the evaluation.