5 exercises — fine-tuning vs. RAG, LoRA and QLoRA, PEFT, instruction tuning vs. RLHF, and why dataset curation matters.
0 / 5 completed
1 / 5
A team debates: "Should we fine-tune a model on our support tickets, or just use RAG with our knowledge base?" How would you explain the fundamental difference between what fine-tuning and RAG each accomplish?
This behaviour-versus-knowledge distinction is the single most important framing for choosing between fine-tuning and RAG (they're also often combined).
Good fine-tuning use cases: teaching a consistent response format (always structured JSON with specific fields), adapting tone/style to match a brand voice, teaching a specialised skill (like classifying support tickets into specific categories used only by your company) — patterns that should apply consistently across many different inputs.
Good RAG use cases: answering questions about frequently-updated documentation, referencing a large body of facts too large to encode via fine-tuning, providing traceable/citable sources for an answer (harder to achieve with fine-tuning, since it's unclear which specific training example produced a given output) — especially when the underlying knowledge changes often, since fine-tuning would require expensive retraining for every update, while RAG's knowledge source is just a database that can be updated directly.
2 / 5
A research paper mentions "using LoRA instead of full fine-tuning to reduce the cost of adapting the model." What is LoRA, and how does it reduce cost compared to full fine-tuning?
LoRA is the most widely adopted technique in the broader category of PEFT (Parameter-Efficient Fine-Tuning) methods, which all share the goal of adapting a large pretrained model to a new task or domain without the full cost of updating every one of its (often billions of) parameters.
How it works, at a high level: instead of directly modifying the original weight matrices, LoRA inserts small trainable "low-rank" matrices alongside them. During training, only these small matrices are updated; the original model weights stay completely frozen. At inference time, the LoRA matrices' contribution is added to the frozen weights' output.
Why this matters practically: a full fine-tune might require storing a complete new copy of a multi-gigabyte model for every task-specific variant, and require substantial GPU memory during training to hold gradients for every parameter. A LoRA adapter, by contrast, might be just megabytes in size (only the small added matrices), can be trained on much more modest hardware, and multiple LoRA adapters can even be swapped in and out against the same frozen base model — making it practical to maintain many specialised variants without the storage and compute cost multiplying with each one.
3 / 5
A follow-up discussion mentions "QLoRA," described as "LoRA combined with quantisation, letting us fine-tune a 70B parameter model on a single GPU." How does QLoRA achieve this, building on what LoRA already does?
QLoRA demonstrates a common and valuable pattern in ML engineering: combining two separately useful techniques (quantisation for memory reduction, LoRA for parameter-efficient training) to achieve something neither could accomplish alone at the same scale.
The insight: in standard LoRA, the frozen base model still needs to be loaded in memory at reasonably high precision, which for very large models (tens of billions of parameters) still requires substantial, often multi-GPU, hardware, even though the trainable portion is small. QLoRA additionally quantises the frozen base model to a much lower precision (commonly 4-bit) before loading it, drastically cutting the memory footprint of the largest component (the frozen weights), while keeping the small trainable LoRA matrices at higher precision to preserve training quality.
Practical significance: this combination was specifically notable for making it feasible to fine-tune very large open-weight models (tens of billions of parameters) on a single consumer or prosumer-grade GPU, rather than requiring an expensive multi-GPU cluster — significantly lowering the barrier to custom model fine-tuning for smaller teams.
4 / 5
A fine-tuning project plan includes a step called "instruction tuning" before mentioning a separate later step called "RLHF/preference tuning." What's the difference between these two stages, and why are they typically sequential?
This distinguishes two commonly conflated stages of what's sometimes loosely called "fine-tuning," each solving a different problem in turning a raw pretrained model into a helpful, well-behaved assistant.
Instruction tuning (or supervised fine-tuning, SFT) — trains on a dataset of (instruction, good response) pairs, teaching the model the basic behaviour pattern of following a request rather than just predicting statistically likely next words (a raw pretrained model might continue a question with more questions, rather than actually answering it).
RLHF / preference tuning — builds on an already instruction-tuned model, using comparisons (human raters, or increasingly AI raters, judging "which of these two responses is better") to further shape the model's behaviour along dimensions that are hard to specify as simple training examples — like appropriate tone, avoiding harmful content, or being appropriately concise versus thorough.
Why sequential: preference tuning works by nudging an already-competent model's behaviour in a preferred direction; it's far less effective (and less stable) as a way to teach a model basic instruction-following from scratch, which is why instruction tuning typically establishes that foundation first.
5 / 5
A team preparing a fine-tuning dataset discusses "curating high-quality examples and removing near-duplicates" before training. Why does dataset curation matter as much as (or more than) the fine-tuning technique used?
Dataset quality is frequently the single highest-leverage factor in a fine-tuning project's success, often mattering more than the specific technique (LoRA vs. QLoRA vs. full fine-tuning) or even the amount of compute used.
Why curation matters so directly: fine-tuning works by adjusting the model to better match the patterns in its training examples. If those examples contain inconsistent formatting, factual errors, or repetitive near-duplicate content, the model will learn — and reproduce — those same issues, since it has no independent way to distinguish "correct" patterns from "what's in this training set" during the fine-tuning process itself.
Near-duplicate removal specifically matters because heavily over-represented examples (many near-identical variations of the same scenario) can cause the model to overfit narrowly to that pattern, at the expense of broader generalisation to the diversity of real-world inputs it will actually encounter after deployment.
Common industry finding, often cited in fine-tuning discussions: a smaller (hundreds to low thousands), carefully curated, diverse, high-quality dataset frequently outperforms a much larger but noisier dataset — this is why "data curation" is now treated as a distinct, valuable engineering discipline within ML teams, not a trivial preprocessing afterthought.
What will I practice in "Fine-Tuning Vocabulary — AI Prompting English Exercise"?
This is an AI Prompting exercise set. It walks through 5 scenario-based multiple-choice questions built around real usage of AI Prompting terminology that IT professionals encounter on the job.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is free to complete with no account, sign-up, or paywall.
How many questions are in this exercise?
This set contains 5 questions. Each one shows immediate feedback and a detailed explanation after you answer, so you learn the correct usage right away rather than waiting for a final score.
Do I need prior experience to complete this exercise?
No prior experience is required. Each question includes a full explanation covering the reasoning behind the correct answer, so the exercise itself teaches the AI Prompting vocabulary as you go.
Can I retry the exercise if I get questions wrong?
Yes — use the "Try again" button on the results screen to reset your answers and go through all the questions again. There is no limit on attempts.
Is my progress saved?
Your answers and score for the current session are tracked in the browser as you go. No account or login is needed, and there is nothing to install.
What if I don't understand a term used in a question?
Read the explanation shown after you answer each question — it breaks down the correct term in plain English with a real-world example. You can also check the site Glossary for quick definitions.
How is this different from reading a blog article on the topic?
Exercises like this one are interactive drills that test and reinforce specific vocabulary through multiple-choice questions, while blog articles explain concepts in prose. Practising here after reading builds active recall, not just passive recognition.
Where can I find more AI Prompting exercises?
See the AI Prompting exercises hub for the full set of related pages, or browse all exercise categories from the main Exercises index.
Can I use this exercise to prepare for a technical interview?
Yes — AI Prompting vocabulary comes up often in technical discussions and interviews. Pair this exercise with our dedicated Interview Preparation section for role-specific practice.