LIVEยทThe trends shaping tomorrow's world.
AI

Fine-Tuning vs Prompt Engineering

Prompt engineering changes the instructions; fine-tuning changes the model. How each works, what OpenAI, Google and Anthropic advise, and a checklist.

Prompt engineering changes what you tell a model; fine-tuning changes the model itself. Start with prompting: it's faster to iterate and needs no training data, and the major model providers all document it as the first step [1][3][5]. Move to fine-tuning only when a measured gap remains, such as a format, tone or narrow task the model still gets wrong after careful prompting, and you have good examples to train on.

There's a third lever, retrieval, for when the model is missing facts rather than behavior. We cover that trade-off separately in RAG vs fine-tuning. This guide is about shaping how a model behaves.

Two levers on the same model

A large language model produces output from two inputs: the weights fixed during training and the text in its context window.

  • Prompt engineering works on the context window. You write instructions, add examples, supply reference material and structure the request. The weights don't change, and every request has to carry the guidance.
  • Fine-tuning works on the weights. You continue training a model on examples of the inputs and outputs you want, so the behavior is built in and doesn't need restating each time.

OpenAI's documentation captures how the two fit together: fine-tuning is meant to be used with prompt engineering, and one benefit is that it can shorten prompts and teach from more examples than fit in a context window [1].

What prompt engineering involves

Provider guides converge on a short list of techniques.

  • Be explicit. Anthropic suggests treating the model like "a brilliant but new employee who lacks context on your norms and workflows" [6].
  • Show examples. Google recommends "always" including few-shot examples, keeping their format consistent and not adding so many that the model overfits to them [4]. Anthropic suggests three to five examples [6].
  • Give context. Supply the reference material you want the answer drawn from, rather than relying on the model's general knowledge [4].
  • Structure the prompt. Anthropic recommends XML tags to separate instructions, context, examples and inputs [6].
  • Break big tasks apart. Chain prompts so one step's output feeds the next, or run parallel prompts and combine the results [4][6].
  • Iterate. "Prompt engineering is iterative," Google's guide says; rephrasing and reordering content can change results [4].

Anthropic adds a prerequisite that applies to both levers. Before tuning prompts, you need clear success criteria, a way to test against them, and a first draft [5]. It also notes that not every failure is a prompting problem; latency and cost, for instance, are sometimes better fixed by choosing a different model [5].

What fine-tuning involves

Fine-tuning needs a dataset of example inputs paired with desired outputs, a training run and an evaluation of the result. Providers offer several flavors:

  • Supervised fine-tuning (SFT). Train on examples of correct responses. OpenAI suggests it for classification, nuanced translation, output in a specific format and fixing instruction-following failures [1]. Google lists classification, sentiment analysis and entity extraction [3].
  • Preference tuning. Train on pairs of better and worse responses. OpenAI's version is direct preference optimization (DPO), suggested for summaries that focus on the right points and for getting the right tone [1]. Google describes preference tuning for "subjective human preferences, helpfulness, or conversational tone" [3].
  • Reinforcement learning fine-tuning. Score candidate answers with reward functions. Google positions it for multi-step reasoning and verifiable tasks such as code or SQL generation [3].
  • Vision fine-tuning. OpenAI offers training on image inputs for tasks such as image classification [1].

Under the hood, much fine-tuning no longer updates every weight. Parameter-efficient methods such as LoRA freeze the base model and train small add-on matrices; the LoRA paper reported 10,000 times fewer trainable parameters than full fine-tuning of GPT-3 175B [7]. Our explainer on LoRA and QLoRA covers how that works.

Side-by-side comparison


Prompt engineering

Fine-tuning

What changes

The input text

The model's weights (or an adapter)

What you need

A model, a test set, time to iterate

Labeled examples (Google suggests 100 or more), a training run, a test set [3]

Speed to try a change

Minutes

Hours or more per training run

Upfront cost

Low

Data preparation plus training compute

Per-request cost

Longer prompts mean more tokens

Can shorten prompts [1]; hosting a custom model may cost more

Best for

Most tasks, prototyping, changing requirements

Consistent format or tone, narrow repetitive tasks, behavior prompts can't reliably produce

Adds new facts?

Yes, if you put them in the prompt

Poorly; use retrieval instead (RAG vs fine-tuning)

When the base model updates

Re-test your prompts

Retrain or keep using the old base until it's retired

Vendor dependence

Prompts move between models with re-testing

Tied to a provider's tuning service or to open weights

What the providers recommend

The three major documentation sets agree on order of operations, if not on wording.

  • Google: "Start with prompting to find the optimal prompt. Then, move on to fine-tuning (if required)." Google says prompting suits limited labeled data and rapid prototyping, while tuning fits when you have a sizable dataset ("think 100 examples or more") or a complex task that advanced prompting can't handle. It adds that high-quality data matters more than quantity [3].
  • OpenAI: a repeating loop of writing evaluations, prompting, and, "for some use cases," fine-tuning, then evaluating again on representative data [1].
  • Anthropic: define success criteria and build empirical tests before prompt engineering [5]. Its evaluation guide favors more test questions with automated grading over a few hand-graded ones [9].

The research backs Google's point about data quality. In the QLoRA study, a 9,000-example dataset beat a 450,000-example one for chatbot performance [8].

