Zero-shot, few-shot or fine-tuned: accuracy on the same task
Few-shot vs fine-tuning: how accuracy, prompt length and cost change as examples move from the prompt into the model weights, with our exam numbers.
Updated
Few-shot and fine-tuning both teach a model a task from worked examples, but they store the examples in different places. Few-shot prompting sends the examples with every call, so you pay for them each time; fine-tuning trains them into an open-weight model once, so each call sends only the input. For one high-volume, stable task, the trained route usually costs less per call, and a fine-tuned model can beat a frontier model on that task, but only if you test both on your own data.
What zero-shot, few-shot and fine-tuned mean
Zero-shot means one instruction and no examples. Few-shot means the instruction plus a handful of worked examples inside the prompt. The model picks up the pattern from the prompt, and its weights do not change. That is in-context learning.
Fine-tuned means you train an open-weight model on labelled examples from your task, so the pattern lives in the weights. The examples do not need to ship with each request.
Zero-shot vs fine-tuned accuracy: what our exam showed
The exam used CUAD, a public dataset of 510 commercial contracts with answers marked by lawyers. The task was to find 10 kinds of passage and quote each one exactly. Scores are the share of exactly-right quotes, where 1.0 is perfect. Every document was scored by a model that never saw it in training, using 5-fold cross-validation.
| Model | Exam score | Price per 1,000 documents |
|---|---|---|
| Own Weights, Accuracy tier (fine-tuned) | 0.717 | $4.50 |
| Own Weights, Standard tier (fine-tuned) | 0.650 | $3.54 |
| Claude Opus (zero-shot) | 0.635 | $154.49 |
| Claude Haiku (zero-shot) | 0.584 | $4.95 |
Claude took the exam with one prompt, no examples and no task training. Our models were fine-tuned for this exam. Our Accuracy tier led Opus by 0.082 and Haiku by 0.133, and both margins are larger than the margin of error. It was ahead of both in all 5 groups of 102 documents.
This shows what training for one task does. It is not a legal product or legal advice, and it does not mean our model beats Claude at everything. The exam gave Claude one prompt with no examples, so it does not measure a few-shot score. Full results are on the benchmark page.
Does few-shot prompting scale?
Few-shot prompting gets more expensive as volume grows, because the prompt grows with it. Every example is input tokens, sent and billed on every request. Longer prompts also take longer to process before the first output token, and they use up the context window your documents need.
Example choice matters more than example count. A set that covers only easy cases will not teach the model the hard ones. Retrieving examples per call helps coverage, but it adds a retrieval step with its own failure modes.
Few-shot works well at low volume and on tasks that change often. It becomes expensive for a fixed task that runs millions of times.
How many examples in a prompt before fine-tuning is better?
There is no fixed number, and any number we gave would be made up. Work it out from your own figures. Here is a hypothetical with round numbers. A prompt with 20 examples of about 500 tokens each adds 10,000 input tokens to every call. At Claude Opus’s list price of $4 per million input tokens, those examples cost $0.04 per call, or $40 per 1,000 calls. At Claude Haiku’s list price of $0.10 per million input tokens, the same examples cost $0.001 per call, or $1 per 1,000 calls. Your numbers will differ.
Two questions decide it. First, does the prompt version still miss your accuracy target after you have chosen good examples? Second, does the saving on example tokens, across your real call volume, cover a training run and the work of serving the model? If both answers are yes, fine-tuning is the better path. If the task changes often or the volume is small, stay with prompts.
Few-shot prompting vs fine-tuning: which is better?
Neither wins on every task. Few-shot is faster to try. It needs a handful of examples, no training run, and you change the behavior by editing text.
Fine-tuning needs a labelled dataset, a test set you trust, and a training run. Then the model has to be served. In return, the behavior sits in the weights, the prompt stays short, and the cost per call drops.
Fine-tuning is the wrong choice when the task changes every week, when you do not have labelled data, or when one model has to handle many unrelated jobs. Pricing from OpenAI, Google and other vendors changes often, so check their current pricing pages before you run the numbers.
Start with prompts, then test the switch
Use a few-shot prompt as the baseline. Build a test set from your own records, and score the prompt against it before you train anything. Train only when that baseline misses your target. The guides on building a test set and how much data you need cover the two inputs that decide the result. For the prompt-only side, see fine-tuning vs prompt engineering.
If you want to see where your own task falls, run the free AI cost audit on your code. It lists your AI calls, the models they use and their estimated cost, so you can see which calls are the best candidates. Or book a call and we will go through your numbers together.
Questions
Is a fine-tuned model more accurate than a zero-shot prompt?
Often, on one narrow task with good training data. In our exam, a fine-tuned open-weight model beat a zero-shot frontier model on the same contracts. That is one exam on one task, so run your own test before you assume the same result.
Does few-shot prompting scale to high volume?
Each example is paid for again on every call, so cost rises with the size of the prompt. Quality tends to rise with the first few examples and then flatten, and the point where it flattens depends on the task. Past that point, extra examples mostly add cost.
How many examples in a prompt before fine-tuning is better?
There is no fixed count. Compare the extra input cost of the examples across your real call volume with the one-time cost of training. If the prompt version still misses your accuracy target on your own test set, training is the better path.
Which is better, few-shot prompting or fine-tuning?
Few-shot prompting is cheaper to start and easy to change, so it suits a new or shifting task. Fine-tuning suits a stable task that runs at high volume with the same behavior on every call. Test both on the same data before you pick one.
What is in-context learning, and how does it differ from fine-tuning?
In-context learning means the model adapts to a task from examples or instructions inside the prompt, with no change to its weights. Few-shot prompting is the common form. Fine-tuning changes the weights, so the behavior stays even after the examples are gone from the prompt.