Get in touch

9io.ai / Blog

RAG vs fine-tuning vs long context: which to use in 2026

RAG vs fine-tuning vs long context in 2026: what each changes, cost per question at October prices, latency, the accuracy evidence and a decision table.

Key takeaways

  • Under about 200K tokens, send the whole knowledge base in a cached prompt first, and measure before adding retrieval.
  • In our worked example, caching cut a question from $0.309 to $0.028 on Claude Sonnet 5.5; RAG cost $0.016.
  • Accuracy still falls as inputs grow, and long-context rankings at 128K tokens shift at 1M.
  • Fine-tune for format, tone, narrow labels and distillation. Keep facts in retrieval or the prompt.
  • OpenAI is winding down fine-tuning, Mistral has deprecated it, and Bedrock’s only tunable Claude model reached end of life.

The RAG vs fine-tuning decision comes down to what you need to change. If the model lacks facts, supply them at request time, either with retrieval-augmented generation (RAG) or by putting the whole source in the prompt. Fine-tuning is for changing behaviour, such as a fixed output format, a house tone or a narrow set of labels. For a knowledge base under about 200K tokens, start by sending all of it in a cached prompt, and add retrieval when measurements of cost, latency or accuracy call for it.

Window sizes and cache prices changed the arithmetic this year. A 1M-token context window is now standard among frontier models, and a cache read costs 2.5% to 10% of the normal input price on the Anthropic, OpenAI and Google models in our October price comparison. In the worked example below, a 150K-token knowledge base costs $0.309 a question on Claude Sonnet 5.5 sent uncached, $0.028 cached and $0.016 with RAG. Accuracy hasn’t kept pace with window size, and studies from 2023 to 2026 find that models use long inputs less reliably as they grow. Fine-tuning has also become harder to buy, with OpenAI closing it to new users and Mistral deprecating its service.

The sections below cover what each approach changes, cost per question, latency, the accuracy evidence, fine-tuning and who still sells it, and hybrids. A decision table and a checklist close the post. List prices are as of 8 October 2026, from our LLM API price comparison. Fine-tuning prices are as of 16 October 2026.

What RAG, fine-tuning and long context each change

Retrieval and long context both change what the model sees, and neither touches its weights. With RAG, a retriever picks passages for each request, so updating knowledge means re-indexing what changed, and the retriever can apply each user’s permissions before text reaches the model. With long context, the whole source goes into every prompt, so no retriever can miss the passage that holds the answer.

Fine-tuning changes the weights, and what it changes reliably is behaviour. Two EMNLP 2024 papers tested it as a way to add knowledge. Gekhman and colleagues found that examples carrying new facts were learned much more slowly than examples consistent with what the model knew, and once learned, they linearly increased its tendency to hallucinate.1 Ovadia and colleagues found that RAG consistently outperformed unsupervised fine-tuning, for knowledge seen in training and for entirely new knowledge.2

RAG Long context Fine-tuning
What changes The passages the model sees on each request Nothing is selected; the model sees the whole source The model’s weights
Strong at Large or fast-changing corpora, per-user access, citations Questions that span the source, summaries, small corpora Format, tone, narrow labels, copying a larger model
Weak at Questions that need many passages or the whole document Cost and latency per request, accuracy as inputs grow Adding or updating facts
Updating knowledge Re-index the changed documents Edit the prompt and let the cache refill Retrain
Main cost Building and evaluating the retrieval pipeline Input tokens on every request Labelled data, training and evaluation

RAG vs long context: cost per question at October 2026 prices

Take one workload and price it three ways. The assumptions are ours, chosen to resemble a documentation or support assistant:

  • A 150,000-token knowledge base, about 83,000 English words on Anthropic’s current tokenizer, which fits roughly 555,000 words in 1M tokens.3
  • 2,000 tokens of instructions, a 100-token question and a 500-token answer. Reasoning tokens are left out, since they would add the same amount to every option.
  • 1,000 questions a working day, 22 working days a month.
  • Cached long context: instructions and documents form a 152,000-token cached prefix, and the cache goes cold and is rewritten 20 times a day.
  • RAG: ten retrieved 500-token chunks per question, instructions cached, and each query embedded with OpenAI’s text-embedding-3-large at $0.13 per million tokens.4 Vector database hosting and engineering time are left out.

