+64% gain in Text Safety
An entertainment company enhanced its detection of harmful and prohibited user messages with our Text Classification module.
14
Classes
27
Languages
240M+
Texts monthly
Client previously used the OpenAI moderation API:
0.51
F1 Score
0.53
Recall
Data
Sends to OpenAI
After using 01n boilerplate:
0.84+64%
F1 Score
0.85+60%
Recall
Data 🚀
Stays in-house
- - Always outputted the defined JSON structure
- - Produced the highest results across multiple languages
- - Needed <5Gb of GPU vRAM
If the response is 1 for the batch, a multi-label classification categorizes each text from the batch (JSON response with message IDs and classes)
- - Checked 50+ different LLMs (0.5B-14B parameters) with different quantization
- - Tried over 200 class definition variations in the prompt, resulting in a 17% boost in F1 Score
Replicate this success
First, get our boilerplate (it includes Text Classification module):
Then let's run your new Text Classification service:
uvicorn api.main:app --host 0.0.0.0 --port 8001
curl -X POST http://0.0.0.0:8001/predict -H "Content-Type: application/json" -d '{"user_query": "A wise wizard and a resolute paladin united, magic and steel against darkness."}'
> {"classifier_score":"1","classifier_execution_time":0.047,"judge_decision":"correct","judge_execution_time":0.012}