{
  "schema_version": "1.0",
  "surface_type": "guide_answer",
  "guide_id": "what-is-rag",
  "question": "What is RAG inside an AI agent and how does it change unit cost?",
  "canonical_url": "https://www.unitcostai.com/guides/what-is-rag",
  "related_tool_url": "https://www.unitcostai.com/tools/ai-workflow-cost",
  "formula": "effective_input_tokens = base_prompt_tokens + retrieved_chunks * tokens_per_chunk",
  "assumptions": [
    "Retrieval quality controls how many chunks are needed per request",
    "Retrieved context tokens are measured explicitly as a cost driver",
    "Chunking and reranking settings affect both answer quality and unit economics"
  ],
  "example": "Base prompt 500 plus 6 chunks at 200 tokens gives 1700 effective input tokens before output."
}
