Loading...
{
"messages": [
{"role": "user", "content": "Refund order 123"},
{"role": "assistant", "content": "Sure, done!"}
]
}{
"messages": [
{"role": "system", "content": "You are the shop support agent. Reply in JSON."},
{"role": "user", "content": "Refund order 123"},
{"role": "assistant", "content": "{\"action\": \"refund\", \"orderId\": \"123\"}"}
]
}The training example uses the same system prompt and output format as production, so the model learns the real task.
Use RAG to give a model facts that change or must be cited. Use fine-tuning to change style, format or behavior on a narrow task.
Often hundreds to a few thousand high-quality examples are enough for a narrow task. Quality and consistency matter more than volume.
LoRA is a parameter-efficient fine-tuning method that trains small extra matrices instead of all weights, which cuts memory and cost.