Skip to content

Classifier Agent Toolkit

The Lamini Classifier Agent Toolkit (CAT) allows you to create and refine a key building block for agentic systems: classifiers that can quickly categorize a large number of text inputs across any number of pre-defined categories.

You can use CAT via Lamini's REST API, Python SDK, or through the web interface.

What makes CAT different?

  • Accuracy for many classes: >99% accuracy on evals even with >500 classes
  • High throughput: process 100k tokens/s
  • Consistent latency: sub-2s latency even when classifying thousands of inputs with hundreds of classes
  • Confidence scores: for more accurate workflows
  • Built for iteration: get metrics and output evals for any model, and even compare models to measure progress

Working with CAT

  1. Create a project
    1. Define your classes
    2. Provide initial examples (you can get high accuracy with just 3 examples per class)
  2. Train your first model version (takes about 1 minute per class)
  3. Use the classifier
    1. Provide an input, get back all the classes and the confidence score for each
  4. Run eval to see metrics (if you're happy with the results, you can use the model immediately - no deployment or other step required)
  5. Add examples to improve performance
  6. Train a new model version
  7. Run eval to compare your new version to the first one
  8. Repeat to keep improving

Check out our examples repo for a notebook with sample code for this entire workflow: Classifier Agent Toolkit

Best Practices

  1. Start Small: Start with just a few (3-5) examples per class
  2. Variety: Provide diverse, representative examples for each class
  3. Class Balance: Try to maintain a similar number of examples per class
  4. Validation: Test your classifier with various inputs