Claude Sonnet 5.5 costs $2 per million input tokens, $10 per million output tokens, $0.10 per million for cache reads and $2.50 per million for 5-minute cache writes.5 Per question:

  • Whole knowledge base, uncached: (152,100 × $2 + 500 × $10) ÷ 1M = $0.3042 + $0.0050 = $0.309 a question.
  • Whole knowledge base, cached: (152,000 × $0.10 + 100 × $2 + 500 × $10) ÷ 1M = $0.0152 + $0.0002 + $0.0050 = $0.0204. Cache writes add 20 × 152,000 × $2.50 ÷ 1M = $7.60 a day, or $0.0076 a question. Total $0.028.
  • RAG: (2,000 × $0.10 + 5,100 × $2 + 500 × $10) ÷ 1M = $0.0002 + $0.0102 + $0.0050 = $0.0154. Instruction cache writes ($0.10 a day) and the query embedding ($0.000013) bring it to $0.016.

The same workload on four models, at list prices as of 8 October 2026:

Model Whole knowledge base, uncached Whole knowledge base, cached RAG Cached long context ÷ RAG
Claude Sonnet 5.5 $0.309 $0.028 $0.016 1.8×
GPT-6.1 Sol $0.309 $0.028 $0.016 1.8×
Gemini 3.8 Flash $0.116 $0.016 $0.006 2.7×
Claude Haiku 5.5 $0.077 $0.011 $0.0008 13.5×

GPT-6.1 Sol’s prices, cache writes included, match Sonnet 5.5’s at this prompt size.4 For Gemini 3.8 Flash we assumed Google’s default implicit caching, which has no write premium, and billed the 20 daily refreshes at the full input price. Google doesn’t guarantee cache hits, and the model’s introductory price doubles on 1 January 2027.67

Caching cuts the cost of sending everything by about 91% on Sonnet 5.5, and RAG stays 1.8 times cheaper. At 22,000 questions a month that is $616 against $341, which leaves a retrieval pipeline $275 a month to cover building, hosting and evaluating it.

Price thresholds can change the answer. The 150,000-token prompt crosses Claude Haiku 5.5’s 100K threshold, above which every token, cache reads included, costs five times as much.5 Cached long context costs 13.5 times RAG there. GPT-6 models reprice above 272K tokens and Gemini 3.1 Pro above 200K.47

For comparison with a measured number, the study assistant we run on an AI study platform sends a whole course of up to 60k tokens with each question. It costs about $0.018 a question, as we described in grounding a study assistant in live web search and the course itself.

Latency: long prompts, cache hits and retrieval steps

The model reads the whole prompt before it writes, so prompt length shows up as time to first token. Google’s long-context guide says every request carries some fixed latency and that longer queries generally take longer to the first token.8

Cache hits remove much of that reading. In Anthropic’s launch figures for prompt caching, a 100,000-token cached prompt cut time to first token from 11.5 s to 2.4 s.9 Those are vendor figures, on the models of that time. OpenAI says caching cuts the time spent processing input but gives no number.10

Retrieval adds its own steps before the model starts, because the query has to be embedded and the index searched, and the results reranked if you use a reranker. An agent that searches several times adds a model round trip per search. We haven’t measured these steps for this post, so time them in your own stack against the prompt-reading time they save.

Reasoning effort often outweighs both. In Artificial Analysis’s tests, Claude Opus 5.5’s first token came after 8.7 s at low effort and 731.5 s at max, as our price comparison reports. Our study assistant, with the whole course in context, answered fact questions in 3.5 to 6.5 s and summarised a whole course in 15 to 17.5 s.

What the research says about long-context accuracy

