Home / All prompts / Meta-Prompting / Enforce a strict output format

Enforce a strict output format

Output strictly in this format with no extra text: {{format definition, such as a JSON schema or column names}}.

Copy this prompt

Output strictly in this format with no extra text: {{format definition, such as a JSON schema or column names}}. Rules: (1) output only the structured data, no preamble like 'here is'; (2) use null for missing fields, never invent; (3) respect data types exactly — numbers unquoted, booleans as true/false; (4) if something cannot be inferred, use null and explain in a trailing warnings array; (5) if the input is unusable, output only an error object with the reason. Input: {{input}}

How to use it

Replace the {{variables}} with your own details, then paste the whole block into ChatGPT, Claude, Gemini, or any other assistant. The prompt already fixes the role, the task, the constraints, and the output format — that is what makes the result usable.

Chinese version

请按严格格式输出,不要任何额外文字。格式:{{格式定义,如 JSON schema 或表格列名}}。规则:1) 只输出结构化数据本身,前后不加解释、不加「以下是」;2) 字段缺失填 null,不要编造;3) 数据类型必须严格遵守(数字不要加引号,布尔值用 true/false);4) 如果某项无法从输入推断,填 null 并在末尾的 warnings 数组里说明;5) 如果输入本身有问题导致无法输出,只输出一个 error 对象,写清原因。输入:{{输入}}

FAQ

What is this prompt for?

Output strictly in this format with no extra text: {{format definition, such as a JSON schema or column names}}.

Do I need to pay to use it?

No — this prompt is in the free tier and is shown in full.

Does it work with any AI model?

Yes. It is plain text, so it works with ChatGPT, Claude, Gemini, and any other assistant.

More Meta-Prompting prompts