Task Types: Classification, Regression, Recommendation and Generation
10 min read
Lesson objectives
- Distinguish classification, regression, recommendation, and generation from the required output.
- Turn a broad goal into a specific AI task that can be evaluated.
- Explain why input type alone does not determine task type.
Start with the output form: what should the system produce?
Task type helps us choose data, evaluation, and tools. Four foundational types will recur throughout the program: classification selects a category; regression predicts a numerical value; recommendation ranks or selects existing items for a user or context; and generation creates new content such as text, images, or code. These four are not an exhaustive taxonomy of all AI, but they provide a practical lens for organized reasoning.
Classification: choose a category
In classification, the final output is one or more categories from a known set, such as “urgent/not urgent” or “request type A/B/C.” A model may produce internal scores or probabilities, but the task remains classification when the decision becomes a category. Classification evaluation is not always reducible to the percentage correct: accuracy, precision, and recall capture different aspects, and error costs and class balance matter when choosing a metric.
Regression: predict a numerical value
In regression, the target is a continuous or numerical value, such as predicted processing time, expected consumption, or future demand. The model does not select a ready-made category; it estimates a number. If we later convert the number into categories such as “short/medium/long,” we have added a classification or decision-rule step on top of the numerical prediction.
Recommendation: rank existing items
In recommendation, we usually have a set of existing items—articles, courses, products, or videos—and want to rank them or select a subset using signals about the user or context. The output is not necessarily “new content”; it may be an ordered list of existing items. Recommendation quality also depends on the objective: relevance, diversity, discovery, or reduced repetition. It is not enough to say “the most clicked item is best” without defining the objective.
Generation: create a new output
In generation, the model creates a new sequence or content based on the input and context it receives, such as a draft email, summary, or image. “New” means the output is not merely one item retrieved from a fixed list. It does not mean the facts in the output are new or correct. Generative content can be inaccurate or biased, so verification remains part of responsible use.
Task type | Simple question | Example output Classification | Which category does it belong to? | “Technical support” Regression | What numerical value is expected? | 14.5 minutes Recommendation | Which existing items are most suitable and in what order? | A ranked course list Generation | What new content should be created? | A draft message One system may contain several types: predict a time, classify priority, recommend an action, then generate a draft.
Problem framing comes before model selection
To turn a need into a buildable task, identify the decision unit, who will use the output, and when. State the output in observable terms, then identify the cost of errors. “Improve customer service” is broad; “classify a new message into one of four categories to suggest a team, escalating low-confidence cases to an employee” is closer to a defined task. Good framing may also lead to a decision not to use a model if a rule or process redesign is enough.
Lesson summary
Task type is determined by the output and decision: a category, a number, a ranking of items, or new content. Precise problem framing comes before model selection, and one system may contain multiple task types.