prompting · fine-tuning · model customisation

Prompt Engineering vs Fine-Tuning: Which Approach Fits Your Use Case?

Once you've picked a model, the next question is how to get it to behave the way you need — follow a format, adopt a tone, specialise in a domain. Two approaches dominate: changing what you ask the model (prompt engineering), or changing the model itself (fine-tuning). They solve overlapping problems in very different ways, with very different costs.

What Prompt Engineering Is

Prompt engineering means carefully crafting the instructions, examples, and context you give a model at the moment you use it — no retraining involved. This covers everything from writing a clear system instruction, to providing a few worked examples directly in the prompt (known as few-shot prompting), to asking the model to reason step by step before answering.

Its biggest advantage is speed: you can test a new instruction and see results in seconds, iterate freely, and apply the same technique across any model that accepts text input — no infrastructure required.

What Fine-Tuning Is

Fine-tuning takes a pre-trained model and continues training it on a smaller, task-specific dataset, adjusting its internal parameters so the new behaviour becomes "baked in" rather than something you have to ask for each time. A support team might fine-tune a model on thousands of past ticket resolutions so it replies in the company's voice and references internal terminology without being told to every time.

This requires a labelled dataset, compute to run the training job, and ongoing maintenance — if your product or policies change, the fine-tuned model may need retraining to stay accurate.

Cost and Complexity Trade-offs

  • Prompt engineering — low cost, fast iteration, no training infrastructure, but prompts can get long and brittle, and you're limited by what a single pass of context can hold.
  • Fine-tuning — higher upfront cost (data preparation, compute, evaluation), but produces consistent behaviour without repeating lengthy instructions, and can reduce the amount of context needed per request.

Fine-tuning generally only pays off once a task is well-defined, high-volume, and stable enough that retraining won't be needed every few weeks.

The Middle Ground: Retrieval

A third option, retrieval-augmented generation (RAG), sits between the two. Instead of retraining the model or cramming everything into the prompt, relevant documents are fetched from a database at request time and inserted into the context automatically. This keeps the model's underlying weights untouched while still giving it access to specific, current, or proprietary information — useful when the underlying facts change often, which fine-tuning handles poorly.

Choosing an Approach

  1. Start with prompting. It's the cheapest experiment and often solves the problem outright.
  2. Add retrieval if the model needs access to specific documents, current data, or a knowledge base too large to fit in a prompt.
  3. Consider fine-tuning only once you have a clear, repeatable task, a labelled dataset, and prompting plus retrieval still fall short on consistency or cost per request.

Risks to Keep in Mind

Fine-tuning on sensitive or proprietary data means that data effectively lives inside the model — review who can access the resulting model carefully. Prompt-based approaches keep your data out of the model's weights but can leak context if prompts (including any embedded examples) are logged or shared insecurely. Either approach still inherits the base model's general limitations, including the possibility of confidently incorrect answers described in our guide to how LLMs work.

Sources

  1. Prompt engineering — Wikipedia
  2. Fine-tuning (deep learning) — Wikipedia