Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-class classification #782

Open
SaraAmd opened this issue May 17, 2023 · 1 comment
Open

Multi-class classification #782

SaraAmd opened this issue May 17, 2023 · 1 comment

Comments

@SaraAmd
Copy link

SaraAmd commented May 17, 2023

I have two main questions.
My first question is which task number in this link https://instructions.apps.allenai.org/ is similar to a multi-class classification?
My second question is, if we want to use this model for multi-class classification for our own dataset where we have a definition for each class and a corresponding example for each class, what should be the format of the input prompt to the model?

@monk1337
Copy link

monk1337 commented Sep 4, 2024

Task 1541: agnews_classification is a good example of multi-class classification. The description states: "Given a short article, classify the article based on its category". This task involves classifying news articles into multiple predefined categories, which is a typical multi-class classification problem.

Task 1289: trec_classification
Description: "Given a question, detect which category better describes it."
This task involves classifying questions into multiple categories.

Task 1292: yelp_review_full_text_categorization
Description: "Given a review about a place, provide a rating for it."
While this involves ratings, it's essentially classifying reviews into multiple rating categories.

Task 1494: bengali_hate_speech_classification
Description: "Given a hateful post in Bengali, classify whether it is political, geopolitical, religious or personal in nature."
This is a multi-class classification task for hate speech.

Task 1531: daily_dialog_type_classification
Description: "Classify the input sentence into one of the 5 classes : unknown, commissive, question, information, directive"
This is a clear multi-class classification task for dialogue acts.

Task 1532: daily_dialog_emotion_classification
Description: "Classify the conversation sentences of input passage into the following emotions: anger, disgust, fear, happiness, sadness, No emotion"
Another clear multi-class classification task, this time for emotions.

Format of input prompt for multi-class classification with your own dataset:

Task: Classify the given text into one of the following categories:

[List your class names here]

Definitions:
[Class 1 name]: [Class 1 definition]
[Class 2 name]: [Class 2 definition]
...

Examples:
[Class 1 name]: [Example text for Class 1]
[Class 2 name]: [Example text for Class 2]
...

Text to classify: [Your input text here]

Classification:

Check promptify examples you'll get some ideas for the templates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants