{
  "schema_version": "1.0",
  "surface_type": "guide_answer",
  "guide_id": "rag-cost-components-explained",
  "question": "How should I structure agent cost math before summing total unit cost?",
  "canonical_url": "https://www.unitcostai.com/guides/rag-cost-components-explained",
  "related_tool_url": "https://www.unitcostai.com/tools/ai-workflow-cost",
  "formula": "total_cost_per_user_month = generation + retrieval + reranking + embedding_ingestion_share + vector_db + cache + infra",
  "assumptions": [
    "Compute each component independently, then sum",
    "Cache is a savings term and can be negative",
    "Embedding refresh starts as a fixed monthly term and must be amortized before it is treated as per-user cost",
    "Currency and units stay explicit"
  ],
  "example": "1.8 + 0.6 + 0.3 + 0.2 + 0.1 - 0.4 + 0.2 = 2.8 per user per month, where 0.2 is the amortized embedding share."
}
