When to prompt, use RAG, or fine-tune
Pick the cheapest tool that solves the failure mode
Fine-tuning teaches a model style, format, routing, and compact domain reasoning — NOT fresh facts that change every day. Use RAG for changing facts, prompting for flexible tasks, and fine-tuning for high-volume repeatable skills.
Run this decision helper to check which lever fits your project constraints.
Example
def pick_strategy(facts_change_daily: bool, monthly_calls: int, strict_local_privacy: bool) -> str:
if facts_change_daily:
return 'RAG (Knowledge) — keep facts outside model weights'
if strict_local_privacy or monthly_calls >= 500_000:
return 'Fine-tune small open model (praisonai-train) + serve via Ollama'
return 'Start with prompting + output_pydantic + Judge eval'
print('Policy Q&A:', pick_strategy(True, 100_000, False))
print('Ticket router:', pick_strategy(False, 1_000_000, True))
print('Prototype:', pick_strategy(False, 5_000, False))Example explained
- facts_change_daily — Never fine-tune changing knowledge (prices, docs, inventory) into weights — use RAG.
- monthly_calls >= 500_000 — High-volume, narrow tasks (classification, extraction, routing) deliver huge ROI from a fine-tuned 3B–8B model.
Establish a baseline score before training
Never start a training run without first measuring your current prompted model on a held-out test set. Without a baseline accuracy and latency number, you cannot prove fine-tuning helped.
Example
# Check available open models and their VRAM footprints
praisonai train catalog modelsExample explained
- praisonai train catalog models — Helps you pick a 3B–8B base model that fits your target GPU or Apple Silicon RAM.
Common pitfall: fine-tuning to fix a bad prompt
If a frontier model cannot pass your task with clear instructions and 3 few-shot examples, your task definition or labels are ambiguous — fix the rubric before generating thousands of noisy training rows.
Reference: documentation