Last updated: Aug 25, 2026

When Not to Use RAG: Search, Tools, or Fine-Tuning?

Dan Lee, JoinAI Founder · AI Tech Lead

JoinAI Founder · AI Tech Lead

Aug 25, 20265 min read
Architecture decision tree choosing direct context, search, tools, deterministic code, fine-tuning, or RAG

Do not use RAG merely because an application contains documents and an LLM. RAG is useful when a model must synthesize answers from a changing or private corpus that cannot fit directly in the request. It also creates an ingestion pipeline, retrieval failure modes, access-control surface, latency, evaluation work, and a document lifecycle you must operate.

Start with the smallest architecture that can satisfy the task.

The decision tree

Text
Does the output need external or private facts?
no -> prompt/model baseline; evaluate before adding retrieval
yes
Can the necessary context fit reliably in the request?
yes -> supply direct, versioned context
no
Does the user mainly need documents or exact records?
yes -> search/filter and show results
no
Is the source a live structured system or action API?
yes -> query a typed tool/API
no
Is the need primarily behavior/style rather than facts?
yes -> prompting or fine-tuning
no -> evaluate RAG against the simpler baseline

These options can be combined. The point is to assign each need to the right mechanism rather than making vector retrieval the universal middle layer.

Use direct context when the source is small

If the relevant policy, schema, or document set fits comfortably in the model request, pass it directly with a version identifier. This removes chunking and retrieval uncertainty and makes reproduction easier.

Direct context fits:

  • one contract or short policy selected by the application;
  • a bounded code diff and its surrounding files;
  • a small product catalog already filtered by deterministic logic;
  • structured records converted into a compact representation.

Measure token cost and the model's ability to use long context. “It fits” does not guarantee it will be attended to correctly, but adding retrieval cannot help if it frequently omits required evidence.

Use search when the user needs sources, not synthesis

If a user wants to find documents, exact clauses, tickets, or records, return ranked results with snippets and filters. Generation can hide missing evidence or merge distinct records into a fluent answer.

Prefer search for:

  • legal or compliance discovery where the source text must be inspected;
  • exact identifiers, error messages, product codes, and names;
  • exploratory browsing with facets and sorting;
  • high-risk decisions where synthesis is not independently verified.

You can add an optional summary after showing the evidence. Keep search quality measurable on its own.

Use tools for live structured truth

A vector index is a poor authority for account balance, inventory, shipment state, access permissions, or appointment availability. Query the system of record through a typed API. The tool should validate identity, inputs, authorization, and freshness outside the model.

For a support assistant:

Text
policy explanation -> retrieve approved policy text
current order state -> call order API
refund action -> propose, authorize, approve, execute idempotently

Do not embed database snapshots and call them real time. Use RAG for explanatory documents and tools for current records and actions.

Use deterministic code for known rules

If the business can state the rule precisely, implement and test it as code. Tax calculations, permission checks, eligibility thresholds, routing tables, and irreversible approval rules should not depend on approximate semantic retrieval or generated interpretation.

An LLM may extract candidate fields from unstructured text. Deterministic code should validate and decide when the rule itself is known.

Use prompting or fine-tuning for behavior

Retrieval supplies information at inference time. It is not the direct solution for consistent tone, output structure, classification boundaries, or specialized behavior.

  • Use instructions and examples for format, tone, and task procedure.
  • Use structured outputs and validators for machine-consumed contracts.
  • Consider fine-tuning when a stable, narrow behavior remains weak after prompting and you have a representative training and evaluation set.
  • Keep RAG when the answer must cite changing external knowledge.

AWS's current comparison notes that RAG can incorporate changing documents and references, while fine-tuning is slower to update and is more appropriate for other behavior changes such as specialized output or summarization. Neither technique removes the need for evaluation.

Avoid RAG when the corpus cannot support the task

Retrieval cannot recover facts that are absent, inaccessible, obsolete, or too ambiguous in the source collection. Before building an index, sample the corpus and label representative questions as answerable, partially answerable, conflicting, or unanswerable.

Stop and repair the source when:

  • documents contradict without authority or effective dates;
  • access rules cannot be represented and tested;
  • deletion and revocation cannot propagate;
  • scans, tables, or layout lose critical meaning during extraction;
  • the task requires data the organization does not possess;
  • no owner is accountable for source quality.

The RAG failure-mode decision tree helps separate source, ingestion, retrieval, context, and generation failures.

Avoid RAG when the economics do not close

RAG adds ingestion compute, embeddings, storage, retrieval, possible reranking, context tokens, monitoring, and reindexing. For a small low-volume corpus, direct context or conventional search may be cheaper and easier to operate. For a frequently changing corpus, indexing lag and update load may dominate.

Create a per-success budget:

Text
monthly ingestion and indexing
+ retrieval/reranking per request
+ extra model input tokens
+ evaluation and operations
--------------------------------
/ successful supported tasks

Compare it with the simplest baseline, not with an imagined system that has no maintenance cost.

Architecture selection matrix

NeedDefault starting pointEvidence to move beyond it
General reasoning with no private factsPrompt/model baselineRepeatable missing-knowledge failures
One small known documentDirect contextContext limit or selection failures
Find exact documents or recordsLexical/hybrid searchUsers need measured synthesis
Current structured factsTyped API/toolSource lacks query interface
Deterministic policy or calculationCode/rulesRule cannot be represented deterministically
Changing private corpus with citationsRAGBaseline already satisfies quality/cost
Corpus-wide themes or relationshipsGraph/structured analysisConventional retrieval succeeds on target queries
Stable specialized behavior or stylePrompting, then fine-tuning experimentPrompt baseline misses measured target behavior

Run a baseline experiment

Build 30–100 representative cases with expected sources and task outcomes. Compare:

  1. model without external context;
  2. direct context or search-only baseline;
  3. typed tools for structured facts;
  4. the proposed RAG pipeline.

Measure answer correctness, source/citation correctness, refusal behavior, latency, cost, and permission failures. Segment by exact lookup, synthesis, multi-document, current-record, and unanswerable questions. Choose RAG only for slices where its additional machinery produces meaningful value.

Microsoft's RAG guidance recommends gathering representative documents and queries before choosing chunking, embedding, retrieval, and end-to-end evaluation strategies. Follow that order. Architecture should answer an observed task distribution.

If RAG wins, use the production RAG architecture guide and the RAG evaluation metrics guide to build the release gate. If the task needs corpus-wide relationships, compare the additional graph pipeline with GraphRAG versus conventional RAG.

Sources and further reading

Build better AI systems

One practical engineering lesson in your inbox each week.

JoinAI Premium

Go from reading to shipping

Get guided learning, hands-on AI engineering projects, and premium practice.

Explore Premium
Dan Lee, JoinAI Founder · AI Tech Lead

About the author

JoinAI Founder · AI Tech Lead

Dan Lee is the founder of JoinAI and an AI tech lead with more than 10 years of industry experience across data engineering, machine learning, and applied AI. He previously worked as an engineer at Google.