Glossary / Agents and tooling
RAG (retrieval-augmented generation)
RAG retrieves relevant documents first and puts only those into the prompt, so the model answers from evidence instead of memory.
Definition
RAG retrieves relevant documents first and puts only those into the prompt, so the model answers from evidence instead of memory.
What it changes in your bill
RAG exists to cut cost as much as to improve accuracy: retrieving three paragraphs instead of pasting a manual turns a 20,000-token prompt into a 2,000-token one.
How to check it yourself
Measure retrieved tokens per answer; if it exceeds a quarter of the context window, tune the retriever.
Rule of thumb: compare providers on cost per completed task, not on the headline price per million tokens.
Related terms
Try it on Tapix AI
100+ models behind one OpenAI-compatible endpoint. Prepaid from $1, no monthly minimum, live prices per model.
Get a key and run one real call See live prices