A shifting vendor picture (as of November 2026)

Fine-tuning options depend on the platform, and they change.

  • OpenAI is winding down its self-serve fine-tuning platform. Organizations that had never run a fine-tuning job lost access on May 7, 2026. From July 2, 2026, organizations that hadn't run inference on a fine-tuned model in the previous 60 days also lost the ability to create training jobs. From December 15, 2026, no organization can create new self-serve jobs. Existing fine-tuned models keep serving until their base models are retired [1][2].
  • Google Vertex AI documents supervised, preference and reinforcement-learning tuning for Gemini models, including parameter-efficient adapter tuning [3].
  • Open-weight models can be fine-tuned on your own infrastructure with libraries such as Hugging Face PEFT. See open-source vs closed-source AI for what "open" covers.

The practical lesson: a fine-tune ties you to a platform's roadmap in a way a prompt doesn't.

Benefits and costs of each

Prompt engineering's strengths: no training data, near-instant iteration, and portability to newer models. Its weaknesses are long prompts that add tokens to every call, inconsistency on edge cases, and limits on how many examples fit.

Fine-tuning's strengths: behavior that holds across many requests without restating it, shorter prompts, and the ability to learn from more examples than any prompt can hold [1]. A smaller model fine-tuned for one narrow task may also be cheaper to run than a large general model.

Fine-tuning's costs and risks:

  • Data work. Collecting, cleaning and labeling examples is usually the biggest job.
  • Maintenance. New base models mean retraining and re-evaluating.
  • Over-narrowing. A model trained hard on one task can get worse at things you didn't test. Keep a broad evaluation set.
  • Data exposure. Fine-tuned models can memorize training examples. Keep secrets and personal data out of training sets; see our guide to AI data privacy and security.
  • False confidence. The QLoRA authors found that strong MMLU scores didn't imply strong chatbot performance [8]. Measure against your own task; see AI benchmarking and model evaluation.

How to decide

Work through these questions in order.

  1. Do you have success criteria and a test set? If not, build them first. Neither lever can be judged without them [5][9].
  2. Is the problem missing facts? Use retrieval, not fine-tuning (what is RAG?).
  3. Have you tried a well-structured prompt with examples? Clear instructions, three to five examples and structured inputs fix many failures [4][6].
  4. Would a different model fix it? For latency, cost or raw capability, switching models can beat both levers [5].
  5. Does a gap remain on a consistent, repeatable behavior? Format, tone, classification labels and domain-specific output styles are fine-tuning's home ground [1][3].
  6. Do you have enough good examples? Google's rule of thumb is 100 or more; quality matters more than volume [3][8].
  7. Can you maintain it? Budget for retraining when base models change, and check the platform's fine-tuning roadmap first [2].

If you answer yes to 5, 6 and 7, fine-tune, and keep prompting too. The two work together.

Frequently asked questions

Is prompt engineering enough for most applications?

For many, yes. All three major providers document prompting as the first step and treat fine-tuning as optional [1][3][5]. Combined with retrieval for facts, prompting covers a large share of business use cases.

How much data do I need to fine-tune?

Google's Vertex AI documentation suggests thinking in terms of 100 examples or more, and stresses that well-labeled data matters more than volume [3]. The QLoRA study found a 9,000-example dataset beat a 450,000-example one on chatbot quality [8].

Does fine-tuning make a model more accurate about facts?

Not reliably. Fine-tuning is better at teaching behavior than injecting knowledge, and facts baked into weights go stale. For accuracy on changing or private information, use retrieval and see what are AI hallucinations? for why models invent details.

Is fine-tuning cheaper than long prompts?

It can be at high volume, because a tuned model may need shorter prompts [1]. But you pay upfront for data and training, and possibly more to host a custom model. Compare total cost at your expected request volume.

Can I still fine-tune OpenAI models?

As of November 2026, only organizations that are still active users of the service (OpenAI cut off organizations with no recent fine-tuned model inference on July 2, 2026), and only until December 15, 2026, when new self-serve fine-tuning jobs stop for everyone. Existing fine-tuned models keep working until their base models are retired [2].

Sources

  1. OpenAI. "Model optimization." https://developers.openai.com/api/docs/guides/model-optimization
  2. OpenAI. "Deprecations" (self-serve fine-tuning timeline). https://developers.openai.com/api/docs/deprecations
  3. Google Cloud. "Introduction to tuning" (Vertex AI). https://docs.cloud.google.com/vertex-ai/generative-ai/docs/models/tune-models
  4. Google. "Prompt design strategies" (Gemini API). https://aistudio.google.com/docs/prompting-strategies
  5. Anthropic. "Prompt engineering overview." https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/overview
  6. Anthropic. "Prompting best practices." https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices
  7. Hu, E. et al. "LoRA: Low-Rank Adaptation of Large Language Models." arXiv:2106.09685, 2021. https://arxiv.org/abs/2106.09685
  8. Dettmers, T. et al. "QLoRA: Efficient Finetuning of Quantized LLMs." arXiv:2305.14314, 2023. https://arxiv.org/abs/2305.14314
  9. Anthropic. "Define success criteria and build evaluations." https://platform.claude.com/docs/en/test-and-evaluate/develop-tests