Classification
A supervised learning task that assigns input data to one of several predefined categories based on learned patterns, used for tasks like spam detection, sentiment analysis, and churn prediction.
Classification is the most common ML task in production systems. Given an input and a set of possible categories, the model predicts which category the input belongs to. Binary classification handles two classes (spam/not spam, churn/retain). Multi-class handles many classes (product category, intent detection). Multi-label allows multiple simultaneous labels (a support ticket can be both "billing" and "urgent").
The modeling spectrum ranges from simple (logistic regression, decision trees) to complex (gradient boosting, deep neural networks). For structured data, gradient boosting (XGBoost, LightGBM) typically achieves the best accuracy. For text, LLMs can classify with zero-shot prompting, few-shot prompting, or fine-tuning. For images, convolutional neural networks and vision transformers are standard.
For growth applications, classification powers many critical features: classifying leads by likelihood to convert, categorizing support tickets for automated routing, detecting fraudulent transactions, segmenting users by behavior type, and moderating user-generated content. The key to production classification is not just model accuracy but the entire system: feature engineering, threshold selection based on business costs, monitoring for distribution shift, and graceful handling of low-confidence predictions.
Related Terms
RAG (Retrieval-Augmented Generation)
A technique that grounds LLM responses in external data by retrieving relevant documents at query time and injecting them into the prompt context.
Embeddings
Dense vector representations of text, images, or other data that capture semantic meaning in a high-dimensional space, enabling similarity search and clustering.
Vector Database
A specialized database optimized for storing, indexing, and querying high-dimensional vector embeddings with sub-millisecond similarity search.
LLM (Large Language Model)
A neural network trained on massive text corpora that can generate, understand, and transform natural language for tasks like summarization, classification, and conversation.
Fine-Tuning
The process of further training a pre-trained LLM on a domain-specific dataset to specialize its behavior, style, or knowledge for a particular task.
Prompt Engineering
The practice of designing and iterating on LLM input instructions to reliably produce desired outputs for a specific task.