Format consistency keeps few-shot examples structurally uniform so the model has a clear pattern to extend. Matching field names is not enough: corresponding values should also have the same shape. section 7.3.2
For a classification prompt:
- Keep the input and output fields consistent across reference examples. section 7.3.2
- Use the same shape for classification values; do not mix bare labels with labels followed by explanations. section 7.3.2
Code review classification
In an inconsistent prompt, one reference ends with “Classification: BugRisk” while another gives “Classification: Performance” followed by explanatory prose. In a consistent version, both references provide only the classification label. The target asks for a classification in that same format. section 7.3.2
Test the effect by building paired prompts for the same engineering classification task: one with mixed formatting and one with repeated formatting. Compare their output structures. section 7.3.5