Position matters. In Lost in the Middle, models were most accurate when the relevant text sat at the start or end of the input. GPT-3.5-Turbo’s multi-document QA accuracy dropped by more than 20% depending on position, and with 20 or 30 documents its worst position scored below its 56.1% closed-book score, which it reached with no documents at all.11

Length hurts, even on simple tasks. Chroma tested 18 models and found performance grew less reliable as input length grew. On LongMemEval, every model did significantly better with focused prompts of about 300 tokens than with full prompts of about 113k tokens.12

Long context wins on average, at a price. Li and colleagues compared long context with RAG on Gemini-1.5-Pro, GPT-4O and GPT-3.5-Turbo.13 With enough resources, long context had the higher average score on all three, 49.70 against 37.33 on Gemini-1.5-Pro and 48.67 against 32.60 on GPT-4O, while RAG cost far less. The two gave identical predictions for over 60% of queries, and RAG’s failures clustered in multi-step, general, long and implicit questions.

Anthropic’s 200K rule of thumb. In 2024 Anthropic wrote that a knowledge base under 200,000 tokens, about 500 pages, can go into the prompt whole, with prompt caching to make that faster and cheaper.14 On its current tokenizer, 200K tokens is roughly 150,000 words.3 Its documentation also warns that accuracy and recall degrade as the token count grows.15

2026 results. LongBench Pro tested 46 models from 8K to 256K tokens and found effective context length typically shorter than the claimed length.16 ATLAS scored 26 models from 8K to 1M tokens. Seven moved two or more places between their 8K-to-128K and 8K-to-1M scores, and the leader changed from Gemini 3.1 Pro Preview at 128K to Claude Opus 4.6 at 1M.17 Vendor results on synthetic retrieval look stronger. OpenAI reports 96.3% for GPT-6 Astra between 512K and 1M tokens on its MRCR v2 test, which hides eight near-identical requests in a long conversation and asks for one, against 73.8% for GPT-5.6 Sol.1819 ATLAS’s authors caution that strong retrieval need not transfer to downstream use.17

Layout helps. Google reports about 99% accuracy on a single “needle” and lower accuracy when the model must find many pieces of information at once.8 Google and Anthropic both advise putting the question after the documents, which Anthropic says improved response quality by up to 30% in its tests.20

Our own evidence is small. With the whole course in context, our study assistant answered 8 of 8 fact questions correctly, enough to show the design works for fact lookups and too few for an accuracy rate.

Does RAG still matter with 1M-token context?

For many products, yes. A 1M-token window holds about 555,000 English words on Anthropic’s current tokenizer, many document collections are larger, and effective context is shorter than the window. Retrieval also does things a window can’t. It can filter by each user’s permissions before text reaches the model, pick up a document edited an hour ago without rewriting a cache, and point to the passage behind each claim.

Agents with long windows still gain from it. Cursor reported that adding semantic search alongside grep raised its agent’s accuracy on codebase questions by 12.5% on average, and by 6.5% to 23.5% depending on the model, on Cursor’s own benchmark.21

Retrieval’s main failure is missing the passage. Embedding similarity measures how related two texts are, and related texts can differ in exactly the detail that matters. In our textbook-to-course engine, distinct topics scored 0.67 to 0.91 on cosine similarity with text-embedding-3-large and reworded duplicates 0.70 to 0.94, so no threshold separated them. Anthropic’s contextual retrieval prepends a short explanation to each chunk before indexing. Combined with BM25, it cut top-20 retrieval failures by 49%, and by 67% with a reranker.14 Keyword search also suits text dense with exact terms, which is why our study assistant uses BM25 above its 60k-token cap.

When to fine-tune an LLM

