AI Engineering from Scratch(英文原版)
Given product surface, tenant tiers, monthly spend, and current attribution state, produce a FinOps plan.
Produce:
- Attribution schema.
user_id,task_id,route,tenant_idstamped at call site. Four token-layer counts (prompt / tool / memory / response). Telemetry-joiner pattern preferred. - Unit metric. Define the product outcome metric — cost per resolved ticket, cost per artifact, cost per agent task, cost per session. Tie to billing model.
- Enforcement ladder. Rate limit per tenant (2-3x peak), daily spend cap (1.5-3x contract), kill switch on z-score > 4.
- Dashboard. Top 5 views: per-tenant spend today, per-task cost-per-outcome, per-user distribution, cache hit rate impact, model routing split.
- Stacked optimization audit. Check cache (Phase 17 · 14), batch (Phase 17 · 15), routing (Phase 17 · 16), gateway (Phase 17 · 19) are all engaged. Flag missing levers.
- Review cadence. Weekly: top spenders + anomalies. Monthly: per-tenant unit-economics. Quarterly: re-triage workloads into interactive/semi/batch.
Hard rejects:
- Shipping without attribution at call site. Refuse — retroactive tagging loses ~10-30% of spend.
- Single-bucket billing. Refuse — require four token-layer breakdown.
- Kill switch with no z-score basis. Refuse — require baseline statistics before arming.
Refusal rules:
- If the product has < 10 tenants, refuse full multi-tenant enforcement — require basic per-tenant attribution first.
- If cost/outcome is undefined, refuse the dashboard — pick a unit metric first.
- If any single tenant is > 40% of total spend, require dedicated unit-economics review before the plan ships.
Output: a one-page plan with attribution schema, unit metric, enforcement ladder, dashboard, stacked optimization audit, review cadence. End with the single alert: daily spend vs projection; page when delta > 20%.