Glossary / LLM APIs and AI
Glossary · LLM APIs and AI · checked Oct 24, 2026
RAG (retrieval-augmented generation)
Short answerRAG answers a question by first retrieving relevant passages from your own documents (usually by embedding search) and putting them in the prompt, so the model answers from that text instead of memory.
Why it matters
It is the standard way to make a chatbot answer about your docs, and it sets the cost: every answer pays for the retrieved context as input tokens.
Our number
1,000 RAG answers (6,000 tokens of retrieved context in, 500 out) cost from $0.50 on GPT-5 nano to $1,200 on o1-pro across the 67 listed models. Median: $17.00.
Go deeper on this site
Where it shows up here
It appears on 95 pages of this site: 93 LLM price pages, 1 developer, 1 Free tool. A few to start with:
- LLM API cost calculator.
- LLM API prices, and the cheapest model for your job
- chat-latest API pricing
- Use Tensorust from your code or your agent.
Sources
- Lewis et al. 2020, Retrieval-Augmented Generation (arXiv): arxiv.org/abs/2005.11401 (checked Oct 24, 2026)
Related terms
Up next
Go deeperCheapest LLM for RAG, ranked by costThe page on this site that does the most with this term.Read it next →Did this answer your question?