Generative AI: LLMs, Prompt Engineering, and Fine-Tuning
Pretraining, prompting, and fine-tuning solve different problems. Read how each one works, what it costs, and when you actually need it.
Three techniques get conflated because they all look like "making the model better at your task". They are not interchangeable, they cost very different amounts, and they fail in different ways. Pretraining creates the model's capability. Prompting steers it without changing its weights. Fine-tuning changes its weights — and, unless you need it for a specific reason, it is usually the most expensive answer to a problem that a better prompt would have solved.
Direct answer: Pretraining produces a general model from raw text. Prompting specifies the task in the input and requires no training at all. Fine-tuning trains on examples so the behaviour generalises to unseen inputs of the same kind.
Choose prompting first, because it is free and instant; fine-tune when the behaviour must be reliable across a large volume of inputs, the task is narrow enough to be learnable from examples, or the model's default behaviour is unacceptable for your domain; and expect a caveat that cuts across all three — a bigger model is not automatically a more obedient one.

Pretraining: what the model becomes
The base model is built by predicting text. That sounds trivial, and the scale of what it produces is the first surprise.
Brown et al. trained GPT-3, "an autoregressive language model with 175 billion parameters, 10x more than any previous non-sparse language model". Their finding is not that the model was large, but that scale changed what the model could do without being trained for it: scaling "greatly improves task-agnostic, few-shot performance, sometimes even reaching competitiveness with prior state-of-state-of-the-art fine-tuning approaches".
The comparison in their abstract is the one to hold onto. The dominant method before this was pretraining on a large corpus followed by fine-tuning on a specific task, and that method "still requires task-specific fine-tuning datasets of thousands or tens of thousands of examples". A few-shot model, by contrast, performs "a new language task from only a few examples or from simple instructions — something which current NLP systems still largely struggle to do".
So pretraining's contribution is a shift in the cost structure of adaptation. That shift is what made prompting a viable engineering practice rather than a demonstration trick.
Prompting: the cheap path, and its failure mode
Prompting specifies the task inside the input. It costs nothing to change, takes effect immediately, and requires no labels.
That makes it the first thing to try, and the correct default in most cases. But the failure mode is specific and worth naming: a prompt steers the model; it does not change what the model is likely to do by default. Where the base model's prior behaviour conflicts with what you need — a specific output format it does not naturally produce, a domain vocabulary it has not seen, a behaviour that must be consistent across thousands of calls — a prompt can sometimes be coaxed into it and sometimes cannot.
The diagnostic question is whether the inconsistency is random or systematic. If outputs vary run to run for the same input, the fix is usually the prompt's instruction, the output format, or a temperature change. If the failure is consistent — it always truncates, always ignores the schema, always answers the wrong question — that is a capability or alignment gap, and prompting alone will not close it.
Alignment: size does not produce obedience
The single most useful sentence in the instruction-tuning literature comes from Ouyang et al.: "Making language models bigger does not inherently make them better at following a user's intent." Their examples of what a bigger model still does are "untruthful, toxic, or simply not helpful to the user", and they name the condition directly: "these models are not aligned with their users".
Their method, InstructGPT, is worth describing because the sequence is what most teams skip. It starts with "a set of labeler-written prompts and prompts submitted through the OpenAI API", from which they "collect a dataset of labeler demonstrations of the desired model behavior" and "fine-tune GPT-3 using supervised learning". Then they "collect a dataset of rankings of model outputs, which we use to further fine-tune this supervised model using reinforcement learning from human feedback".
Note the ordering. Demonstrations first, then rankings, then reinforcement learning. The supervised stage teaches the shape of the desired behaviour and is cheap to produce; the ranking stage teaches the preference between outputs, and needs comparison rather than absolute judgement, which is a much cheaper thing to ask of a human. The result is that a 1.3B-parameter InstructGPT model was preferred by human raters over the 175B GPT-3, which is the clearest evidence in the literature that size and usefulness are separate axes.
A bigger base model can be harder to steer, needs more alignment work, and costs more per call.
Fine-tuning: when it is the right answer
Fine-tuning trains the model's weights on your examples. Hu et al. frame the problem it solves: as you pretrain larger models, "full fine-tuning, which retrains all model parameters, becomes less feasible", because using GPT-3 175B as an example, "deploying independent instances of fine-tuned models, each with 175B parameters, is prohibitively expensive".
Their method, LoRA, "freezes the pre-trained model weights and injects trainable rank decomposition matrices into each layer of the Transformer architecture, greatly reducing the number of trainable parameters for downstream tasks". The measured result is large: "Compared to GPT-3 175B fine-tuned with Adam, LoRA can reduce the number of trainable parameters by 10,000 times and the GPU memory requirement by 3 times", while "performs on-par or better than fine-tuning in model quality on RoBERTa" datasets.
That last clause matters more than the parameter count. Parameter-efficient fine-tuning is not a compromise on quality; it is a different allocation of the same budget, and in the reported comparisons it is at least as good. The practical benefit is operational: adapters are small enough to version, swap, and serve per customer, where a full checkpoint per customer is not.
The cost that does not disappear is the training data. Fine-tuning requires examples, and their quality determines the result. A thousand examples of the behaviour you want, in the format you want, is the real input.
Choosing, with the decision in the right order
- Start with prompting. It is free and instant, and a surprising share of "we need fine-tuning" requests are solved by a clearer instruction and a specified output format.
- Diagnose whether the failure is systematic. Random variation → prompt, sampling parameters, or retrieval. Consistent failure → capability gap, which fine-tuning may not fix either.
- Fine-tune when the behaviour must be reliable at volume, when the task is narrow and learnable from examples, or when the domain vocabulary is absent from the base model's priors.
- If you fine-tune, use a parameter-efficient method. LoRA's numbers say the full-checkpoint approach is a cost, not a requirement.
- Keep the base model's caveat in view. Ouyang et al. show that alignment is a separate training problem from scale, and a large model that is misaligned is a large, expensive, misaligned model.
- Re-evaluate the baseline honestly. Liu et al. found BERT "was significantly undertrained, and can match or exceed the performance of every model published after it", and they "raise questions about the source of recently reported improvements". Tune the simple option before you buy the complex one.
For how these models behave once they are in production, see Model Monitoring; for the limits that no amount of tuning removes, see The Limits of AI.
A worked example
The following is hypothetical and illustrative. A team wants generated records to follow a strict schema and first asks whether to fine-tune. Check one, start with prompting: following Brown et al., a few-shot instruction with an explicit output format is tried first, because scaling made task specification from a few examples viable and it costs nothing to change. Check two, diagnose the failure: outputs that vary run to run are treated as a prompt or temperature issue, while a schema that is always ignored is a systematic gap that prompting alone will not close, echoing the article's random-versus-systematic split and Ouyang et al.'s point that a larger model is not automatically more obedient. Check three, fine-tune efficiently if needed: with a narrow task and a thousand labelled examples, the team uses LoRA as Hu et al. describe, freezing base weights and training low-rank updates rather than deploying a full checkpoint per use. The bounded outcome is a reliable format on unseen inputs of the same kind, reached without paying for full fine-tuning; if the simple prompt already works, the fine-tuning cost is avoided.
A counterargument
A reasonable critic could argue that the article's "start with prompting" default understates what reliability actually costs. Prompt iteration is free per call but not free in engineering time, and the article itself concedes that when a failure is systematic - always ignoring the schema, always truncating - prompting alone will not close it. The clean split between prompting and fine-tuning also blurs on inspection: the alignment the article says is separate from scale comes from Ouyang et al.'s supervised and preference-based fine-tuning, so reliable behaviour often requires the very training the decision order defers.
A critic could add that LoRA's "on-par or better" result is reported on RoBERTa and GPT-3 comparisons, which may not transfer to a team's narrow task.
References & Further Reading
- Tom B. Brown et al., 2020. Language Models are Few-Shot Learners — The GPT-3 scaling study behind the decoder-only foundation-model family.
- Long Ouyang et al., 2022. Training language models to follow instructions with human feedback — The InstructGPT paper behind instruction tuning and RLHF-style post-training.
- Edward Hu et al., 2021. LoRA: Low-Rank Adaptation of Large Language Models — Freezing pretrained weights and training low-rank update matrices, reducing trainable parameters by orders of magnitude.
- Ashish Vaswani et al., 2017. Attention Is All You Need — The transformer architecture that the NLP and LLM sections build on.
- Yinhan Liu et al., 2019. RoBERTa: A Robustly Optimized BERT Pretraining Approach — Evidence that pretraining data and hyperparameters, not architecture changes, drove much of the BERT-era quality gain.