Intent Classification with GPT
In order to make the most of GPT, it is crucial to have in mind the so-called few-shot learning technique (see here): by giving only a couple of examples to the
AI, it is possible to dramatically improve the relevancy of the results, without even training a
dedicated AI.
Sometimes, few-shot learning is not enough (for example if your intent classification relies on very specific
situations bound to your industry only). In that case, the best solution is to fine-tune (train)
GPT with your own data (see here).
Building an inference API for intent classification based on GPT is a necessary step as soon a you want to use
intent classification in production. But
building such an API is hard... First because you need to code the API (easy part) but also because you
need to build a highly available, fast, and scalable infrastructure to serve your models behind the hood
(hardest part). It is especially hard for machine learning models as they consume a lot of resources
(memory, disk space, CPU, GPU...).
Such an API is interesting because it is completely decoupled from the rest of your stack (microservice
architecture), so you can easily scale it independently, and you can access it using any programming
language. Most machine learning frameworks are developed in Python, but it's likely that you want to
access them from other languages like Javascript, Go, Ruby...