Overview
What Is a Multi-Classification Model?
In MTP, a multi-classification model reads a single input and classifies it along several independent dimensions at once. Instead of generating open-ended text or selecting one state, it responds with a JSON object that holds one value for every classification you define.
Multi-classification protocols:
- Use a single
MultiClassifierInstructionthat classifies the input - Derive the output format automatically from the
state_map - Do not use final tokens (the final is always
<NON>) - Do not allow numeric outputs
The state_map
The state_map defines the classifications. Each key is a classification label, and each value is the list of acceptable options for that label.
state_map = {
"emotion": ["curious", "afraid", "confused", "amused"],
"intent": ["question", "statement", "exclamation"],
}
This state_map defines two classifications: emotion, which is one of four options, and intent, which is one of three.
Model Output
The model responds with a JSON object containing exactly the keys defined in the state_map, each set to one of that key's acceptable values:
{"emotion": "curious", "intent": "exclamation"}
Every response contains exactly these keys, no more and no fewer.
Next Steps
- MultiClassifierInstruction - Define multi-classification instructions
- Model Types - Compare the types of models you can train
Databiomes