The Complete Decision Framework for LLM Customization -- When to Use Each, When to Combine, and When to Walk Away
Choosing the Right LLM Customization Strategy -- A Practitioner's Guide
When organizations decide to customize a large language model for their specific use case, they face a critical decision: prompt engineering, retrieval-augmented generation (RAG), or fine-tuning? These are not competing technologies -- they are complementary tools that solve different problems at different cost points. This guide provides a complete decision framework, real cost numbers, code examples, and practical guidance for choosing the right approach (or combination) for your use case. The uncomfortable truth: most teams that reach for fine-tuning should be using RAG or prompt engineering instead.
Before diving into each approach in detail, here is the executive summary. These three methods exist on a spectrum of cost, effort, and capability. They are not mutually exclusive -- the most sophisticated production systems combine all three.
| Dimension | Prompt Engineering | RAG | Fine-Tuning |
|---|---|---|---|
| What it changes | Input text sent to the model | Context provided to the model at inference time | Model weights (internal parameters) |
| Primary use case | Task instructions, few-shot examples, output formatting | Grounding in proprietary/current knowledge | Behavior, tone, style, format adaptation |
| Time to implement | Minutes to hours | Days to weeks | Weeks to months |
| Cost per query | Low (input tokens cost money) | Medium (retrieval + input tokens) | Lowest at inference (shorter prompts) |
| Upfront cost | ~$0 | $500 - $5,000 (infra setup) | $50 - $50,000 (GPU + data prep) |
| Knowledge updates | Update the prompt text | Update the document store (instant) | Re-train the model (expensive) |
| Expertise required | Basic prompt writing | Intermediate (embeddings, vector DBs, retrieval) | Advanced (ML engineering, data curation) |
| Hallucination risk | High (no grounding) | Low (grounded in retrieved docs) | Medium (knowledge is baked in, not retrieved) |
| When to choose | Default. Always start here. | You need factual, updatable knowledge | You need behavioral/style change at scale |
Prompt engineering is the practice of designing the input text (the "prompt") sent to a language model to produce the desired output. It is the lightest-weight customization method: you change nothing about the model itself. You only change what you feed it. Despite the hype around fine-tuning and RAG, prompt engineering remains the single most impactful and cost-effective technique for improving LLM output quality.
Modern models -- especially GPT-4, Claude 3.5, and Llama 3 at 70B+ -- are remarkably capable at following instructions. A well-crafted prompt can produce behavior that many teams mistakenly assume requires fine-tuning: consistent formatting, specific tones, multi-step reasoning, and even domain-specific responses when paired with context.
Prompt engineering alone is the right answer when:
Prompt engineering has real limits. Knowing them is essential for deciding when to escalate:
Here is a production-grade system prompt for a customer support assistant. Note the structure: role, constraints, output format, and explicit guardrails. This prompt alone, on GPT-4 or Claude 3.5, will outperform most fine-tuned smaller models:
This prompt is approximately 350 tokens. On GPT-4o at $5/M input tokens, processing 100,000 conversations/month costs $175/month in input token costs for the system prompt. That is trivially cheap. There is no fine-tuning cost, no GPU cost, no data labeling cost. This is why prompt engineering is the default.
Retrieval-Augmented Generation (RAG) is an architecture that combines a language model with an external knowledge store. Instead of relying solely on the knowledge baked into the model during pre-training, RAG retrieves relevant documents from a database at query time and inserts them into the model's context window. The model then generates its answer grounded in those retrieved documents.
RAG solves the fundamental limitation of LLMs: their knowledge is frozen at training time. A model trained in 2024 cannot answer questions about events in 2026. A model trained on public data cannot answer questions about your company's internal HR policies. RAG bridges this gap by externalizing knowledge -- the model becomes a reasoning engine that reads from your document store, not a static encyclopedia.
A production RAG system has five distinct components. Each is a potential point of failure and a potential point of optimization:
| Component | What It Does | Common Choices |
|---|---|---|
| 1. Document Store | Stores your knowledge base (PDFs, docs, wikis, databases) | PostgreSQL + pgvector, Pinecone, Weaviate, Qdrant, Milvus, Chroma |
| 2. Embedding Model | Converts text into vector representations (embeddings) for semantic search | OpenAI text-embedding-3-small/large, BGE-large, E5-large-v2, Nomic Embed, Cohere embed-v3 |
| 3. Retrieval System | Finds the most relevant documents for a given query using vector similarity | Cosine similarity search, hybrid (keyword + vector), BM25 + vector fusion, re-ranking with Cohere Rerank or bge-reranker |
| 4. Prompt Assembly | Combines retrieved documents with the user query into a model-ready prompt | Template with context block, system instructions, and guardrails |
| 5. Generation Model | Reads the assembled prompt and generates an answer | GPT-4o, Claude 3.5 Sonnet, Llama 3 70B (local), Mistral Large, Gemini 1.5 Pro |
Here is what happens when a user asks "What is our company's remote work policy?" to a RAG system:
RAG is not a silver bullet. It has its own limitations:
The most overlooked aspect of RAG is chunking -- how you split documents into retrievable pieces. Bad chunking destroys RAG quality. Good chunking makes it shine:
Fine-tuning is the process of continuing the training of a pre-trained language model on a smaller, task-specific dataset. Unlike prompt engineering (which changes the input) or RAG (which changes the context), fine-tuning changes the model's internal weights. The model learns from your data and its behavior shifts as a result.
Fine-tuning is powerful but expensive, time-consuming, and often unnecessary. The key insight: fine-tuning is for behavior, not for knowledge. If you want the model to know things, use RAG. If you want the model to behave differently -- to always respond in a specific format, to adopt a particular tone, to follow complex instructions without lengthy prompts -- fine-tuning is the right tool.
Not all fine-tuning is created equal. The three main approaches differ dramatically in cost, hardware requirements, and use cases:
| Type | What It Does | VRAM Needed (7B model) | Cost (cloud GPU) | Best For |
|---|---|---|---|---|
| Full Fine-Tuning | Updates all model weights. The model is permanently modified. | 80-120 GB (2x A100 80GB or 4x A6000) | $200-$2,000 per run | Research, maximum quality, when you have the budget |
| LoRA (Low-Rank Adaptation) | Trains small adapter matrices on top of frozen weights. Original model is unchanged; adapter is merged or loaded separately. | 16-24 GB (1x A6000 or RTX 4090) | $20-$100 per run | Most production fine-tuning. Style, format, tone adaptation. |
| QLoRA (Quantized LoRA) | Same as LoRA but base model is 4-bit quantized during training. Dramatically reduces VRAM. | 6-10 GB (RTX 3090/4090 or free Colab) | $5-$30 per run | Budget fine-tuning, consumer GPUs, experimentation |
Full fine-tuning updates every parameter in the model. For a 7B parameter model, that means computing gradients for 7 billion weights on every training step. This requires enormous VRAM -- not just for the weights themselves, but for optimizer states (Adam keeps 2 additional copies), gradients, and activations. A 7B model in FP16 needs 14GB for weights, 14GB for gradients, 28GB for Adam optimizer states, and 10-20GB for activations. Total: 66-76GB minimum.
Full fine-tuning produces the highest quality results because the model has maximum flexibility to adapt. However, it also has the highest risk of catastrophic forgetting -- the model can lose capabilities it had before fine-tuning. For a 70B model, full fine-tuning requires multi-GPU setups (8x A100 80GB) and costs thousands of dollars per run. For most production use cases, LoRA achieves 95%+ of the quality at 5% of the cost.
LoRA is the most important advance in practical fine-tuning since the transformer architecture itself. The key insight: when fine-tuning a model for a specific task, the weight changes (the "delta") have low intrinsic rank. Instead of updating the full weight matrix W, LoRA adds a low-rank decomposition: W + ΔW = W + B×A, where A and B are small matrices (rank r, typically 8-64).
For a 4096×4096 weight matrix, full fine-tuning updates 16.7M parameters. LoRA with rank 16 updates only 2 × 4096 × 16 = 131K parameters -- a 128x reduction. The base model weights stay frozen. Only the small A and B matrices are trained. After training, the adapter (A × B) can be saved as a small file (10-100MB) and merged into the base model or loaded dynamically.
QLoRA, introduced by Dettmers et al. in 2023, is LoRA with a twist: the base model is quantized to 4-bit (NF4 -- NormalFloat 4) during training. This reduces the memory needed for the frozen base model from 14GB (FP16) to 3.5GB (4-bit) for a 7B model. Combined with the small LoRA adapter memory, a 7B model can be fine-tuned in 6-10GB of VRAM -- a single consumer GPU or even Google Colab's free tier.
QLoRA democratized fine-tuning. Before QLoRA, fine-tuning a 7B model required $10,000+ GPUs. After QLoRA, anyone with an RTX 3090 or a $10/month Colab subscription can fine-tune. The quality is slightly below full LoRA (due to 4-bit quantization noise), but the difference is small enough that QLoRA is the default recommendation for most practitioners.
Fine-tuning is the right choice only when you have clear evidence that prompt engineering and RAG are insufficient. The valid use cases are narrower than most people think:
This is the decision matrix we use with clients. It compares all three approaches across the dimensions that matter for production decisions: cost, time, expertise, maintenance, and use case fit.
| Dimension | Prompt Engineering | RAG | Fine-Tuning |
|---|---|---|---|
| Upfront Cost | $0 | $500 - $5,000 (infra, embeddings, dev time) | $50 - $50,000 (GPU, data labeling, ML eng time) |
| Ongoing Cost (per 1M queries) | $5-$50 (API token costs) | $10-$100 (API + vector DB + embeddings) | $2-$30 (shorter prompts, but hosting/model cost) |
| Time to First Result | 10 minutes | 1-3 days | 1-4 weeks (data prep + training + eval) |
| Time to Iterate | Minutes (change prompt, retest) | Hours (update docs, re-index) | Days to weeks (retrain, re-evaluate) |
| Expertise Needed | Basic -- anyone can write prompts | Intermediate -- embeddings, vector DBs, Python | Advanced -- ML engineering, data curation, eval |
| Maintenance Burden | Low -- update prompt text | Medium -- keep docs updated, monitor retrieval quality | High -- retrain when base model updates or data drifts |
| Knowledge Freshness | Static (only what's in the prompt) | Real-time (update docs anytime) | Static (frozen at training time) |
| Hallucination Risk | High -- no grounding | Low -- grounded in retrieved docs | Medium -- baked-in knowledge, no source citation |
| Source Citation | No | Yes -- can cite retrieved documents | No -- knowledge is in weights, not citable |
| Output Format Consistency | Medium (95% with good prompts) | Medium (depends on prompt, not retrieval) | High (99%+ with sufficient training data) |
| Style/Tone Consistency | Medium (role prompts help but drift) | Medium (same as prompt engineering) | High (style is baked into weights) |
| Scalability of Knowledge | Limited by context window | Millions of documents | Limited by training data and model capacity |
| Best Use Case | General tasks, formatting, reasoning | Q&A over proprietary knowledge, docs | Style/format adaptation, cost reduction at scale |
| Worst Use Case | Answering from a 10,000-doc knowledge base | Teaching a new writing style or format | Injecting frequently-updated knowledge |
Use this sequential decision process for any new LLM application:
The most effective production LLM systems combine multiple approaches. The three methods solve different problems, so they compose naturally. Here are the proven hybrid patterns:
This is the most common production pattern. RAG handles knowledge retrieval; prompt engineering handles task instructions, output formatting, and guardrails. The system prompt defines behavior ("You are a technical support assistant. Answer based on the provided documents. If the answer is not in the documents, say you don't know."). RAG retrieves and injects relevant documents. The model follows the prompt instructions using the retrieved context.
Fine-tune the model for behavior (format, tone, domain fluency), then use RAG for knowledge retrieval at inference time. The fine-tuned model is better at following instructions and producing the right output format; RAG ensures it has the right information. This is the pattern used by enterprise systems that need both consistent behavior and current knowledge.
Fine-tune the model to improve instruction following and format consistency, then use prompt engineering for task-specific instructions at inference time. This pattern is used when a base model is not reliable enough at following complex instructions, but the task itself varies enough that you still need flexible prompting.
The full stack: fine-tune for domain behavior, RAG for knowledge, prompt engineering for task-specific instructions. This is what the most sophisticated enterprise systems do. It is also the most expensive and complex to build and maintain.
| Hybrid Pattern | Behavior Source | Knowledge Source | Typical Cost | When to Use |
|---|---|---|---|---|
| Prompt + RAG | Prompt instructions | RAG retrieval | Low-Medium | Most common. Knowledge-heavy, behavior-simple. |
| Fine-Tune + RAG | Fine-tuned weights | RAG retrieval | High | Need consistent format AND current knowledge. |
| Prompt + Fine-Tune | Fine-tuned + prompt | Model's pre-training | Medium | Need better instruction following, no external docs. |
| All Three | Fine-tuned + prompt | RAG retrieval | Very High | Enterprise scale, maximum quality required. |
Costs are the deciding factor for most organizations. Here are real-world cost breakdowns as of mid-2026, using current API pricing and GPU rental rates. All numbers are for a 7B parameter model and 100,000 queries/month as a reference workload.
| Model | Input Cost (per 1M tokens) | Output Cost (per 1M tokens) | Cost per Query (avg 500 in, 200 out) | Monthly Cost (100K queries) |
|---|---|---|---|---|
| GPT-4o | $5.00 | $15.00 | $0.0055 | $550 |
| GPT-4o-mini | $0.15 | $0.60 | $0.0002 | $20 |
| Claude 3.5 Sonnet | $3.00 | $15.00 | $0.0045 | $450 |
| Claude 3 Haiku | $0.25 | $1.25 | $0.0004 | $40 |
| Llama 3 70B (via Groq) | $0.59 | $0.79 | $0.0005 | $50 |
| Google Gemini 1.5 Flash | $0.075 | $0.30 | $0.0001 | $10 |
Note: These are base generation costs. For RAG, add the cost of embedding the query (negligible -- $0.0001 per query) and any vector database hosting fees ($20-$200/month for most managed services). For fine-tuned models hosted on your own GPU, see the next section.
| GPU | VRAM | Rental Cost (per hour) | What It Can Fine-Tune | Typical Training Time (7B, LoRA) | Cost per Training Run |
|---|---|---|---|---|---|
| RTX 4090 (local) | 24 GB | ~$0.40 (electricity + depreciation) | 7B LoRA, 7B QLoRA | 3-8 hours | $1.20 - $3.20 |
| A6000 (rental) | 48 GB | $0.80-$1.50 | 7B LoRA, 13B QLoRA | 2-6 hours | $1.60 - $9.00 |
| A100 80GB (rental) | 80 GB | $2.00-$4.00 | 7B full FT, 70B QLoRA | 2-5 hours | $4.00 - $20.00 |
| H100 80GB (rental) | 80 GB | $3.00-$8.00 | 7B full FT, 70B LoRA | 1-3 hours | $3.00 - $24.00 |
| 8x A100 80GB (rental) | 640 GB | $16-$32 | 70B full FT | 4-12 hours | $64 - $384 |
| Google Colab Free (T4) | 16 GB | $0 | 7B QLoRA (barely) | 6-12 hours | $0 |
| Google Colab Pro (A100) | 40-80 GB | $10/month subscription | 7B LoRA, 13B QLoRA | 3-8 hours | ~$1-3 (subscription fraction) |
If you fine-tune a model, you need to host it. This is the hidden cost that many teams overlook:
| Hosting Option | Model Size | Monthly Cost (24/7) | Throughput | Cost per 100K Queries |
|---|---|---|---|---|
| RTX 4090 (local/self-hosted) | 7B (Q4) | ~$100 (electricity) | ~50-100 queries/min | ~$100 |
| RunPod A6000 rental | 7B (FP16) or 13B (Q4) | ~$580-$1,080 | ~100-200 queries/min | ~$580-$1,080 |
| vLLM on A100 (cloud) | 7B-13B (FP16) | ~$1,440-$2,880 | ~200-500 queries/min | ~$1,440-$2,880 |
| Ollama (local, any GPU) | 7B (Q4) | $0 (own hardware) | ~20-80 queries/min | $0 (sunk cost) |
For a system processing 100,000 queries/month over 12 months, here is the total cost of ownership for each approach:
| Approach | Setup Cost | Monthly Operating Cost | 12-Month Total | Notes |
|---|---|---|---|---|
| Prompt Engineering (GPT-4o-mini) | $0 | $20 | $240 | Cheapest. Just API calls. |
| Prompt Engineering (GPT-4o) | $0 | $550 | $6,600 | Premium quality. Still no setup cost. |
| RAG (GPT-4o-mini + Pinecone) | $1,000-$3,000 (dev time) | $80-$150 | $2,000-$4,800 | Vector DB + embeddings + API. Grounded answers. |
| RAG (GPT-4o + Pinecone) | $1,000-$3,000 | $610-$710 | $8,300-$11,500 | Premium quality + knowledge grounding. |
| Fine-Tuned (LoRA, self-hosted) | $2,000-$10,000 (data prep + ML eng) | $100-$1,500 (hosting) | $3,200-$28,000 | High setup, variable hosting. Best at very high volume. |
| Fine-Tuned + RAG (self-hosted) | $5,000-$20,000 | $200-$2,000 | $7,400-$44,000 | Maximum quality and control. Enterprise scale. |
Cost is not just money -- it is also engineering time. Here is the time investment for each approach:
| Phase | Prompt Engineering | RAG | Fine-Tuning |
|---|---|---|---|
| Initial build | 2-8 hours | 1-3 days | 1-2 weeks (data prep) + 1-3 days (training) |
| Evaluation setup | 2-4 hours | 1-2 days | 3-5 days (need eval set for training + testing) |
| Iteration cycle | 10-30 minutes | 1-4 hours | 1-3 days (retrain + re-eval) |
| Monthly maintenance | 1-2 hours | 4-8 hours (doc updates, retrieval monitoring) | 8-20 hours (model updates, eval, monitoring) |
| Time to production | 1-3 days | 1-2 weeks | 4-8 weeks |
The LLM customization space is full of myths. These misconceptions cause organizations to waste money, time, and engineering effort on the wrong solutions. Here are the most damaging ones:
Reality: Fine-tuning is better for a narrow set of problems (behavior, style, format). For knowledge injection, RAG is structurally superior. For general tasks, prompt engineering on a capable model is often indistinguishable from fine-tuning in quality, at a fraction of the cost. In published benchmarks, RAG outperforms fine-tuning on knowledge tasks by 20-40%, while fine-tuning outperforms RAG on format/style tasks by 5-15%.
The "fine-tuning is always better" myth persists because it feels more sophisticated. Training a custom model sounds more impressive than writing a good prompt. But sophistication is in the results, not the method. A well-prompted GPT-4o will outperform a fine-tuned 7B model on almost any task, at lower cost.
Reality: RAG is not search. Search returns documents. RAG returns answers. The critical difference is the generation step: RAG uses an LLM to read retrieved documents, synthesize information across multiple sources, and generate a coherent answer in natural language. Traditional search (even semantic search) returns a ranked list of documents and leaves the synthesis to the user.
Additionally, RAG includes components that pure search does not: query transformation (rewriting user queries for better retrieval), re-ranking (using cross-encoders to improve precision), chunking strategies (splitting documents for optimal retrieval), and citation/grounding (ensuring answers are traceable to sources). Calling RAG "search with an LLM on top" is technically true but massively understates the engineering complexity.
Reality: Modern foundation models (GPT-4o, Claude 3.5, Llama 3 70B) are already trained on vast amounts of domain-specific data -- medical literature, legal cases, code, financial reports. For most domain tasks, a well-crafted prompt (with domain-specific instructions and few-shot examples) performs comparably to a fine-tuned model. Fine-tuning becomes necessary only when the domain is so specialized that the model's pre-training data is insufficient (e.g., proprietary internal systems, highly niche technical domains).
Test this yourself: before fine-tuning, try your domain task with GPT-4o and a detailed domain-specific prompt. If the output quality is acceptable, you do not need to fine-tune.
Reality: Fine-tuning can actually increase hallucinations if the training data contains errors or if the model overfits to patterns that do not generalize. The only reliable way to reduce hallucinations is grounding -- providing the model with source material at inference time and instructing it to use only that material. That is what RAG does. Fine-tuning changes behavior; RAG provides grounding. If hallucination reduction is your goal, RAG (not fine-tuning) is the answer.
Reality: RAG is only as good as its retrieval system. If the retrieval system cannot find the right documents, the model will hallucinate or say "I don't know" even when the answer exists in your knowledge base. A RAG system with poor chunking, a weak embedding model, or no re-ranking will perform worse than a good prompt engineering setup. RAG is not a magic wand -- it is a pipeline that must be engineered and tuned.
Reality: Production prompt engineering involves systematic testing, A/B comparison, edge case handling, and iteration. It is closer to software engineering than creative writing. Advanced techniques include chain-of-thought, self-consistency (sampling multiple responses and majority-voting), tree-of-thought, and prompt chaining (decomposing tasks into multi-step pipelines). A well-engineered prompt system is a production asset that should be version-controlled, tested, and monitored.
Reality: For LoRA/QLoRA fine-tuning, 500-5,000 high-quality examples are often sufficient. Quality matters far more than quantity. 1,000 carefully curated, properly formatted examples will outperform 50,000 noisy, inconsistent ones. The key is having examples that clearly demonstrate the behavior you want. For instruction-tuning (the most common fine-tuning type), the format is typically: instruction, input (optional), output.
Reality: A fine-tuned 7B model requires GPU hosting, which costs $100-$2,800/month depending on the setup. A hosted API model (GPT-4o-mini) costs $20/month for 100K queries. The fine-tuned model is only cheaper when query volume is high enough to offset the hosting cost. For most small-to-medium applications, hosted APIs are cheaper even at equivalent quality. Calculate the break-even point before committing to self-hosting.
Here are practical, runnable examples for each approach. These are designed to be starting points -- copy them, modify them, and test them.
Ollama lets you run LLMs locally. Here is prompt engineering with a system prompt and few-shot examples using the Ollama CLI and API:
Here is a minimal RAG implementation using OpenAI's embeddings API and a simple in-memory vector store. No framework needed for a prototype:
For a pure shell-based RAG prototype (useful for testing and CI/CD):
Unsloth is 2x faster than HuggingFace transformers for LoRA training and uses less memory. This is the recommended way to fine-tune in 2026:
Axolotl is a CLI-based training tool that uses YAML configs. Simpler for repeatable training runs:
For when you need maximum quality and have the GPU budget. This requires 2x A100 80GB or equivalent for a 7B model:
After fine-tuning and converting to GGUF, you can serve the model locally with Ollama:
This section is deliberately prominent because the most common mistake in LLM customization is fine-tuning when you should not. Here are the scenarios where fine-tuning is the wrong answer:
| Scenario | Why Fine-Tuning Is Wrong | What to Do Instead |
|---|---|---|
| Injecting knowledge | Knowledge in weights is frozen. Updates require retraining. No source citation. | RAG -- update documents, not weights. |
| Frequently changing data | Model is outdated the moment training finishes. Constant retraining is impractical. | RAG with a live document store. |
| Low query volume (<10K/month) | Training + hosting cost far exceeds API costs. No ROI. | Prompt engineering with hosted API. |
| No evaluation framework | You cannot measure improvement. You will ship a model you cannot verify. | Do not fine-tune. Build eval set first. |
| Fewer than 500 training examples | Insufficient data for meaningful behavioral change. Model will overfit or not learn. | Prompt engineering with few-shot examples. |
| Task is well-handled by base model | If GPT-4o + good prompt already works, fine-tuning adds cost without benefit. | Keep using prompt engineering. |
| Need for explainability/citations | Fine-tuned models cannot cite sources. Knowledge is baked in, not traceable. | RAG -- cite retrieved documents. |
| Team lacks ML expertise | Fine-tuning without ML knowledge produces worse models, not better ones. | Prompt engineering or RAG (easier to build and maintain). |
| Need to switch models frequently | Fine-tuning locks you to one base model. Switching means retraining. | Prompt engineering -- model-agnostic. RAG -- also model-agnostic. |
| Privacy/compliance (usually) | Enterprise API contracts (zero-retention, DPA) usually suffice. Self-hosting is rarely legally required. | Contractual API with zero-retention. Only self-host if legally mandated. |
| Prototyping/POC | Fine-tuning iteration takes days. Prototyping needs minutes. | Prompt engineering. Fine-tune only after POC validates the approach. |
If you have decided to fine-tune, your data is the single most important factor. Bad data produces a bad model, no matter how good your training setup is. Here is what you need:
| Fine-Tuning Type | Minimum Viable | Recommended | Diminishing Returns | Notes |
|---|---|---|---|---|
| Instruction tuning (LoRA) | 100 examples | 500-5,000 examples | 10,000+ examples | Quality > quantity. 1,000 excellent examples beat 10,000 mediocre ones. |
| Instruction tuning (QLoRA) | 100 examples | 500-3,000 examples | 5,000+ examples | Slightly less data needed due to 4-bit noise tolerance. |
| Full fine-tuning | 1,000 examples | 5,000-50,000 examples | 100,000+ examples | Full FT can absorb more data. Risk of catastrophic forgetting increases. |
| Domain adaptation (continued pretraining) | 10,000 tokens | 1M-100M tokens | 500M+ tokens | Raw domain text. For learning domain language, not specific tasks. |
| Style/tone adaptation | 200 examples | 1,000-5,000 examples | 10,000+ examples | Examples should span diverse topics in the target style. |
| Format/structured output | 200 examples | 500-2,000 examples | 5,000+ examples | Include edge cases and variations. Consistency is critical. |
Data quality is more important than data quantity. Five quality dimensions matter:
The most common format for instruction tuning is JSONL (JSON Lines), with each line being one training example. Here are the standard formats:
Without evaluation, you cannot know if fine-tuning helped or hurt. This is the most commonly skipped step and the most damaging omission:
Source: Avondale.AI Technical Documentation Library
Category: Core AI Concepts
Type: Technical Reference Guide
License: CC BY 4.0
Suggested Citation:
Fine-Tuning vs RAG vs Prompt Engineering: The Complete Decision Framework. Avondale.AI Technical Documentation Library. Accessed June 2026. https://avondale.ai/technical/fine-tuning-vs-rag.html