Skip to main content

Zero-Shot

The Zero-Shot model enables automatic classification of documents into user-defined categories without requiring prior training on those specific labels. This allows the system to dynamically assign tags based on the semantic meaning of the content, making it particularly useful for flexible and adaptive document classification tasks.

How the Zero-Shot Model Works

The Zero-Shot model evaluates how well a document matches a set of candidate labels by leveraging a pre-trained Natural Language Processing (NLP) model.

Instead of learning from task-specific examples, the model uses Natural Language Inference (NLI) to determine whether a given label is relevant to the input text.

In simple terms, the process works as follows:

  • The document content is provided as input
  • A set of candidate labels (tags) is defined by the user
  • The model compares the document against each label
  • Each label is assigned a confidence score
  • The most relevant labels are returned
  • This approach allows classification without retraining, making the model highly versatile across different domains.

Test the Model

To quickly test the model, you can right-click on the model, and select Query the Model, and fill the required fill (Content and Tags).

For this example, the content used was:

The Monaco decider was the first meeting of the top two in the world since Sinner won in straight sets in the final of the ATP Championship last November.
In a tense and tight match with plenty of big shots, both players struggled with the windy conditions, which added an element of unpredictability to proceedings and led to 83 unforced errors between the pair.
The win gives the 24-year-old Italian his third Masters 1000 title of the year having already triumphed at Indian Wells and Miami, and extends his winning run in Masters series events to 22 matches.
"It has been an interesting week trying to learn how to play again on clay," said Sinner.
"I came here trying to get as many matches as possible and I'm happy to win one big tournament on this surface.
"Having this trophy and getting back to number one means a lot to me.
"Today was a very high level from both of us. It was a bit breezy and different conditions to what we had played in this week."

The tags used:

Sinner, Monaco, Tennis

The results are ordered in descending order of confidence score, with the most relevant labels appearing first.