OCI AI-Language 2.0 released custom models for text classification!

black and white book business close up
Photo by Pixabay on Pexels.com

With custom text classification, you can build a custom AI model to automatically classify your text into a set of classes that you predefine.

Create a project

Upload the data set to Object Storage

You need to have a data set that consists of the text, and the label that classifies the text. Minimum 10, but recommended 100 per label. This should be uploaded to the Object Storage.

text,labels
what's my account balance?,Balances
Do I still have at least $150 on my credit card?,Balances
show my account balance,Balances
Could you show me my checking balance,Balances
Is there enough on my Visa for a $375 purchase?,Balances
I need to check my  credit card  balance,Balances
I'd like to check my savings balance,Balances
I need to make sure I have some spare cash on my credit card,Balances
Show me my Savings balance,Balances
what is the balance on my credit card,Balances

please transfer my 500 INR share of lunch to Ramesh from my savings account,Send Money
Please send Filip 4483 CZK from my savings account,Send Money
I'd like to send $447,Send Money
Pay Jim the 32 bucks I owe him,Send Money
please send money to carol,Send Money
I'd like to make a  Transfer,Send Money
I want to make a quick transfer,Send Money
Pay Bobby the $34 I owe him,Send Money
Can you forward 55 bucks from my main to my secondary account?,Send Money
I want to pay off my debt to Hannah,Send Money
I need to send $300 to Hugo Rafferty,Send Money

what was my total spend in Areon Impex,Track Spending
Have I been charged for anything at 7/11?,Track Spending
Did I purchase anything from O2?,Track Spending
How much are my expenses at Costco?,Track Spending
did I swipe my card at shell recently?,Track Spending
Could you show me what I have spent at Costa Coffee?,Track Spending
Show what I have spent at Applebees,Track Spending

The above is just a sample of the entire data set

Create and train the model

Create a model endpoint

Once the model is generated (this took about 5 minutes) you can use the console to try the model.

Analyze model

Metrics

Check here for an explanation of the different types of metrics

How to access the model

Obviously using the console is not the proper way but there are plenty of ways to access the custom models.

  • Console
  • REST API
  • SDK (Python, Java, C#, JavaScript, and Ruby)
  • CLI

You can also create custom models for Named Entity Recognition (NER)

With custom name recognition, you can identify domain-specific entities unique to your business or industry vertical.

https://docs.oracle.com/en-us/iaas/language/using/custom-models.htm

This one will be for another post!