Machine Learning + openAI: solving a text classification problem

-

How I migrated an old solution to a more elegant, robust and scalable solution using text classification from openAI

Photo by Hunter Harritt on Unsplash

As mentioned within the previous article, I talked about how I learned the foundations of machine learning to be able to solve an issue with text classification. As a result of the dearth of experience with machine learning and AI, it was pretty essential to be pragmatic and find an answer that will be:

  1. Easy to make use of and maintain;
  2. Not expensive;
  3. Compatible with existing solutions;
  4. Quickly classify big amounts of text;
  5. Ability to be continually improved and refined;

From the conducted research, OpenAI seemed at first glance the one that will fit the answer requirements.

With just a couple of lines, you possibly can make a request to the openAI api to get a classification response. For the sake of the demonstration, I used an example from the examples reference.

import OpenAI from "openai";

// Initialize the openai api key
const openai = recent OpenAI({
apiKey: 'OPEN-AI-API-KEY'
});

const response =…

ASK DUKE

What are your thoughts on this topic?
Let us know in the comments below.

0 0 votes
Article Rating
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Share this article

Recent posts

0
Would love your thoughts, please comment.x
()
x