No religion, just fit
RAG is better when you have a large corpus and need selective retrieval, citations, or fast repeated lookup. Long context is better when the task needs cross-reference over a bounded set that fits and should be seen together. Treat them as tools in a routing decision, not as competing philosophies.
Production usually combines both
Retrieve candidate files via RAG, then load the few that actually matter in full into long context. That gives you library scale plus desk-level reasoning. Pure RAG drops cross-references; pure long-context drowns in irrelevant material; the hybrid splits the difference.
Route by task shape
Ask whether the task is search, synthesis, audit, or transformation. Search wants retrieval. Deep synthesis across a few documents wants long context. Transformation wants the exact source files and tests, not a vector-store horoscope. The shape of the task chooses the strategy; ego does not get a vote.