Choosing the right architecture for the actual use case
Three paths lead to a Claude-based system that should show specific knowledge or a specific behavior: plain prompting, retrieval augmented generation, and fine-tuning. In practice, these three approaches get mixed up constantly, and that confusion is expensive: applying fine-tuning to a problem that actually needs frequently changing knowledge means paying for recurring training runs to solve a structural problem a retrieval pipeline solves in a few days. This article lays out clear decision criteria.
Table of Contents
- 1. Three approaches, one common misconception
- 2. Plain prompting: when it is enough
- 3. RAG: when the underlying knowledge changes often
- 4. Fine-tuning: when behavior or style should change, not knowledge
- 5. The classic mistake: fine-tuning for current knowledge
- 6. Cost comparison over the system lifetime
- 7. Hybrid approaches: combining RAG and fine-tuning
- 8. Working through the decision process with Claude
- 9. Recognizing and planning migration between approaches
- 10. Summary
- 11. FAQ
1. Three approaches, one common misconception
Prompting, RAG, and fine-tuning solve different problems, and that distinction is exactly what gets overlooked in architecture discussions. Prompting changes how Claude approaches a task within the current context window, without adding external knowledge or persistent behavior. RAG extends the context window at runtime with externally retrieved information. Fine-tuning changes the model's own weights and, with them, its baseline response behavior, independent of the specific prompt used.
The confusion usually arises because all three approaches end up addressing the same visible symptom: the model should know or do something it does not show by default. The real question is not how do I teach Claude something, but does the underlying knowledge change, or does the desired behavior change. That distinction drives cost, maintenance effort, and freshness over months, not just the first implementation.
2. Plain prompting: when it is enough
Plain prompting is the right choice when the required information already fits into the context window and the task is one-off or infrequent. One example: a developer has Claude refactor an 800-line file, supplies coding conventions as a system prompt, and gets a response tailored exactly to that single use case. There is no recurring need, no growing knowledge corpus, and no requirement to keep behavior consistent across many sessions.
The common mistake here is assuming a larger context window makes RAG obsolete by default. That only holds for bounded, clearly scoped data. Once a knowledge corpus grows, changes several times a day, or spans multiple sources, the context window becomes the bottleneck: every request loads unnecessary irrelevant tokens, latency increases, and cost per request grows linearly with the size of the embedded knowledge.
Prompt example for plain prompting (one-off, clearly scoped task):
System: You are a senior PHP developer. Follow PSR-12 and use
constructor property promotion.
User: Refactor the following class, extract the validation logic
into its own method, and add PHPDoc blocks.
<800 lines of code follow>
-> No external knowledge source needed, no recurring demand.
Prompting is fully sufficient.
3. RAG: when the underlying knowledge changes often
RAG is the right choice when the knowledge base is larger than a single context window or changes on a regular basis, for example product data, internal documentation, support tickets, or legal text. Instead of anchoring knowledge permanently inside the model, the pipeline retrieves the relevant documents at runtime and passes them to Claude as context. When a document changes, the change takes effect immediately, with no training run required.
Claude is well suited to helping shape the retrieval strategy itself: which metadata fields should drive filtering, how should the result list be weighted by relevance and recency, and what system prompt wording keeps the model from inventing information when no good match is found. These questions can be worked through with Claude before a single line of infrastructure code exists.
Prompt to Claude to clarify the retrieval strategy upfront:
We are building a support knowledge system with 40,000 tickets,
about 200 new ones arrive daily. Design a retrieval strategy:
- Which metadata (product, date, resolution status) should be
filtered before the vector search runs?
- How do we prevent stale, closed tickets with outdated solutions
from being ranked too highly?
- Which system prompt wording most reliably reduces hallucination
when no good match is found?
4. Fine-tuning: when behavior or style should change, not knowledge
Fine-tuning changes how a model responds, not primarily what it knows. It makes sense when a consistent output style is needed across thousands of requests, for example a fixed JSON format without repeated few-shot examples in every call, a brand-specific tone in customer communication, or reliable application of a domain-specific classification logic that plain instructions cannot enforce robustly enough.
The crucial difference from RAG: fine-tuning data is a snapshot. The model learns patterns from examples, not a current state of facts. When a new feature ships or a price list changes, no amount of fine-tuning helps, because the learned patterns still reflect the state at training time. That exact confusion causes one of the most expensive architecture mistakes in production AI systems.
5. The classic mistake: fine-tuning for current knowledge
In practice, the same misjudgment shows up again and again: a team notices Claude answers an internal product question incorrectly, and the first instinct is let's train the model on our data. The result is a fine-tuning run that is expensive, takes weeks, and ultimately delivers a model that is already outdated the day after release, as soon as a single product detail changes.
In nearly all of these cases, the real problem was not a behavior problem but a missing knowledge access path. A RAG system with a well-maintained document pipeline would have reached the same result in a fraction of the time, would have stayed current automatically with every product change, and would not have required another training run. The rule of thumb: if factual content changes more often than the desired response behavior, RAG is almost always the cheaper, more robust solution.
6. Cost comparison over the system lifetime
Prompting carries no upfront cost but ongoing token cost that grows with the amount of context embedded per request. RAG requires an upfront infrastructure investment in the embedding pipeline and vector database, after which operating cost stays roughly proportional to request volume and retrieved context size, regardless of how much the underlying data grows.
Fine-tuning carries the highest upfront cost through training runs and data preparation, plus recurring cost for every re-tuning once requirements change. Measured over a twelve to twenty-four month system lifetime, RAG is cheaper in the vast majority of knowledge-intensive use cases, because training cost disappears entirely and updates require no new training run.
7. Hybrid approaches: combining RAG and fine-tuning
In more complex systems, the approaches are not mutually exclusive. A common pattern: fine-tuning for a consistent output style and a domain-specific classification logic, combined with RAG for the factual grounding. The model learns via fine-tuning how to phrase structured support answers, while the concrete facts are freshly retrieved from the knowledge base on every request.
Combining RAG with deliberate prompting is also common: RAG supplies the context, a carefully worded system prompt governs how the model handles conflicting or incomplete retrieval results. This combination covers most production use cases without a single fine-tuning run, while staying considerably easier to maintain than a trained model.
8. Working through the decision process with Claude
Before the first architecture decision is made, it is worth using Claude itself as a sounding board for the analysis. A precisely worded prompt that describes the use case, how often the data changes, and the budget frequently yields a solid first assessment of which approach or combination fits best, including the open questions that still need to be resolved internally.
The key is not to ask Claude for a blanket recommendation, but for the concrete decision criteria that apply to the specific case. Questions like how often does the data foundation change, how critical is absolute freshness, and how high is the daily request volume together yield a far more reliable picture than a generic question about RAG versus fine-tuning.
Prompt template for the architecture decision:
Use case: [short description]
Frequency of knowledge base changes: [daily / weekly / rarely]
Request volume: [requests per day]
Budget scope: [one-time vs. ongoing]
Criticality of freshness: [high / medium / low]
Question: Which approach (prompting, RAG, fine-tuning, combination)
fits best, and which two or three risks should I clarify before
implementation?
9. Recognizing and planning migration between approaches
Systems evolve, and an approach that was correct at the start can hit its limits after a year. A typical signal for migrating from prompting to RAG: context size per request keeps growing because more and more reference material is being pasted in manually, and maintaining the prompt templates becomes increasingly unwieldy.
A signal for adding fine-tuning on top of RAG is when, despite correct retrieval, the output format stays inconsistent, for example because complex formatting rules can no longer be enforced reliably through few-shot examples in the prompt. Recognizing these signals early avoids an expensive rebuild and lets the existing pipeline be extended step by step instead of replaced entirely.
| Criterion | Prompting | RAG | Fine-Tuning |
|---|---|---|---|
| Effort for new knowledge | Adjust prompt manually | Ingest document into index | New training run required |
| Typical upfront cost | None | Medium (infrastructure) | High (training, data) |
| Freshness | As current as the prompt | Immediate after indexing | State at training time |
| Best suited for | One-off, clearly scoped tasks | Large, changing knowledge corpus | Consistent style, fixed formats |
| Latency per request | Low | Medium (retrieval step) | Low |
| Maintenance over time | Grows with context size | Continuous but predictable | Recurring on every adjustment |
Mironsoft
AI-assisted development, agent workflows, and team processes
Using Claude or other AI tools on the team, but without a clear workflow?
We set up AI-assisted development workflows for teams, from CLAUDE.md conventions to subagent strategies to code review processes that combine human oversight with AI speed.
Workflow Setup
Cleanly set up CLAUDE.md, project conventions, and tool permissions for the team.
Agent Strategy
Build subagent and automation workflows for recurring development tasks.
Team Onboarding
Train developers in productive, safe use of AI coding assistants.
10. Summary
RAG, Fine-Tuning, and Prompting: The Essentials
Prompting
Right for one-off, clearly scoped tasks with no recurring knowledge need.
RAG
Right when the knowledge base changes often or exceeds the context window.
Fine-Tuning
Right for consistent behavior and fixed style, not for current factual knowledge.
Rule of thumb
If content changes more often than the desired behavior, RAG is almost always right.