Fine-tune when prompts and examples can’t get the behaviour you need, or can’t get it cheaply enough at your volume. Three uses hold up.

  • Format and tone. OpenAI’s guide says fine-tuning can make a model format responses consistently. It lists room for more examples than fit in a prompt, shorter prompts and a smaller, cheaper model as the advantages over prompting.22
  • Narrow classification. With stable categories and thousands of labels, a fine-tuned classifier is hard to beat. In tests we summarised in our post on decision models, ModernBERT-large fine-tuned on 25,000 labelled reviews matched Jev’s 96.5% on IMDb, and a DeBERTa prompt-injection classifier on a laptop CPU beat Jev by 89.0% to 86.4%.
  • Distillation. Training a small model on a large one’s outputs can carry its behaviour across. Hsieh and colleagues’ fine-tuned 770M-parameter T5 beat a few-shot prompted 540B PaLM on a benchmark using 80% of the available data.23

Most of this now runs on LoRA, which trains small low-rank matrices beside frozen weights. Its authors reported 10,000 times fewer trainable parameters and 3 times less GPU memory than full fine-tuning of GPT-3 175B, with no added inference latency.24

Cheap cache reads have weakened the cost case for fine-tuning. Take a classifier on Gemini 3.1 Flash-Lite on Google Cloud, which costs $0.25 per million input tokens, $0.025 cached and $1.50 output on the global endpoint.25 Assume a 6,000-token few-shot prefix, a 300-token input and a 5-token label. Cost per million requests is tokens per request times the price per million tokens:

  • Prompted, uncached: 6,300 × $0.25 + 5 × $1.50 = $1,582.50.
  • Prompted, prefix cached: 6,000 × $0.025 + 300 × $0.25 + 5 × $1.50 = $232.50.
  • Tuned, 400-token prompt: a tuned Gemini 3 endpoint costs 1.5 times the base price and is served only from US and EU multi-region endpoints.2526 We priced it at 1.5 times the non-global rate of $0.275 and $1.65, so 400 × $0.4125 + 5 × $2.475 = $177.38.

Training on 3,000 examples of 400 tokens for 3 epochs is 3.6M training tokens, or $10.80 at $3 per million. Caching shrinks the tuned model’s saving from about 89% to about 24%.

Who still sells fine-tuning, and what it costs

As of 16 October 2026:

Provider Status Training price Running the tuned model
OpenAI Closed to new users since 7 May 2026. Since 2 July, only organisations that ran a tuned model in the previous 60 days can start jobs, until 6 January 202727 gpt-4.1-mini $5 per 1M training tokens; o4-mini reinforcement fine-tuning $100 an hour4 gpt-4.1-mini $0.80 input, $3.20 output per 1M
Google Cloud (Gemini Enterprise Agent Platform, which now includes Vertex AI) Supervised tuning for Gemini 3.5 Flash and 3.1 Flash-Lite in public preview, plus the Gemini 2.5 models2826 $10 per 1M on 3.5 Flash, $3 on 3.1 Flash-Lite, $25 on 2.5 Pro25 1.5 times the base price on Gemini 3
Gemini API and AI Studio No tunable model, and no immediate plans for one29 – –
Anthropic No fine-tuning in its API pricing. Bedrock’s only tunable Claude model, Claude 3 Haiku in us-west-2, reached end of life there on 10 September 20263031 – –
Mistral Fine-tuning API listed as deprecated and no longer actively supported32 – –
Fireworks, open weights LoRA available $0.50 per 1M up to 16B parameters, $3 from 16.1B to 80B33 Same price as the base model
Together AI, open weights LoRA available $0.34 per 1M for Qwen3.5 up to 9B and Llama 3.1 8B, $1.05 for Qwen3.8 27B or Gemma 4 31B, $4 minimum per job34 –

Google Cloud and Together AI count training tokens as dataset tokens times epochs.2534 A tuned closed model is also tied to its base model’s lifespan. OpenAI serves tuned models until their base models are deprecated,22 and Bedrock blocks new tuning jobs once a model enters its Legacy stage.35 With open weights you keep the adapter and can serve it on any host that supports LoRA, or on your own GPUs.

Hybrids: retrieval into long context, and small models that route

Retrieval that returns whole sections. Classic RAG passes a few short chunks; Li and colleagues used five 300-word chunks per query.13 With a long window you can retrieve whole sections or documents, tens of thousands of tokens, and let the model read them in order. Our study assistant does the simple version, sending the whole course up to 60k tokens and letting BM25 choose passages above that.

