DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk6 min

LLM Fine-Tuning: SFT, LoRA, QLoRA, RAG, and Prompting Explained

Prompting, RAG, and fine-tuning solve different problems. Learn how SFT, LoRA, and QLoRA fit together and how to choose based on your data, evaluation results, and constraints.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

These are not five mutually exclusive choices. Prompting changes what you ask a frozen model; retrieval-augmented generation (RAG) supplies retrieved context at inference time; supervised fine-tuning (SFT) trains the model on examples. LoRA and QLoRA are parameter-efficient ways to adapt a model, often as part of SFT. Start with prompting, add RAG when answers need outside information, and consider fine-tuning when evaluation shows that instructions alone do not produce reliable behavior.

What changes with each approach?

The useful distinction is whether you are changing the input, adding external information, or training model parameters. The right choice depends on the task and its constraints—not on a universal ranking of methods.

As an Amazon Associate I earn from qualifying purchases.

Approach What changes When to investigate it Key trade-offs to evaluate
Prompting Instructions or examples in the input; the base model stays frozen. The task is clear enough to describe, and you need a quick baseline. Prompt stability, context limits, evaluation results, and sensitivity to model versions. Prompting behavior can vary between snapshots; see OpenAI’s backward-compatibility documentation.
RAG Retrieved external information is added to the model’s input when it generates an answer. Answers need to draw on a corpus or information that changes independently of model weights. Retrieval relevance, freshness, traceability, context length, and system complexity. The original RAG paper describes combining retrieved non-parametric information with the model’s parametric knowledge: Lewis et al., 2020.
SFT Model weights are trained on examples to adapt behavior. You need task behavior, formatting, or response patterns that prompting does not reliably produce. Training-data quality, measured gains, compute, maintenance, and whether the base model has the capability the task requires.
LoRA Trainable low-rank adapter matrices are added while pretrained weights are frozen. You want parameter-efficient adaptation and an adapter-based way to manage model variants. Adapter quality, target modules and rank, memory, portability, and serving setup. See the Hugging Face PEFT LoRA documentation.
QLoRA LoRA-style adapters are trained with a quantized base model. Memory constraints make ordinary fine-tuning impractical, provided the model and tooling are compatible. Quantization, GPU memory, training stability, evaluation quality, and compatibility. See the QLoRA paper.

Choose based on the problem you need to solve

Use prompting as the first baseline

Write the task instructions and representative examples, then test the prompt against examples of real inputs—including difficult or ambiguous cases. This lets you learn whether the base model can do the task without setting up a training workflow. For a repeatable comparison, record the prompt and model version, and use an evaluation set rather than judging a few outputs by impression. OpenAI recommends pinned model versions and evals for consistency because behavior may change between snapshots; that advice is specific to its API documentation, not a guarantee that every provider offers the same controls.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Add RAG when the answer depends on an external corpus

RAG is worth investigating when the model needs information that is not reliably available in its weights, such as a changing document collection. It does not make retrieval quality automatic: relevant, current source material has to be found and included in the context. Evaluate whether retrieval returns the right material and whether the resulting answer uses it appropriately. If traceability matters, assess that explicitly in your application; the method alone does not guarantee a correct or well-supported answer.

#1 Best Overall
Sale
Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems
  • Use scikit-learn to track an example ML project end to end
  • Explore several models, including support vector machines, decision trees, random forests, and ensemble methods
  • Exploit unsupervised learning techniques such as dimensionality reduction, clustering, and anomaly detection
  • Dive into neural net architectures, including convolutional nets, recurrent nets, generative adversarial networks, autoencoders, diffusion models, and transformers
  • Use TensorFlow and Keras to build and train neural nets for computer vision, natural language processing, generative models, and deep reinforcement learning

Consider SFT when the target is behavior, not just access to facts

SFT trains on examples to encourage more consistent task execution, response structure, or style. It is a candidate when repeated prompt changes still fail your evaluations. Training examples need to represent the behavior you want: fine-tuning cannot be assumed to repair missing capability, poor data, or an unsuitable task design. Compare the trained model with the prompting baseline on the same held-out cases and account for the ongoing work of maintaining training data and model versions.

LoRA and QLoRA: two ways to make adaptation more efficient

LoRA trains adapters instead of updating all base weights

With LoRA, the pretrained weights are frozen and small low-rank matrices are trained. This reduces the number of parameters being updated and supports adapter-based model management. It is a training technique, not a separate objective: for example, an SFT workflow can use LoRA to adapt a model from examples.

QLoRA adds a quantized base model to the adapter workflow

QLoRA combines adapter training with a quantized base model to reduce memory demand. Reduced memory does not mean identical output quality or training behavior across tasks, models, and configurations. Check compatibility among the chosen model, quantization tooling, target modules, dependencies, and hardware, then validate results on the task’s evaluation set.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The QLoRA authors reported fine-tuning more than 1,000 models and analyzing instruction following and chatbot performance across eight instruction datasets, multiple model types, and scales. Those figures describe the scope of their 2023 study, not a head-to-head result proving QLoRA is best for every application. Read the paper for its methods and findings.

These methods can be combined

Prompting, retrieval, and fine-tuning operate at different points in a system, so a real application may use more than one. For instance, a model adapted with SFT using LoRA can still receive retrieved context and task instructions at inference time. Whether that combination improves results is an empirical question: compare it with simpler alternatives using the same inputs and evaluation criteria.

Hugging Face TRL documents PEFT integration with its trainers, including SFT workflows using LoRA or QLoRA. Its documentation describes PEFT as training a small number of additional parameters while keeping the base model frozen. QLoRA examples depend on quantization tooling such as bitsandbytes; confirm current dependency versions and model-specific requirements in the TRL PEFT integration guide rather than assuming a tutorial command works unchanged with every setup.

A practical way to make the decision

  1. Define the failure you are trying to fix. Separate missing or stale information from inconsistent task behavior. The former points toward investigating retrieval; the latter may be addressable through better prompting or SFT.
  2. Build a representative evaluation set. Include ordinary inputs and the edge cases that matter. Decide how you will score answer quality, format adherence, freshness or citation needs, and failure severity before comparing approaches.
  3. Test the simplest baseline. Try prompting with the base model and record the prompt, model version where available, and results.
  4. Add complexity only for a demonstrated reason. If the missing ingredient is corpus information, test retrieval and inspect what gets retrieved. If behavior remains inconsistent, evaluate SFT against the baseline.
  5. Choose the adaptation technique separately. If SFT is justified, assess LoRA when adapter-based parameter-efficient training fits your workflow; assess QLoRA if memory is a binding constraint and the model, quantization setup, and hardware are compatible.
  6. Compare the deployed system, not just a training run. Include quality, data and compute requirements, latency or serving constraints relevant to your application, implementation complexity, and maintenance burden. No single method wins for every task.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Check provider and library availability before committing

Availability is provider-specific and can change. OpenAI’s pricing page, checked on October 4, 2026, says its fine-tuning platform is winding down, is no longer accessible to new users, and remains available for training jobs to existing users for the coming months. Check the current pricing and platform notice for your account before designing around that workflow; this notice does not establish the availability of open-source PEFT tooling. The OpenAI API reference describes JSONL training data for the API workflow it documents, but that reference does not mean every account can currently create fine-tuning jobs: see the fine-tuning API reference and confirm access directly.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a provider-neutral decision, keep the question narrow: which method meets your measured quality requirements with acceptable data, compute, deployment, and maintenance costs? The answer depends on your application, model, corpus, and constraints; the approaches above provide a way to test that rather than presume it.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.