Search code examples
nlpopenai-apilarge-language-model

Is it possible to build a text classifier using existing LLM like chatgpt?


Pre LLM, when I want to build a text classifier (e.g., a sentiment analysis model, when given an input text, it returns "positive" or "neutral" or "negative"), I'll have to gather tons of data, choose a model architecture, and spend resources training the model.

enter image description here

Now as the LLMs like ChatGPT and Google Bard are very smart, I'm wondering if it is possible to build the same text classifier based on those LLMs. (I'm assuming this will require less data and less resources.)

Is this possible? Is there a walk through or tutorial I can follow? Thanks.


Solution

  • From the open ai cookbook there is:

    Embeddings can be easier with a smaller amount of data than Fine-Tuning but fine-tuning should work better once you have a lot of data.

    Neither use the big LLM models as both ChatGPT (GPT3.5/GPT4) and Bard are more trained to answer questions and not as a text classifier so they are not that useful. If you do try to use these big models for text classification (using prompts) you will find them inconsistent (depending on what you specifically are trying to classify).