Launch Calc
Home / Workloads / RAG Document QA Pipeline
Enterprise Search & Retrieval Architecture

RAG Document QA Pipeline: Token FinOps Calculator

Enterprise knowledge base retrieval-augmented generation pipeline injecting retrieved vector chunks into long system prompts. This production preset pre-fills all system prompt, user turn, and cache variables according to standard enterprise benchmarks.

Preset Architecture:

Model Selection

Side-by-Side

1 Token ≈ standard BPE tokenizer token

Volume & Architecture Sliders

Daily Requests / Sessions25,000 / day
10 req/day750,000 req/mo500k req/day
System Prompt + RAG Context8,000 tokens
0Pinned Prefix100,000
User Input per Turn450 tokens
Model Output per Turn600 tokens
Conversation Turns per Session2 Turns (Compounding)

Multi-turn compounding re-sends conversation history each turn: cumulative context grows quadratically.

Prompt Cache Hit Rate75%
0% (No Cache)50%95% Max SLA
Batch API (24h Async Queue)50% discount on supported models (OpenAI, Anthropic, Google)
Primary Model A
Anthropic

Claude 3.5 Sonnet

$26,626/ month
Run-Rate: $319,511/yr
Cost / 1k Reqs$35.501
Peak Context9.5k tokens
Comparison Model B
OpenAI

GPT-4o

$30,035/ month
Run-Rate: $360,422/yr
Cost / 1k Reqs$40.047
Peak Context9.5k tokens
Claude 3.5 Sonnet is 11.4% cheaper
Net Delta: $3,409/mo ($40,911/year)
11.4% Margin Impact

Token Spend Composition (Claude 3.5 Sonnet)

Total 14.36B tokens/mo
Fresh Input
$10,097
3.37B toks (38%)
Cached Input
$3,029
10.10B toks (11%)
Model Output
$13,500
900.00M toks (51%)

FinOps Smart Routing Recommendation

Save 51%

By routing 70% of high-volume queries (simple intents, classification, and extraction) to Claude 3.5 Haiku while keeping 30% on Claude 3.5 Sonnet:

Monthly Savings$13,668
Annualized Run-Rate$164,016
Blended Monthly Bill$12,958
Adjust Routing Split:
70%

Staff FinOps Architecture Blueprint

Production Best Practice: RAG architectures benefit tremendously from Prompt Caching. By pinning the shared system prompt and static chunk headers at the front of the context, 80%+ cache hit rates are achievable, cutting input token spend by up to 90%. Use hybrid routing: direct simple single-hop queries to efficient budget models while reserving reasoning models for synthesis.

Benchmark Volume 25,000 req/day
System Context 8,000 tokens
Expected Cache Hit 75%
Batch Mode On-Demand

Workload Architecture FAQs

How does prompt caching benefit a RAG Document QA Pipeline?

In a RAG Document QA Pipeline, system instructions, schema definitions, and RAG context chunks frequently repeat. Setting a cache hit rate of 75% reduces effective input token spend by up to 68%, providing dramatic margin improvements.

Why is Claude 3.5 Sonnet vs GPT-4o recommended for this architecture?

Claude 3.5 Sonnet and GPT-4o represent the production sweet spot for Enterprise Search & Retrieval. Claude 3.5 Sonnet provides premier accuracy, while GPT-4o offers high throughput unit economics for routine turns.

Should RAG Document QA Pipeline use the 24-hour asynchronous Batch API?

No. RAG Document QA Pipeline typically requires sub-second conversational or real-time latency SLAs, which necessitates standard on-demand inference endpoints.

How do conversation turns compound token costs in this workflow?

With 2 turn(s) configured per session, context accumulates as previous query/response history is re-sent. Careful management of context window and truncation keeps token inflation linear rather than quadratic.