Zero-shot classifiers

Apply large-scale language models on your data


Also available on 📺 YouTube

Click here to see a video explanation of how you can build zero-shot classifiers.

Zero-shot classifiers are amazing. Deriving predictions without labeling any data is great, but they are even better suitable as heuristics:

  • Zero-shot (and few-shot) learning quickly hit plateaus in performance, such that more labeled data doesn't add value.
  • They are highly reliant on the prompt they've been engineered on (for more details on this, take a look at our blog; we explain how zero-shot works there in greater detail).
  • They are rather computationally expensive, such that they often are too slow for inference.

Again, they are amazing heuristics. So let's build a zero-shot classifier! To do so, we head over to the heuristics page and select "Zero-shot" from the "New heuristic" button.


We now have to pick a target task, attribute, and configuration handle. We pull the zero-shot classifiers directly from 🤗 Hugging Face. You can either search for classifiers or pick one from our recommendations.


Once you've selected a zero-shot model, you enter into the details page. Other than labeling functions or active learners, there is no editor to program into. Instead, you can only pick which labels should be predicted.

Also, as already mentioned, zero-shot classifiers are rather slow, so it makes perfect sense to first play a bit with sample records to estimate the performance. You can enter an arbitrary text into the playground, or compute the predictions for 10 randomly selected records from your data.


If you're happy with the model, you can click on the purple "Run" button, which will compute the results on all your records.

As with any other heuristic, your function will automatically and continuously be evaluated against the data you label manually.


Zero-shot extractors are in active development

Zero-shot classifiers are freshly integrated into our application. But we're already working on extractors and extensive prompt engineering, so stay tuned!