RAG with a long-context fallback. Li and colleagues’ Self-Route answers with RAG first, lets the model judge whether the retrieved text is enough, and sends the full context only when it isn’t. It cut cost by 65% on Gemini-1.5-Pro and 39% on GPT-4O, with performance comparable to long context.13

A small model that routes. A fine-tuned classifier or a decision model can send each question to the cached corpus, to retrieval, or to a person or a larger model. The decision models post linked above compares fine-tuned encoders, which suit stable categories, with decision models such as Jev and Clef, which read the options in each request. One cascade there matched GPT-5.6 Terra’s accuracy at 26% to 28% of its cost.

A tuned model on top of retrieval. Fine-tuning can fix the output schema and tone while retrieval or a cached prompt supplies the content, which keeps facts that will go stale out of the training set.

How the numbers here were put together

  • Prices are standard pay-as-you-go rates from our 8 October 2026 comparison. Cache-write prices come from Anthropic’s and OpenAI’s pricing pages, and OpenAI’s were checked against its page as archived on 16 October 2026. Fine-tuning status and prices come from provider pages as of 16 October 2026.
  • Worked costs are our arithmetic from the stated assumptions. They leave out reasoning tokens, vector database hosting, engineering time, batch discounts and taxes.
  • Field notes come from two earlier posts about an AI study platform we build and run.
  • Research results come from the cited papers, on the models they tested, most of them older than today’s frontier models. Vendor results are labelled as such.
  • We ran no new accuracy, latency or cost tests for this post.

RAG vs fine-tuning vs long context: decision table and checklist

Situation Start with Why
Knowledge under about 200K tokens, shared by all users, changing weekly or less The whole source in a cached prompt No retriever to miss passages, and caching cut our example’s cost by about 91%
Knowledge larger than the window, or than the model’s effective context RAG that retrieves whole sections It doesn’t fit, and effective context is shorter than advertised
Per-user permissions, or content that changes hourly RAG with permission filters and incremental re-indexing Restricted text never enters the prompt, and edits don’t force cache rewrites
A cheap model with a long-prompt price threshold RAG that keeps prompts under the threshold Cached long context cost 13.5 times RAG on Claude Haiku 5.5 in our example
Summaries, comparisons and multi-step questions across the source Long context, or RAG with a long-context fallback RAG’s failures cluster in multi-step, general and implicit questions
A format or tone the model keeps missing despite examples Fine-tuning, with LoRA on open weights or Gemini on Google Cloud It changes behaviour while the facts stay in retrieval
Stable categories, thousands of labels, a tight latency budget A fine-tuned classifier ModernBERT matched Jev on IMDb, and a DeBERTa classifier beat it on prompt injection
A large model’s quality at a small model’s price Distillation into a small fine-tuned model A tuned 770M T5 beat a few-shot prompted 540B PaLM on a benchmark

