PM-301c · Module 1
Format Specification in Prompts
5 min read
Natural language format specification covers cases where API-level schema enforcement is unavailable or insufficient. The specification must be explicit, complete, and unambiguous. Partial specifications produce partially compliant outputs.
- State Exact Count Constraints Not "a few items" — "exactly 3 items." Not "some recommendations" — "between 2 and 4 recommendations, each under 20 words." Vague quantity words ("few," "several," "some") are interpreted differently on every request. Exact numbers are not.
- Name Every Required Field Not "return the relevant information" — "return these fields: title, summary, confidence_score, source." If a field is required, name it. If a field is optional, mark it optional with the condition. Fields you do not name will be omitted or invented at the model's discretion.
- Specify Data Types "confidence_score: a number between 0 and 1" is more precise than "confidence_score: how confident you are." "date: in YYYY-MM-DD format" prevents the model from choosing between "March 2," "Mar 2," "2026-03-02," and "2/3/26" based on its own preferences.
- Define the Absence Behavior When a required field has no value, what should the output contain? "null," "N/A," "Unknown," or omit the field? Every field needs a defined absence behavior. Undefined absence behavior produces inconsistent nulls, empty strings, and field omissions that break downstream parsers.
# WEAK
Return a JSON object with the lead's information.
# PRECISE
Return a JSON object with exactly these fields:
{
"name": string — the lead's full name,
"company": string — the company name, or null if not provided,
"email": string — email address in standard format, or null if not provided,
"score": number — lead quality score from 0 to 100 (integer),
"signals": array of strings — up to 5 qualifying signals observed in the conversation,
"next_action": string — one of: "call", "email", "disqualify", "nurture",
"disqualify_reason": string — required if next_action is "disqualify", otherwise null
}
Do not include any fields not listed above.
Do not include any prose before or after the JSON object.
If a required string field has no value, use null — do not use empty string "".