Prompt Engineering Fundamentals
Last reviewed
Correct answer: D. State a widely recognised format explicitly, and show that structure in the examples
Explanation
The principle — When output is consumed by a program rather than a person, the format is part of the requirement and has to be specified as tightly as the content.
Why the key is correct — Google's checklist says to avoid leaving the model to guess the structure of the output and instead to use a clear explicit instruction specifying the format while showing the output structure in your few-shot examples. The same checklist adds that where output must be machine-readable, you should use a widely recognised standard such as JSON, XML, Markdown or YAML that can be parsed by common libraries. Naming the standard and demonstrating it removes the discretion that is breaking the parser.
Why the others are wrong — A reformatting call pays twice for one job and inherits the same ambiguity. "Clean" and "structured" are subjective qualifiers of the kind the checklist tells you to replace. And putting the format only in the examples leaves the rule implicit for inputs that do not resemble them.
Remember this — Machine-read output needs a named standard in the instruction and the same standard in the examples.
Sources — Google Cloud, Overview of prompting strategies.
Sources
“When model outputs must be machine-readable or follow a specific format, use a widely recognized standard like JSON, XML, Markdown or YAML that can be parsed by common libraries.”
Practise 10 questions on this topic
Take Prompt Engineering Fundamentals — Timed Test 1 (10 questions) — scored instantly, explanation for every question, no login.