AI Engineering · Decision Matrices
Compare Concepts Side-by-Side
Resolve common architectural trade-offs before writing glue code or picking an agent pattern.
Prompt Engineering vs. RAG vs. Fine-Tuning
How to choose the right customization lever for knowledge, behavior, and cost.
| Dimension | Prompt Engineering | RAG | Fine-Tuning |
|---|---|---|---|
| Primary Superpower | Shapes instructions, output format, tone, and step-by-step reasoning. | Injects fresh, private, verifiable external knowledge at query time. | Teaches specialized syntax, style, or latency-optimized behavior in weights. |
| Data Freshness | Static until you redeploy the prompt template. | Real-time: updates immediately as your index or DB updates. | Stale snapshot frozen at training dataset cutoff. |
| Engineering Analogy | Config & spec flags passed at runtime. | Read-only database lookup joined into the request. | Compiling a custom specialized binary / model weights. |
| Setup Cost & Effort | Minutes to hours; zero infrastructure. | Days; requires chunking, embeddings, hybrid search & evals. | Weeks; requires curated dataset, training runs & drift evals. |
| Hallucination & Citations | Relies solely on parametric memory; cannot cite private docs. | Strong grounding with explicit source [chunk_id] citations. | Still hallucinates facts; best paired with RAG if facts matter. |
| Order of Operations | Step 1: Start here for every project. | Step 2: Add when proprietary/live facts are needed. | Step 3: Do last for speed, cost, or strict formatting wins. |