> For the complete documentation index, see [llms.txt](https://docs.layerlens.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.layerlens.ai/more-in-this-section-6/cost-aware-evaluation.md).

# Recipe: Cost-aware evaluation

Recipe — score cost alongside quality so you can pick smaller-and-cheaper when it's good enough.

Capture cost per row from traces. Compute a composite metric: quality / cost.

```python
def cost_quality(scores, costs):
 return [s / max(c, 1e-6) for s, c in zip(scores, costs)]
```

Use this to spot when a smaller, cheaper model wins on the cost-quality frontier.

## See also

* [Concept: ECU credits](/11.-admin/concepts-ecu-credits.md)
