Lion Cipher Lab
Classify text with a local model
- AI Security
- Beginner
- ~40 min
- Free · no account required
Why it matters
Most people meet AI as a chatbot and assume every model works that way. But an enormous amount of real, useful AI is quieter than that: it reads a piece of text and sorts it into a bucket. Is this email spam? Is this log line suspicious? Is this review positive? That is text classification, and it is often the right tool precisely because it is small, fast, cheap to run offline, and easy to measure. Learning to run a classifier on your own machine, on your own data, and then to score it honestly with precision, recall and F1, teaches two things at once: how a whole family of practical AI…
What you'll learn
- text classification
- Hugging Face transformers
- running a pretrained pipeline offline
- reading labels and confidence scores
- precision, recall and F1
- evaluating a model on your own data
- understanding model limits and bias
Steps in this lab
- A classifier is not a chatbot
- Install the tools, offline-first
- Run a pretrained classifier in three lines
- Point it at a real security task
- Build a small labeled set of your own
- Score it: precision, recall and F1
- The limits: domain shift, bias, and false confidence
- What you can now do that most people can't