Skip to main content
API inference use case

Best LLMs for RAG Question Answering

Answering from retrieved passages with grounded, cited responses.

Models compared 25
Providers 37
From $0.405 per 1,000 requests

Typical request this page prices

Input tokens
8,000
Of which cached
20%
Output tokens
500
What to compare on
Input rate · Faithfulness to context · Context window · Time to first token
  • Quality floor: Top 40% of priced models by Intelligence Index (≥ 32.4).
  • Costs use each provider’s current standard rates, with cached tokens at the cached-input rate where one is published. Speed is from Artificial Analysis where measured.

Lowest cost that meets the bar

Models that clear the quality floor, ordered by estimated cost for the request above.

Lowest-cost models for RAG Question Answering
ModelIntelligenceSpeedCheapest hostInput / output per 1MPer 1,000 requests
DeepSeek V4.1 Flash
DeepSeek
32.4186tok/sOpenRelay
30 providers
$0.035 / $0.330
cached $0.010
$0.405
Muse Ember
Meta
36.1599tok/sOpenRouter
2 providers
$0.100 / $0.500
cached $0.0040
$0.896
Claude Haiku 5.5
Anthropic · 1.0M context
36.5225tok/sIteraCompute
7 providers
$0.100 / $0.500
cached $0.010
$0.906
GPT-6.1 Terra
OpenAI
51.481tok/sHiAPI
6 providers
$0.250 / $1.25
cached $0.013
$2.25
Hy4
Tencent
34.6101tok/sGMI Cloud
11 providers
$0.417 / $1.25
cached $0.021
$3.33
GPT-6.2 Sol
OpenAI
57.374tok/sHiAPI
9 providers
$0.500 / $2.50
cached $0.025
$4.49
GPT-6.1 Sol
OpenAI
54.778tok/sHiAPI
10 providers
$0.500 / $2.50
cached $0.025
$4.49
Kimi K3.1 Pro
Moonshot AI
46.635tok/sOpenRelay
22 providers
$0.240 / $7.00
cached $0.200
$5.36

Highest-scoring options

Ordered by Artificial Analysis Intelligence Index, with the cost of the same request.

Highest-scoring models for RAG Question Answering
ModelIntelligenceSpeedCheapest hostInput / output per 1MPer 1,000 requests
Claude Fable 5.2
Anthropic · 1.0M context
64.891tok/sHiAPI
9 providers
$4.07 / $20.35
cached $0.102
$36.39
GPT-6.2 Astra
OpenAI
62.264tok/sHiAPI
8 providers
$2.00 / $10.00
cached $0.100
$17.96
Gemini 4 Neon
Google
61.5124tok/sPopNow
4 providers
$2.10 / $10.50
cached $0.105
$18.86
Gemini 4 Carbon
Google
60.185tok/sHiAPI
6 providers
$1.64 / $8.20
cached $0.090
$14.74
Claude Opus 5.5
Anthropic · 1.0M context
59.197tok/sCloudGPU
12 providers
$2.00 / $10.00
cached $0.100
$17.96
GPT-6.2 Sol
OpenAI
57.374tok/sHiAPI
9 providers
$0.500 / $2.50
cached $0.025
$4.49
GPT-6 Astra
OpenAI
56.971tok/sHiAPI
10 providers
$2.50 / $12.50
cached $0.250
$22.65
GPT-6.1 Sol
OpenAI
54.778tok/sHiAPI
10 providers
$0.500 / $2.50
cached $0.025
$4.49

Compare every model and provider on the LLM API pricing table.

How to choose an LLM for rag question answering

Retrieval-augmented generation sends the user’s question together with several retrieved passages, then asks for an answer grounded in those passages. Retrieved context makes the input several times larger than the output, and it changes on every query, so only the system prompt is cacheable.

The generation model needs to stay faithful to the passages and cite them, which favours models above the median on general capability. The floor here is set at the 60th percentile of priced models.

Embedding and reranking are separate calls with their own pricing and are not included in this estimate. For the self-hosted side of a RAG stack — embedding servers and vector search on your own GPUs — see the GPU RAG page linked below.

Frequently Asked Questions

Does this cost include embeddings?

No. The estimate covers the generation call only. Embedding the query is usually a small fraction of the total, while embedding the corpus is a one-time cost proportional to its size.

Should I retrieve more passages to improve answers?

More passages increase input cost linearly and can reduce accuracy when relevant text is buried among irrelevant text. Reranking a larger candidate set down to a few passages is often cheaper and more accurate than sending everything.

Is a long context window a substitute for retrieval?

For small corpora it can be, especially with prompt caching on a fixed document set. For large or frequently changing corpora, retrieval keeps per-query input small and the cost predictable.

Related Use Cases

Self-Host Instead: GPU Use Cases