An instruction-tuned model learns from text, and the text is produced by a template. If the template does not mark where the answer starts and ends, or if a few examples are malformed, the model learns the wrong habits: it runs on after the answer, or answers with nothing.
You will compare templates, write the formatter, and write the checks that find bad examples before training.