Home AI Solutions MedTech Cyber Security Clients Company Blog עברית Get Started
AIRAGFine-TuningArchitectureGenAI

RAG vs Fine-Tuning vs Tool Use: When Each Wins, and What It Costs

Pelican Tech 7 min read
Abstract dark composition with three layered architectural pathways in blue and orange, evoking RAG, fine-tuning, and tool-call paradigms

The decision between retrieval-augmented generation (RAG), fine-tuning, and tool use is no longer a sharp choice in 2026. Most production GenAI systems combine all three. The interesting question is which problems each pattern actually solves well, and which decisions teams routinely get wrong because they optimised on the demo rather than on the operating cost.

This piece is the trade-off analysis we use with engineering teams choosing the architecture for a new GenAI system, or auditing an existing one that has begun to underperform. It is opinionated about which costs matter most beyond the prototype phase, and which signals tell you a system has been built around the wrong pattern.

What each pattern actually solves

The three patterns are often described as alternatives. They are not. They solve different categories of problem, and a serious system uses each where it fits.

RAG solves "the model doesn't know your specific data." A foundation model has broad world knowledge plus whatever training cutoff. Your organisation's contracts, customer history, internal documentation, product catalogue, and operational data are not in that knowledge. RAG retrieves relevant fragments and inserts them into the model's context for the current request. It does not change the model's behaviour; it changes its inputs.

Fine-tuning solves "the model doesn't behave the way you need." Style, format, tone, domain-specific reasoning patterns, internal terminology, refusal behaviour for sensitive topics, structured output conformance — these are properties of the model's weights, not of its inputs. Fine-tuning adjusts the weights, with various depths from full retraining (rare in production) to LoRA adapters (common) to instruction-tuning datasets (very common).

Tool use solves "the model needs to act, not just speak." A model on its own produces text. A model with tools can query a database, call an API, perform a calculation, write to a file, trigger a workflow. The model is no longer a knowledge surface; it is an interface to the rest of your systems.

A fluent rule of thumb: RAG for knowledge, fine-tuning for behaviour, tools for action. Most failures come from using one to solve a problem that another would solve more cheaply.

The decision teams routinely get wrong

When teams have a new GenAI requirement, the most common architectural mistake is reaching for fine-tuning when RAG would do, or for fine-tuning when prompt engineering would do.

Fine-tuning is the most expensive of the three patterns to operate over time. It requires a labelled training dataset (which has to be maintained as your domain evolves), a training pipeline (which becomes a regression-test surface), and a deployment story for the fine-tuned model (which is no longer interchangeable with the base model). Every new foundation model you want to upgrade to forces a re-training step. The behaviour you fine-tuned in is now coupled to a specific model generation.

In practice, many of the things teams reach for fine-tuning to solve are better solved with:

  • A more carefully written system prompt. Format conformance, tone, and persona behaviour are surprisingly tractable in 2026's foundation models with a well-structured system prompt. Try this first.
  • Few-shot examples in context. When format conformance is genuinely tricky, including 2–4 high-quality examples in the system prompt is often sufficient.
  • Structured output APIs. Most production model APIs now support strict JSON schemas that the model is constrained to match. This solves "the model occasionally returns invalid JSON" without fine-tuning.
  • A small classifier wrapped around the model. When the problem is "decide which action to take," a lightweight classifier that calls the appropriate model with the appropriate prompt is often cheaper and easier to evaluate than a fine-tuned model that does both.

Fine-tuning is the right answer when the behaviour cannot be expressed prompt-side: highly specialised domain reasoning, cases requiring a fundamentally different refusal posture than the base model has, or quality requirements that exceed what prompt engineering can deliver. We see roughly one-quarter of fine-tuning projects we review meet that criterion. The other three-quarters could be replaced with prompt work and structured outputs at a fraction of the operating cost.

The hidden costs of RAG

RAG is the easiest pattern to get to a working demo with. It is also the pattern that hides the most operating cost behind the demo.