Before you build:

  1. Count your corpus with each candidate provider’s token counter. Anthropic’s current tokenizer produces about 30% more tokens for the same text than its previous one.5
  2. Compare that count, and your largest prompts, with the price thresholds: 100K tokens on Claude Haiku 5.5, 200K on Gemini 3.1 Pro and 272K on GPT-6 models.
  3. Write 50 to 100 real questions with known answers, including answers that sit mid-document, questions that span documents and on-topic questions that should be answered. Our old, stricter course prompt refused 6 of 24 on-topic questions.
  4. Run the cached whole-source baseline first, with the question after the documents. Record accuracy, p50 and p95 time to first token, and cost from billed tokens including cache writes.
  5. Add retrieval when the baseline fails on cost, latency, accuracy, permissions or freshness, and measure retrieval recall separately from answer accuracy.
  6. Log cache hit rates. A cold cache bills writes at 1.25 times the input price for Claude’s 5-minute cache and on OpenAI’s GPT-5.6 and later models.510
  7. Fine-tune only for behaviour, after prompts with examples fall short. Hold part of a labelled set back for evaluation, and price the tuned model’s inference as well as its training.
  8. Before tuning a closed model, check the provider’s fine-tuning status and the base model’s retirement date. Re-run your evaluation at your real prompt length whenever you change model.

  1. Gekhman et al., “Does Fine-Tuning LLMs on New Knowledge Encourage Hallucinations?”, EMNLP 2024, https://arxiv.org/abs/2405.05904 ↩

  2. Ovadia et al., “Fine-Tuning or Retrieval? Comparing Knowledge Injection in LLMs”, EMNLP 2024, https://aclanthology.org/2024.emnlp-main.15/ ↩

  3. Anthropic, “Models overview”, Claude API docs, https://platform.claude.com/docs/en/about-claude/models/overview ↩↩

  4. OpenAI, “Pricing”, https://developers.openai.com/api/docs/pricing, as archived on 16 October 2026, http://web.archive.org/web/20261016184316/https://developers.openai.com/api/docs/pricing ↩↩↩↩

  5. Anthropic, “Pricing”, Claude API docs, https://platform.claude.com/docs/en/about-claude/pricing ↩↩↩↩

  6. Google, “Context caching”, Gemini API documentation, https://ai.google.dev/gemini-api/docs/caching ↩

  7. Google, “Gemini Developer API pricing”, https://ai.google.dev/gemini-api/docs/pricing ↩↩

  8. Google, “Long context”, Gemini API documentation, https://ai.google.dev/gemini-api/docs/long-context ↩↩

  9. Anthropic, “Prompt caching with Claude”, https://claude.com/blog/prompt-caching ↩

  10. OpenAI, “Prompt caching”, https://developers.openai.com/api/docs/guides/prompt-caching ↩↩

  11. Liu et al., “Lost in the Middle: How Language Models Use Long Contexts”, Transactions of the ACL, https://arxiv.org/abs/2307.03172 ↩

  12. Hong, Troynikov and Huber, “Context Rot: How Increasing Input Tokens Impacts LLM Performance”, Chroma, 14 July 2025, https://www.trychroma.com/research/context-rot ↩

  13. Li et al., “Retrieval Augmented Generation or Long-Context LLMs? A Comprehensive Study and Hybrid Approach”, EMNLP 2024 Industry Track, https://arxiv.org/abs/2407.16833 ↩↩↩

  14. Anthropic, “Introducing Contextual Retrieval”, 19 September 2024, https://www.anthropic.com/news/contextual-retrieval ↩↩

  15. Anthropic, “Context windows”, Claude API docs, https://platform.claude.com/docs/en/build-with-claude/context-windows ↩

  16. Chen et al., “LongBench Pro: A More Realistic and Comprehensive Bilingual Long-Context Evaluation Benchmark”, arXiv, 6 January 2026, https://arxiv.org/abs/2601.02872 ↩

  17. Huang et al., “ATLAS: All-round Testing of Long-context Abilities across Scales”, arXiv, 27 May 2026, https://arxiv.org/abs/2605.28079 ↩↩

  18. OpenAI, “GPT-6 Astra: A new generation of intelligence”, 3 September 2026, long-context table, https://openai.com/index/gpt-6-astra/ ↩

  19. OpenAI, “MRCR” dataset card, Hugging Face, https://huggingface.co/datasets/openai/mrcr ↩

  20. Anthropic, “Prompting best practices”, long-context prompting, https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices ↩

  21. Cursor, “Improving agent with semantic search”, 6 November 2025, https://cursor.com/blog/semsearch ↩

  22. OpenAI, “Model optimization”, fine-tuning guide, https://developers.openai.com/api/docs/guides/model-optimization ↩↩

  23. Hsieh et al., “Distilling Step-by-Step! Outperforming Larger Language Models with Less Training Data and Smaller Model Sizes”, Findings of ACL 2023, https://arxiv.org/abs/2305.02301 ↩

  24. Hu et al., “LoRA: Low-Rank Adaptation of Large Language Models”, 2021, https://arxiv.org/abs/2106.09685 ↩

  25. Google Cloud, “Agent Platform pricing”, Gemini 3 and model tuning sections, https://cloud.google.com/gemini-enterprise-agent-platform/generative-ai/pricing ↩↩↩↩

  26. Google Cloud, “Gemini Enterprise Agent Platform release notes”, entries for 22 April, 15 June and 22 June 2026, https://docs.cloud.google.com/gemini-enterprise-agent-platform/release-notes ↩↩

  27. OpenAI, “Deprecations”, fine-tuning platform entry of 7 May 2026, https://developers.openai.com/api/docs/deprecations ↩

  28. Google Cloud, “About supervised fine-tuning for Gemini models”, https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/tuning/supervised-tuning ↩

  29. Google, “Fine-tuning with the Gemini API”, https://ai.google.dev/gemini-api/docs/model-tuning ↩

  30. Amazon Web Services, “Customize a model with fine-tuning in Amazon Bedrock”, https://docs.aws.amazon.com/bedrock/latest/userguide/custom-model-fine-tuning.html ↩

  31. Amazon Web Services, “Claude 3 Haiku” model card, Amazon Bedrock User Guide, https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-anthropic-claude-3-haiku.html ↩

  32. Mistral AI, “Text & Vision Fine-tuning”, deprecated features, https://docs.mistral.ai/resources/deprecated/finetuning/text_vision_finetuning ↩

  33. Fireworks AI, “Pricing”, fine-tuning section, https://fireworks.ai/pricing ↩

  34. Together AI, “Pricing”, fine-tuning section, https://www.together.ai/pricing ↩↩

  35. Amazon Web Services, “Model lifecycle (Legacy)”, Amazon Bedrock User Guide, https://docs.aws.amazon.com/bedrock/latest/userguide/model-lifecycle-legacy.html ↩

