Output Format Enforcement
The examples establish the exact JSON schema, field naming conventions, and how to handle boolean values — the model follows the same pattern for any new input.
Convert the following product descriptions into structured JSON. Follow this exact format:
Example 1:
Input: "Red cotton t-shirt, size medium, $24.99, currently in stock"
Output: {"name": "Red cotton t-shirt", "material": "cotton", "size": "M", "price": 24.99, "in_stock": true}
Example 2:
Input: "Blue denim jacket, size large, $89.00, sold out"
Output: {"name": "Blue denim jacket", "material": "denim", "size": "L", "price": 89.00, "in_stock": false}
Now convert:
Input: "{{product_description}}"
Output:Variables to customize
Why this prompt works
The examples establish the exact JSON schema, field naming conventions, and how to handle boolean values — the model follows the same pattern for any new input.
Save this prompt to your library
Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.
Related prompts
Requesting confidence and key phrases forces the model to justify its classification rather than guessing. The structured output format works zero-shot because sentiment analysis is well-understood by LLMs.
Key Information ExtractionListing the exact fields to extract removes guesswork. The 'Not specified' instruction prevents hallucination when information is missing -- a common failure mode without this guardrail.
Question Answering with SourceGrounding the answer in source material and instructing the model to refuse when information is missing dramatically reduces hallucination -- the biggest risk in zero-shot Q&A.
Math Word Problem ReasoningExplicit numbered steps force the model to decompose the problem rather than guessing. The verification step catches arithmetic errors before the final answer.