Task selection

Choosing the right task type for your model is the crucial first step in the distil labs workflow. Our platform provides specialized support for six fundamental task types:

  • Question Answering — the model extracts or generates precise answers from text based on specific queries.
  • Classification — the model analyzes input text and assigns it to one category from a fixed set of options.
  • Tool Calling — the model selects and invokes the appropriate function or API based on user requests.
  • Multi-Turn Tool Calling — the model generates function calls in a conversational context, maintaining context across multiple turns.
  • Open Book Question Answering (RAG) — the model generates answers to questions based on context you provide.
  • Closed Book QA — the model learns facts and knowledge from your unstructured data and answers without external context.

Choosing Between Tasks

Deciding between these task types often comes down to the nature of your desired output.

If you need to…Choose
Generate solutions to text-based problemsQuestion Answering
Assign categories to textClassification
Generate tool calls according to a pre-defined schemaTool Calling
Generate tool calls in multi-turn conversationsMulti-Turn Tool Calling
Generate answers from contexts you haveOpen Book QA (RAG)
Answer questions based on data learned during trainingClosed Book QA

Question Answering

Question answering extracts or generates precise answers from text based on specific queries. Rather than summarizing or paraphrasing entire documents, the model locates relevant information and returns targeted responses—either as direct extractions or synthesized answers.

Question Answering is the right fit when your application needs to retrieve specific facts from documents, respond to user queries with grounded answers, or transform text by addressing implicit questions about its content.

Question Answering data preparation →

Example Use Cases

  • Contracts — answer queries like “What is the termination clause?” or “When does the agreement expire?”
  • Invoices — respond to “What’s the total amount due?” or “What’s the payment deadline?”
  • Purchase Orders — answer “What quantity was ordered?” or “Who is the supplier?”
  • Meeting Minutes — respond to “What decisions were made?” or “Who owns the follow-up actions?”
  • Security Incident Reports — answer “What was the root cause?” or “Which systems were affected?”
  • IT Helpdesk Tickets — respond to “What’s the reported issue?” or “What troubleshooting was attempted?”
  • Sales Chat Transcripts — answer “What product was discussed?” or “What objections did the customer raise?”

Classification

Classification models analyze input text and assign it to one category from a fixed set of options. This task type is particularly effective when you need deterministic categorization rather than open-ended generation.

Classification data preparation →

Example Use Cases

Some common application areas for classification include:

  • Intent detection for customer service queries
  • Content moderation (toxic/safe, spam/not spam)
  • Sentiment analysis (positive/negative/neutral)
  • Topic categorization for knowledge bases
  • Triaging support tickets by department

Tool Calling

Tool calling trains a model to select and invoke the appropriate function or API based solely on the user’s request, without requiring additional context. The model learns to map natural language queries to structured tool calls with correct parameters, relying on its training rather than retrieved documentation.

This task type is ideal when you need a model that can reliably dispatch user intents to specific backend functions, APIs, or services in a deterministic, schema-compliant way.

Tool Calling data preparation →

When to pick this task

Choose tool calling when:

  • You have a fixed set of tools/APIs the model should learn to invoke
  • The tool selection logic should be memorized during training, not looked up
  • You need structured, validated outputs that match exact function signatures
  • Your application requires routing user requests to backend services

Example Use Cases

Common applications for tool calling include:

  • Voice assistants — Map spoken commands to smart home APIs
  • Chatbot actions — Convert user intents to CRM/database operations
  • Code generation — Transform natural language to API calls
  • Workflow automation — Route requests to appropriate microservices
  • Command interfaces — Parse user input into system commands
  • Integration layers — Bridge natural language to legacy systems

Multi-Turn Tool Calling

Multi-turn tool calling trains a model to generate function calls within a conversational context. Unlike single-turn tool calling where each input produces one function call independently, multi-turn tool calling takes a conversation history (alternating user and assistant messages) and generates the next appropriate function call based on the full context.

The model learns to maintain context over multiple conversation turns, enabling natural conversational experiences where users can issue commands, ask follow-up questions, and build on previous interactions without losing context.

Multi-Turn Tool Calling data preparation →

When to pick this task

Choose multi-turn tool calling when:

  • Your application requires conversational interactions with tool invocations
  • Users need to issue sequences of related commands that build on each other
  • The model must understand context from previous turns to make correct tool selections
  • You want to enable natural dialogue-based interfaces to APIs or services

Example Use Cases

Common applications for multi-turn tool calling include:

  • File system assistants — Navigate directories and manage files through conversation
  • Database query interfaces — Build complex queries through iterative refinement
  • DevOps chatbots — Execute sequences of infrastructure commands conversationally
  • Smart home controllers — Chain home automation commands naturally
  • Customer service bots — Handle multi-step service requests in dialogue
  • IDE assistants — Execute code operations through conversational commands

Open Book Question Answering for RAG

Open-book QA trains a model to answer questions using a provided passage (“context”). The goal is to produce answers that are grounded in the text rather than relying on general world knowledge. This task is a natural fit for Retrieval-Augmented Generation (RAG), where a retriever supplies relevant chunks and the model answers strictly from those chunks.

Choose this task when you already have (or can reliably retrieve) the passages you want the model to use at train/validation/inference time.

Typical scenario: you’ve chunked product manuals, knowledge-base pages, tickets, SOPs, or API docs for a RAG pipeline and you want the teacher to draw from those same chunks when fabricating new QA (or grounded classification) examples.

Open Book QA data preparation →

Example Use Cases

Example use cases where open book QA excels include:

  • Customer support systems that answer based on product documentation
  • Legal document analysis and question answering
  • Technical documentation assistants
  • Knowledge base or FAQ automation
  • Research assistants that answer based on specific papers or texts

Closed-Book QA

Closed-Book QA extracts facts and knowledge from your unstructured data and distils this into a model. This allows a user’s question to be answered using the model’s internal knowledge base, without requiring external context.

This task type is ideal when you have a large amount of unstructured data and you want to add the facts and knowledge contained in the data to a model’s knowledge base.

Closed-Book QA data preparation →

When to pick this task

Choose closed-book QA when:

  • You have a lot of unstructured data and you want to add this knowledge into a model.
  • You want a user to ask questions without having to find and provide any external context to pass to the model.
  • A typical RAG setup does not work for you due to difficulties in creating an effective retrieval system.

Example Use Cases

Common applications for closed-book QA include:

  • Information retrieval — Extract knowledge/facts about any arbitrary context
  • Customer support — Answer questions from customers about products/services