liveBook · Manning

Cost attribution

As explained in Designing AI Systems

Cost attribution is the assignment of incurred service or infrastructure costs to users, applications, activities, or other accounting categories.

Cost attribution assigns incurred AI service or infrastructure costs to the workflows, features, users, providers, models, or time periods that generated them. It turns an unexplained invoice into operational evidence for spending decisions. section 3.8 section 3.8.2

Implement attribution as a request-level observability flow:

  • Record comprehensive metrics locally for every model request. section 3.8
  • Publish those metrics to a centralized Observability Service. section 3.8.2
  • Aggregate spending by provider, model, workflow, user, and time. section 3.8.2
  • Use dashboards and analysis to identify expensive features, investigate trends, and support optimization decisions. section 3.8 section 3.8.2

Explaining a budget increase

A 40% monthly AI budget increase becomes traceable when document summarization accounts for 35% of token usage after launch and uses GPT-4, while other features use the less expensive GPT-4o-mini. The comparison supports deciding whether the additional quality justifies the cost. section 3.8.2

How Designing AI Systems covers it

How deep it goes
Explains request-level recording, centralized publication, multidimensional aggregation, dashboards, and optimization, without specifying metric schemas.
Examples
Uses an unexplained invoice and a document-summarization launch to demonstrate workflow- and model-level attribution.
What you can do after
Diagnose spending increases, identify costly workflows, compare model costs, and evaluate whether quality justifies expense.
How it connects
Connects observability, metrics, workflows, users, providers, models, dashboards, alerting, and optimization.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Designing AI Systems. The section links point to the parts of the book it draws on.