Retrieval quality is the system's quality. A RAG system is only as good as its retrieval. If the retriever returns three irrelevant chunks for a query, the model will write a confident answer based on irrelevant chunks. Good retrieval requires curated content (deduplicated, structured, chunked thoughtfully), an embedding model appropriate for the domain, and ongoing relevance evaluation. The cheapest part of the RAG pipeline at prototype time is the most expensive at production scale.

The corpus has to be governed. What is in the retrievable corpus is what the model can produce. If the corpus contains stale documents, the model will produce stale answers. If it contains contradictory documents, the model will produce confident wrong answers. Corpus governance is a content operations function, not an ML function, and most teams do not budget for it.

Latency compounds at the retrieval step. Every RAG query adds 100–500ms for retrieval before the model starts. For chat-style interactive applications this is acceptable; for high-frequency workflows or pipelines that batch many queries, it becomes the bottleneck.

Cost scales with context size. Retrieved context is paid context. As corpora grow and you retrieve more chunks per query for accuracy, your per-query cost scales linearly. The pricing math at 100 queries a day is forgiving. At 100,000 queries a day, the difference between retrieving 4 chunks and retrieving 10 chunks is the difference between a $300/month system and a $7,500/month system.

The right operating discipline for RAG is the same as for a search system: measure precision and recall on a held-out evaluation set, track them over time, treat declines as a programme issue, and budget content operations as a permanent cost rather than a setup cost.

Tool use as the architecture, not the feature

Tool use was originally introduced as a model feature: "the model can now call functions." In production systems by 2026, tool use is the architecture. The model is the controller in a system of tools, and most of the engineering work is in tool design.

Three principles that distinguish well-architected tool use from awkward tool use:

Tools should do one thing, with constrained inputs and outputs. A tool that takes a free-form text query and returns free-form text is a back-channel for prompt injection (covered in the prompt injection piece). A tool that takes a strict argument schema and returns a strict response schema is a clean interface.

Tool surface area should match the model's reasoning depth. A model that has access to 200 tools is a model that will sometimes pick the wrong tool. A model that has access to 8 tools, where 3 are context-dependent and only available when relevant, makes more reliable decisions. Tool routing should be done outside the model where possible.

Tool failures should be informative. When a tool returns an error, the model needs enough information to recover or escalate. Tools that return "Error: invalid input" are useless; tools that return "Error: parameter customer_id was 'ABC123' but expected an integer in the format 12345" allow the model to retry coherently.

The most common architectural anti-pattern in 2026 is teams discovering tool use, building tool-calling agents, and not realising that the agent's quality is now a function of tool design rather than model quality. Better tools, not better models, are usually the next investment.

The combined pattern most production systems converge on

After 18 months of operation, most production GenAI systems we audit have converged on a similar shape:

  • A foundation model, usually a frontier model from one of two or three vendors, swapped roughly twice a year as new generations ship.
  • A small fine-tuned adapter (often LoRA-scale) for a specific behaviour the base model does not deliver well, applied to perhaps 10–20% of queries where it matters.
  • A RAG layer with curated corpora, governed by content operations, with measured retrieval quality.
  • A tool surface of 5–20 tools per agent, with structured arguments and informative errors, often grouped by privilege tier.
  • A structured-output schema for any model output that drives downstream behaviour.
  • An evaluation harness that runs continuously against each component and the integrated system.

This is the operating shape, not the demo shape. Teams arriving at it tend to do so after a year or so of operation; teams designing for it from the start usually shave six months off the journey.

Where this connects to our practice

Pelican Tech's AI Solutions practice builds production GenAI systems with this combined pattern from the start, calibrated to the specific operating economics of the application. We work alongside our risk management team when the security implications of each pattern need to integrate with the broader programme, and with our identity practice when tool use crosses sensitive data access.

If you are building a new GenAI system or auditing one that has plateaued in quality, that is the engagement to start with before the next round of fine-tuning spend.