# Fine-tuning vs prompt engineering

Fine-tuning changes the model itself, and prompt engineering changes only what you send to it. Start with prompts. Fine-tune when prompts cannot reach the quality, cost or latency you need, or when you need a smaller model.

## How they differ

|  | Prompt engineering | Fine-tuning |
| --- | --- | --- |
| Changes | the instructions and examples in the prompt | the model's weights |
| Needs | a few examples and time to iterate | a dataset, GPUs and a test set |
| Time to try an idea | minutes | hours or more |
| Cost per call | every instruction and example is processed each time | a short prompt |
| Works on | any model, including hosted ones you cannot train | a model you can train |

## Which to pick

Start with prompts. They are cheap to change, and a good prompt is the baseline a fine-tune has to beat.

[Fine-tune](/glossary/what-is-fine-tuning) when:

- **Quality stalls.** The prompt keeps growing and the model still misses the format or the edge cases.
- **Cost or latency is too high.** A long prompt is processed on every call. A tuned model needs a short one.
- **You need a smaller model.** A small [open-weight model](/glossary/open-weight-models) tuned on one task can match a large general model on that task.

A fine-tuned model still takes a prompt. Train it with the prompt it will be served with.

If what is missing is knowledge, not behavior, try retrieval-augmented generation (RAG) first: see [fine-tuning vs RAG](/glossary/fine-tuning-vs-rag). A prompt also does not enforce anything: see [system prompt vs guardrails](/glossary/system-prompt-vs-guardrails).

## In Halo

A first test does not need a cluster. Halo's Qwen3 4B [LoRA](/glossary/lora) recipe runs on one GPU:

```bash
halo launch sft examples/sft/qwen3/qwen3-4b-ultrachat-lora.yaml
```

The [quickstart](/halo/docs/quickstart) walks through it.

