All posts
Announcement4 min read

Open Text Shield Is Now a Family: Introducing the Category Classifier (OTS-CC)

OTS-CC labels every SMS as verification, marketing or transactional. 99.7% accuracy, about 4 ms per message on CPU, 9 priority languages, runs on your own servers.

Paste into Claude, ChatGPT, or Cursor to have it help you integrate in minutes — full article, code samples, and FAQs included.

Open Text Shield (OTS) is now a family. The original OTS model is now the Threat Classifier (OTS-TC), and it asks one question: is this text safe? The Category Classifier (OTS-CC), released today, asks a different one: what category of text is it? Verification, marketing or transactional.

OTS-CC scores 99.7% on our hand-written test set, takes about 4 ms per message on CPU (Apple M4 Pro benchmark), covers 9 priority languages and runs on your own servers. You can try it live or read the source on GitHub.

The Open Text Shield Category Classifier. Also on YouTube.

Two models, two questions

Threat Classifier (OTS-TC)Category Classifier (OTS-CC)
QuestionIs this text safe?What category of text is it?
Labelsham, spam, phishingverification, marketing, transactional
Base modelmultilingual BERT (mBERT)mmBERT-small
Runs onGPU, Docker imageCPU, int8 ONNX
SourceOpenTextShieldOpenTextShield-CC

Nothing changes for existing OTS users. The Threat Classifier is the same model behind the same API, documented on the OpenTextShield page and in our GPU deployment guide. The new name only makes room for a second model.

What the three categories mean

LabelCoversExample
verificationOne-time codes, 2FA and login codes, verification links, "confirm it's you"Your Uber code is 4821. Never share this code.
marketingPromotions, sales, loyalty pushes, launches, re-engagement, referral offers50% off everything this weekend
transactionalOrder, delivery, payment, booking, balance, reminder and account-event notificationsYour parcel has been delivered

Messaging teams handle these three kinds of traffic differently, and the sender's own label is not always reliable. OTS-CC reads the text itself and returns a label, a confidence and a score for each category, so the decision about what to do with each kind of message stays with you.

How accurate is it?

All numbers below are from the released int8 ONNX model.

  • 99.7% on the hand-written test set (324 of 325, macro F1 0.997). These are 325 messages written in the style of real traffic across the nine languages, never used for training or model selection. The one miss is a French supermarket promotion read as transactional.
  • 95.9% on a blind stress set written to break the model and never used for fixes. We treat this as the honest estimate for messages unlike anything in training. The stress sets include promo codes that look like OTPs ("enter verification code 72772 to win a 100% discount coupon"), delivery handover codes that talk about parcels, receipts with an upsell attached, leetspeak and code-switching.
  • 40 of 40 on messages in ten languages the model was never trained on (Portuguese, Italian, Russian, Chinese, Japanese, Vietnamese, Polish, Swahili, Tagalog and Urdu).

The remaining weak spots are listed in the README: "did you just spend X? reply 1 or 2" fraud checks, push approvals that carry no code, and messages that are genuinely mixed, such as a ticket confirmation that reads like a promotion.

Speed and where it runs

OTS-CC is a 141 MB int8 ONNX model behind a FastAPI service. It runs on CPU, with no GPU required.

  • About 4 ms per message at batch size 1 (4.1 ms, Apple M4 Pro CPU).
  • Around 450 requests per second from one service process on one core, at 20 ms p95 with 8 clients.
  • For a gateway that classifies messages one at a time as they arrive, the CPU is faster than a GPU. A short message is dominated by launch overhead, not compute.

The repository includes a Docker image and Terraform for AWS (ECS Fargate behind a load balancer). Every classification can be written to an audit log, which can keep the full text, a truncated copy, a hash only or a redacted copy. Use hash only or redacted wherever the traffic carries OTPs or personal data.

Try it

The public demo runs at ots.telecomsxchange.com/cc/, next to the Threat Classifier. It shares a small 2 vCPU server, so expect 15 to 20 ms per message there rather than the 4 ms benchmark. To run it yourself:

curl -s localhost:8080/v1/classify \
  -H 'content-type: application/json' \
  -d '{"text":"Your Uber code is 4821. Never share this code."}'

{"label":"verification","confidence":0.99,
 "scores":{"verification":0.99,"marketing":0.0,"transactional":0.01}}

A batch endpoint accepts up to 256 messages per request. Both models are documented with request samples in seven languages in the TCXC AI API reference. Setup and the model download are in the OpenTextShield-CC repository.

Explore Open Text Shield →
Both models, the live Threat Classifier demo and deployment options.

Frequently Asked Questions

Back to all posts