Task Types for Small Language Models

The six task types a small language model can be trained for — classification, question answering, RAG, closed-book QA, tool calling, and multi-turn tool calling.

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 six.

If you need to… Task type
Assign text to one of a fixed set of categories Classification
Extract or generate a precise answer from text Question answering
Answer from context you supply at query time Open-book QA (RAG)
Answer from knowledge learned during training Closed-book QA
Turn a request into a structured function call Tool calling
Do that across a multi-turn conversation Multi-turn tool calling

The distinctions that actually cause trouble

Classification versus question answering. If the output is one of a known, closed set of labels, it is classification, and treating it that way gives you a cleanly measurable task. If the output is free text that varies per input, it is question answering. The mistake is framing a genuine classification problem as open-ended generation, which throws away both accuracy and the ability to measure it.

Open-book versus closed-book. Open-book means you retrieve the relevant context and pass it in; the model reads and answers. Closed-book means the knowledge is baked into the weights during training and nothing is retrieved at inference.

The deciding factor is usually provenance rather than accuracy. If you have to show which document justified an answer, you need retrieval — a closed-book model cannot point at a source. If your knowledge base changes weekly, retrieval also wins, because retraining is slower than reindexing. If the knowledge is stable and you want a single self-contained artifact with no retrieval infrastructure, closed-book is simpler to operate.

Single-turn versus multi-turn tool calling. Single-turn maps one request to one call. Multi-turn carries conversation history, so the model has to resolve references to earlier turns and track what has already happened. If your users say things like “actually make that Tuesday”, you need multi-turn, and training on single-turn data will not get you there.

Task type constrains model choice

This catches people out. Tool calling and multi-turn tool calling only work 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. 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 cannot 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 on multi-turn tool calling.

Which Task Type Should You Pick?

A row-by-row decision guide for choosing between the six 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, the turn-expansion setting, and why per-call accuracy compounds.

The Six Task Types for Training a Small Language Model

The six task types distil labs supports — classification, question answering, open-book QA, closed-book QA, tool calling, multi-turn tool calling — 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 the task works 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 one schema-valid function call. What the task type expects in your files, which models are eligible, and the measured jump fine-tuning produces on sub-1B students.