Text Classification
Explicit category list, single-label constraint, and format instruction ('just the category name') eliminate ambiguity. The model does not need examples when the task and output format are crystal clear.
Classify the following text into exactly one of these categories: {{categories}} Text: "{{text}}" Rules: - Choose only one category - If the text could fit multiple categories, choose the most dominant one - Respond with just the category name, nothing else Category:
Variables to customize
Why this prompt works
Explicit category list, single-label constraint, and format instruction ('just the category name') eliminate ambiguity. The model does not need examples when the task and output format are crystal clear.
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.