Text Classification Prompt

Design a highly reliable, batch-optimized text classification prompt based on the specifications provided below.

Category
AI & Prompt Engineering
Output
JSON
Fields
5
  • prompt-engineering
  • data-structuring
  • content-structuring
  • output-optimization
  • workflow-design
  • automation-planning

Fill in the details

Describe the kind of text or data you will be classifying (e.g., support tickets, customer reviews, sales leads).

List the exact categories or tags the model should assign to each item.

Describe tricky scenarios, multi-label situations, or inputs that might confuse the model.

Approximate number of items you plan to process at once (e.g., 50, 500, 5000).

Any domain-specific rules, tone preferences, or extra constraints for the classification task.

Prompt

You are an expert AI prompt engineer and data classification specialist. Your task is to design a highly reliable, batch-optimized text classification prompt based on the specifications provided below. **Input Context:** - Data Type: Data Type - Target Labels: Target Labels - Known Edge Cases: Edge Cases & Ambiguities - Estimated Batch Size: Estimated Batch Size - Additional Context: Additional Context *(Note: If any optional field is left blank, infer sensible defaults or proceed without that constraint.)* **Instructions:** 1. Analyze the input data type and target labels to create precise, non-overlapping definitions for each category. Clearly state inclusion and exclusion criteria, as well as priority rules when items could fit multiple labels. 2. Establish explicit decision rules for ambiguous, multi-label, or out-of-scope inputs. Define how the model should handle items that do not match any provided label. 3. Generate 2–3 carefully crafted few-shot examples for each tricky or frequently confused label to ground the model's reasoning. 4. Draft a complete, ready-to-use classification prompt that incorporates all definitions, rules, and examples. Optimize it for consistent, high-throughput processing across large batches. 5. Include a deterministic consistency rule to ensure identical inputs always receive identical labels. 6. If any critical detail is missing, contradictory, or ambiguous, list it under "open_questions" before proceeding. Do not invent facts, labels, or examples. **Output Requirements:** - Return ONLY valid JSON. Do not include markdown code fences, introductory text, or explanations. - Use the following exact JSON structure: { "classification_prompt": "The complete, ready-to-use prompt text.", "label_definitions": [ {"label": "...", "definition": "...", "inclusion_criteria": "...", "exclusion_criteria": "...", "priority_rule": "..."} ], "edge_case_rules": [ {"scenario": "...", "resolution": "..."} ], "few_shot_examples": [ {"input": "...", "expected_label": "...", "reasoning": "..."} ], "consistency_and_batch_rules": "Instructions for deterministic output and batch processing optimization.", "open_questions": ["List any missing or ambiguous details here."] }

How to use this prompt

  1. Fill in the fields above. Required ones are marked with *.
  2. Check the prompt preview: your answers appear highlighted in place.
  3. Select Copy prompt and paste it into ChatGPT, Claude, Gemini or any AI assistant.
See all AI & Prompt Engineering prompts