Frequently asked questions

RAG vs fine-tuning: which should I use?

Use RAG, or the whole document in a cached prompt, when the model needs facts it doesn’t have. Use fine-tuning to change behaviour, such as a fixed output format, a tone or a narrow set of labels. In two EMNLP 2024 studies, RAG beat unsupervised fine-tuning at adding knowledge, and new facts learned through fine-tuning raised hallucination.

Does RAG still matter with 1M token context windows?

Yes, when the corpus is bigger than the model’s effective context, changes often or needs per-user permissions, and when cost per question matters. For a knowledge base under about 200K tokens, sending all of it in a cached prompt is often the simpler place to start.

Is RAG cheaper than long context?

Usually, and caching narrows the gap. For a 150K-token knowledge base on Claude Sonnet 5.5 at 8 October 2026 prices, we worked out $0.309 a question uncached, $0.028 cached and $0.016 with RAG. On Claude Haiku 5.5 that prompt crosses a 100K-token price threshold, and cached long context costs 13.5 times RAG.

When should you fine-tune an LLM?

When prompts and examples can’t produce a consistent format, tone or label, when you want a small model to copy a large one, or when a long few-shot prompt costs too much at your volume. Build a labelled evaluation set first. Facts belong in retrieval or the prompt.

Can you still fine-tune GPT or Claude models?

OpenAI closed fine-tuning to new users on 7 May 2026, and active existing customers can start jobs until 6 January 2027. Anthropic’s API lists no fine-tuning, and Claude 3 Haiku, the only Claude model Bedrock could tune, reached end of life there on 10 September 2026. Gemini models can still be tuned on Google Cloud.

RAG vs fine-tuning cost: which is cheaper?

They pay for different things. Training is cheap: as of 16 October 2026, Google Cloud charges $3 per million training tokens for Gemini 3.1 Flash-Lite and Fireworks $0.50 for LoRA on open models up to 16B parameters. Tuned Gemini 3 models cost 1.5 times the base price to run, and tuning doesn’t replace retrieval when the model needs facts.

Work with us

Building something like this?

9io is a small team of senior engineers with a fractional CTO, and we work by the hour. Send us a note about your product. The reply comes from the person who'd do the work.