Task Types for Small Language Models

The three task types a small language model can be trained for: question answering, chat completion, and agentic chat completion, and how classification, RAG and tool calling map onto them.

Picking the task type is the first decision in training a small language model, and it constrains everything downstream: what your training data has to look like, which student models are available, and which metrics tell you whether it worked.

There are three.

If you need to… Task type
Produce one answer for one input: an extraction, a transformation, a label from a fixed set, an answer over a retrieved passage Question answering
Hold a conversation and call tools in it, without acting on what the tools return Chat completion
Run an agent loop: call tools, read their results, and answer Agentic chat completion

The distinctions that actually cause trouble

Classification is question answering. If the output is one of a known, closed set of labels, the answer is the label and nothing else. The labels and their definitions go in the task description, and a mutator with one value per label keeps the synthetic data spread across them.

Retrieval goes in the input. Open-book and closed-book are not separate task types. When you retrieve context at query time, put it in the user message and train question answering on it. When the knowledge has to live in the weights, train on question-and-answer rows and accept that every update is a retraining job and that the model cannot cite a source.

Chat completion versus agentic chat completion. Both train on whole conversations with tool calls in them. The difference is whether the model ever sees a tool result. If each assistant turn is followed by the next user turn, it’s chat completion. If the model reads what a tool returned and decides what to do next, it’s agentic chat completion, and the training data has to carry the full loop.

Task type constrains model choice

Chat completion with tools declared only works with a subset of student and teacher models, the ones with the necessary structured-output behaviour. Choosing a student first and a task second can put you in a position where your preferred model cannot do the job at all.

Where this cluster goes

The articles below cover each task type in depth, plus worked recipes for specific applications: support ticket triage, intent detection, content moderation, document question answering over contracts, voice assistant command routing, PII redaction, and text-to-SQL. Each recipe uses the real CLI commands end to end.

For getting the data together, see training data. For choosing between task types when more than one could work, start with the decision guide below.

Open-Book vs Closed-Book QA

Two ways to make a small model answer questions about your documents: retrieve the passage at query time, or bake the knowledge into the weights. Both are question answering on distil labs; the data, the operations, and the provenance differ sharply.

Train an SLM for Content Moderation

A moderation model inherits whatever your policy leaves undecided: how to convert policy into labels, seed from overturned appeals, and keep the model inside a review path it can't bypass.

Train an SLM for Document QA over Contracts

Contract QA lives or dies on chunking: a clause split across two chunks produces a confidently wrong answer. How to segment agreements, build open-book training data, and grade the result.

Train an SLM for Intent Detection

Intent detection is decided at the boundaries between intents, not in the middle of them: how to derive intents from backend actions, mine ambiguous utterances, and handle out-of-scope input.

Train an SLM for PII Redaction

Redaction has asymmetric costs: a missed identifier is a disclosure, a spurious one is noise. How to write the policy, seed the obfuscated cases, and grade a model that has to be exhaustive.

Train an SLM for Support Ticket Triage

Ticket triage fails on taxonomy design, not on model capacity: how to write class descriptions your annotators agree on, seed the confusable pairs, and train a router with the distil CLI.

Train an SLM for Text-to-SQL

Text-to-SQL fails on schema grounding rather than on SQL syntax: how to feed the schema, seed across the difficulty range, and evaluate queries that are correct without matching the reference string.

Train an SLM for Voice Assistant Command Routing

In voice, the model size is chosen by the latency budget before anything else: how to spend a 500–800ms turn, what the SLM must and must not emit, and how to train it as a chat completion model that routes commands to tools.

Which Task Type Should You Pick?

A row-by-row decision guide for choosing between the three distil labs task types, the tie-breaks when two of them fit, and the four mistakes that cost a training run.

Multi-Turn Tool Calling Explained

Multi-turn tool calling trains a model to emit the next function call given a whole conversation, not a single request: the data format, chat completion versus agentic chat completion, and why per-call accuracy compounds.

The Task Types for Training a Small Language Model

The three task types distil labs supports (question answering, chat completion, agentic chat completion), how classification, RAG and tool calling map onto them, and what each one changes about your data, your metric, and your model choice.

What Is Question Answering as a Training Task?

The question-answering task type trains a model to return a targeted answer rather than a summary: what distinguishes it from the two QA variants, what the job description must specify, and how the answers get scored.

What Is Text Classification with a Small Language Model?

Text classification trains a small model to emit exactly one label from a fixed set: how it runs as a question-answering task on distil labs, what the training files contain, and the measured lift fine-tuning gives over a base model.

What Is Tool Calling and How Do You Train for It?

Tool calling turns a natural-language request into a schema-valid function call. How the chat completion task trains for it, what goes in your files, which models are eligible, and the measured jump fine-tuning produces on sub-1B students.