Infrastructure Decisions · judgement tool
RAG or a long context window?
Corpus size vs the context window, update frequency, citations and per-call cost decide it. Get a verdict with each factor tagged official fact / calculation / StackSays rule / estimate.
A judgement tool, not a tool ranking · thresholds are StackSays rules, not industry standards · official facts verified 2026-07-17 · share the URL to share your answers
Your situation
The recommendation updates as you answer. Share the URL to share it.
Recommendation
Probably yes
Based on the factors you set — 2 pushing toward adopting, 0 against.
Why yes
- +22 Corpus exceeds context — Context windows are finite (per-model documented limits) — a corpus bigger than the window must be retrieved (RAG), not stuffedofficial fact
- +12 Per-call cost — Stuffing a large context every call burns tokens; retrieving only relevant chunks is far cheaper at volumeStackSays rule
When to reassess
Use long-context while your docs fit the window and rarely change. Move to RAG when the corpus outgrows the window, updates often, or per-call token cost bites.
Minimal implementation
Start with long-context (stuff the docs) for a small stable set. Adopt RAG (chunk + embed + retrieve) when the corpus or cost forces it — see the vector-DB decision.
Risk of not doing it
Long-context on a big/changing corpus means truncated or stale answers and a large token bill; premature RAG means infrastructure you didn't need.
Cost & complexity once adopted
RAG adds an embedding + vector-store pipeline to build and maintain. Long-context adds tokens per call. Match to your corpus size and update rate.
This is a judgement tool, not a leaderboard. The StackSays rule and StackSays estimate factors are StackSays logic and opinion; the official fact factors link to official sources below. No industry-standard threshold is implied — the answer is driven by the conditions you set.
Official facts cited
| Source | Verified |
|---|---|
| Long-context windows & limits (official) | 2026-07-17 |
Only the factors tagged “official fact” rest on these sources; rules and estimates are StackSays logic and are labeled as such.