Define Labels

Labels are the possible outputs your classification function can return. They define the decision space — the set of categories the function picks from for every input. Get the labels right and almost everything downstream gets easier.

Add labels

In the console, open your function and go to the Labels tab. Click Add label and type the label name. Repeat for each label.

You need at least 2 labels to create a classifier. Nyckel needs at least 2 confirmed examples per label before it begins training a private model — until then, predictions come from a zero-shot model that reads the label names directly.

That last point is important: the label name itself carries information in the early zero-shot stage. Spam and Not spam work well out of the box because the words are semantically clear. Type 1 and Type 2 give the zero-shot model nothing to go on and require training data before you’ll see useful predictions.

Principles for naming labels well

Mutually exclusive. Each input should clearly belong to exactly one label. If you find yourself unsure which label an example belongs to, the boundary between those labels is probably too fuzzy. Either merge them, or split them along a clearer dimension.

Decision-shaped. Name labels after what your application does with them, not internal codes. Refund request is clearer than Type 3 for both humans reviewing predictions and the zero-shot model trying to interpret the label.

Start minimal. Begin with the labels you’re certain about. You can add more labels later — Nyckel retrains automatically when you do. Starting with 3 high-confidence labels is much better than starting with 12 you’re unsure about.

Mind the long tail. If you have one label that’s going to cover 90% of inputs and a dozen rare labels, consider grouping the rare ones into “Other” and letting the review workflow surface specific rare cases over time.

How many labels?

There’s no hard limit, but practical advice:

If you’re tempted to define 50 labels, ask whether some of them are really attributes that should be a separate function. Sometimes “type” and “priority” should be two classifiers, not one classifier with 50 combined labels.

What happens next

With labels defined, your endpoint already returns predictions — zero-shot, based on the label names. You don’t need to upload training data before testing.

What you just did

Step What happened
Added labels Defined the set of outputs your function can return
Zero-shot is live The endpoint returns predictions immediately, before any training data

Next

Invoke Predictions — test the function from the console and from the API.