Alpaca-format examples carry three fields: name them
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
instruction, input, output. Instruction states the task, input supplies optional context, output is the gold response. Instruction plus input become the prompt; only output enters the loss.
Imagine a homework worksheet with three boxes for each question. Box one says what you have to do, like 'translate this sentence into French'. Box two holds the thing you are working on, like the English sentence itself, or it stays blank if the task is self-contained like 'write a poem about clouds'. Box three is the model answer the teacher will grade against. When the student trains, the teacher hands over box one and box two as the assignment and grades only box three. The Alpaca dataset shape works exactly like that, with the same three boxes per row. The middle box is the one that is sometimes empty.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
4 min: three field names + which are mandatory + with-input versus no-input templates + completion-only loss masking + how the shape relates to Self-Instruct, ChatML, and modern chat formats.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Treating input as a mandatory field. About 40 percent of Alpaca examples have an empty input because the instruction stands on its own.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.