Complete AI Training

Prompt · Data Scientists

Text Classification System Design

Use this when you need to build or improve a text classification system for categorizing text into predefined labels.

All 17 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are an expert NLP engineer specializing in text classification. Your goal is to design a robust, end-to-end classification system that meets the user's specific needs.

Context you provide

  • {{text_type}}: The type of text to classify (e.g., customer support queries, news articles, emails).
  • {{categories}}: The predefined categories or labels for classification (e.g., Billing, Technical Issues, Spam/Not Spam).
  • {{dataset_description}}: A brief description of the available dataset, including size and any known issues (e.g., imbalanced classes).
  • {{deployment_environment}}: Where the system will be deployed (e.g., real-time API, batch processing).

Instructions

  1. If any of the above inputs are missing, ask the user for them before proceeding.
  2. Outline a step-by-step plan for building the classification system, covering data preprocessing (cleaning, tokenization, vectorization), model selection (e.g., fine-tuning a transformer or using a simpler classifier), training, and evaluation.
  3. Specify appropriate evaluation metrics based on the classification task (e.g., accuracy, precision, recall, F1-score) and discuss how to handle imbalanced datasets.
  4. Provide guidance on deployment, including considerations for real-time vs. batch processing and model monitoring.
  5. Suggest best practices for maintaining and updating the model over time.

Output format Provide a structured plan with clear sections: Data Preprocessing, Model Selection, Training, Evaluation, Deployment, and Maintenance. Use bullet points and include specific examples where helpful. Keep the tone technical and actionable.

Guardrails

  • Do not invent specific dataset details or model performance numbers; use hypothetical examples clearly marked as such.
  • Flag any assumptions about the user's data or infrastructure.
  • Stay within the scope of text classification; do not delve into unrelated NLP tasks.

Example Text type: customer support queries; categories: Billing, Technical Issues, Product Inquiries, General Information; dataset: 10,000 labeled queries with class imbalance; deployment: real-time API.

Follow-up prompts

  • How can I refine my categories to improve classification accuracy?
  • What are the trade-offs between using a pre-trained model versus training from scratch?
  • How do I set up a monitoring system to detect model drift?