Text Classification
Transformers
Safetensors
English
roberta
intent-classification
email
triage
Synthetic
text-embeddings-inference
Instructions to use aitrainingdatabroker/inbound-inquiry-intent-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aitrainingdatabroker/inbound-inquiry-intent-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="aitrainingdatabroker/inbound-inquiry-intent-classifier")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("aitrainingdatabroker/inbound-inquiry-intent-classifier") model = AutoModelForSequenceClassification.from_pretrained("aitrainingdatabroker/inbound-inquiry-intent-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
library_name: transformers
|
| 6 |
+
pipeline_tag: text-classification
|
| 7 |
+
base_model: distilroberta-base
|
| 8 |
+
datasets:
|
| 9 |
+
- aitrainingdatabroker/synthetic-inbound-inquiries-by-intent
|
| 10 |
+
tags:
|
| 11 |
+
- intent-classification
|
| 12 |
+
- email
|
| 13 |
+
- triage
|
| 14 |
+
- text-classification
|
| 15 |
+
- synthetic
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# Inbound Inquiry Intent Classifier
|
| 19 |
+
|
| 20 |
+
Reads an inbound message to a data business and names its intent out of eight: `seller_interest`, `buyer_request`, `referral_offer`, `press_media`, `vendor_pitch`, `support_question`, `opt_out` or `spam`.
|
| 21 |
+
|
| 22 |
+
Every name, number and sentence it was trained on is made up. Nothing comes from a real person, customer or business.
|
| 23 |
+
|
| 24 |
+
## Why it exists
|
| 25 |
+
|
| 26 |
+
Sorting an inbox by intent lets the right person answer first, and makes sure an opt-out is never missed.
|
| 27 |
+
|
| 28 |
+
## Use it
|
| 29 |
+
|
| 30 |
+
```python
|
| 31 |
+
from transformers import pipeline
|
| 32 |
+
|
| 33 |
+
classify = pipeline("text-classification", model="aitrainingdatabroker/inbound-inquiry-intent-classifier", top_k=3)
|
| 34 |
+
print(classify("Please take our company off your mailing list and confirm it is done."))
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
## How it was trained
|
| 38 |
+
|
| 39 |
+
Fine-tuned from `distilroberta-base` for 6 epochs on one RTX 3070. Training data: 458 rows from [synthetic-inbound-inquiries-by-intent](https://huggingface.co/datasets/aitrainingdatabroker/synthetic-inbound-inquiries-by-intent), all invented, with test rows built from templates the model never saw in training. The scripts that built the data and trained the model are in `source/`; the full scores are in `scores.json`.
|
| 40 |
+
|
| 41 |
+
## Test scores
|
| 42 |
+
|
| 43 |
+
On 154 held-out rows: accuracy 1.0, macro F1 1.0.
|
| 44 |
+
|
| 45 |
+
| Label | F1 | Count |
|
| 46 |
+
|---|---|---|
|
| 47 |
+
| `buyer_request` | 1.0 | 20 |
|
| 48 |
+
| `opt_out` | 1.0 | 18 |
|
| 49 |
+
| `press_media` | 1.0 | 19 |
|
| 50 |
+
| `referral_offer` | 1.0 | 19 |
|
| 51 |
+
| `seller_interest` | 1.0 | 20 |
|
| 52 |
+
| `spam` | 1.0 | 20 |
|
| 53 |
+
| `support_question` | 1.0 | 18 |
|
| 54 |
+
| `vendor_pitch` | 1.0 | 20 |
|
| 55 |
+
|
| 56 |
+
## Limits
|
| 57 |
+
|
| 58 |
+
- Trained only on invented text from templates, with test sentences built from templates it never saw. Real text varies far more.
|
| 59 |
+
- Never use it alone to suppress a real message: an `opt_out` or `spam` guess should be confirmed by a person.
|
| 60 |
+
- A score of 1.0 on generated text says little about real text: the test sentences are new templates, but they are written in the same plain style. Test it on a labelled sample of your own.
|
| 61 |
+
- This model is not legal advice and not a certification. A person should review its output before anything is shared or decided, and your counsel decides what a rule requires.
|
| 62 |
+
|
| 63 |
+
## Read more
|
| 64 |
+
|
| 65 |
+
- [Contact AI Training Data Broker](https://aitrainingdatabroker.com/contact/?utm_source=huggingface&utm_medium=model&utm_campaign=inbound-inquiry-intent-classifier)
|
| 66 |
+
- [The referral program](https://aitrainingdatabroker.com/referral-program/?utm_source=huggingface&utm_medium=model&utm_campaign=inbound-inquiry-intent-classifier)
|
| 67 |
+
- [Free tools](https://aitrainingdatabroker.com/tools/?utm_source=huggingface&utm_medium=model&utm_campaign=inbound-inquiry-intent-classifier)
|
| 68 |
+
|
| 69 |
+
## License and credit
|
| 70 |
+
|
| 71 |
+
Apache 2.0. Please credit **AI Training Data Broker** and link to https://aitrainingdatabroker.com/ when you share or build on it.
|
| 72 |
+
|
| 73 |
+
## About
|
| 74 |
+
|
| 75 |
+
AI Training Data Broker is a broker and technical advisor for companies that sell or license their data to AI labs. It guides the technical side, including export, format, de-identification and compliance, and publishes free guides, checklists and tools.
|