urchade commited on
Commit
1e2df4e
·
verified ·
1 Parent(s): ee4abe5

Explain each classification use case on the model card

Browse files
Files changed (1) hide show
  1. README.md +31 -3
README.md CHANGED
@@ -56,6 +56,8 @@ model = AutoExtractor.from_pretrained("fastino/GLiNER2.5-Decide")
56
 
57
  ### Customer support intent
58
 
 
 
59
  ```python
60
  model.classify_text(
61
  "My subscription renewed on April 15 for ¥5,400 after the service was already down. Can I get that charge refunded?",
@@ -68,6 +70,8 @@ model.classify_text(
68
 
69
  ### Banking request
70
 
 
 
71
  ```python
72
  model.classify_text(
73
  "The transfer I sent this morning is still pending, and I think I used the wrong sort code. Can you stop it and add Emily as the beneficiary instead?",
@@ -80,6 +84,8 @@ model.classify_text(
80
 
81
  ### Travel request
82
 
 
 
83
  ```python
84
  model.classify_text(
85
  "I need to move my Friday flight to Paris to Saturday morning, same cabin, and keep the aisle seat if you can.",
@@ -89,6 +95,8 @@ model.classify_text(
89
 
90
  ### Clinic request
91
 
 
 
92
  ```python
93
  model.classify_text(
94
  "The rash came back after the antibiotics finished. Can I get a same-week appointment with dermatology, or should I just refill the cream?",
@@ -101,6 +109,8 @@ model.classify_text(
101
 
102
  ### Review sentiment
103
 
 
 
104
  ```python
105
  model.classify_text(
106
  "Battery dies before lunch, but the keyboard and the screen are the best I have used on a laptop.",
@@ -110,7 +120,7 @@ model.classify_text(
110
 
111
  ### Product aspects
112
 
113
- Several labels can apply at once. Set `multi_label` and a threshold.
114
 
115
  ```python
116
  model.classify_text(
@@ -125,6 +135,8 @@ model.classify_text(
125
 
126
  ### News topic
127
 
 
 
128
  ```python
129
  model.classify_text(
130
  "The central bank held rates and said inflation is still above target, pushing bank stocks lower in afternoon trading.",
@@ -134,6 +146,8 @@ model.classify_text(
134
 
135
  ### Document type
136
 
 
 
137
  ```python
138
  model.classify_text(
139
  "INVOICE 1842\nBill to: Northstar QA\nAmount due: 2,400 USD\nDue: 30 April 2026\nWire instructions are on page 2.",
@@ -143,7 +157,7 @@ model.classify_text(
143
 
144
  ### Email triage
145
 
146
- One call can score several heads on the same message.
147
 
148
  ```python
149
  model.classify_text(
@@ -158,6 +172,8 @@ model.classify_text(
158
 
159
  ### Ticket routing
160
 
 
 
161
  ```python
162
  model.classify_text(
163
  "[subject] 401k deduction missing from this paystub\n[body] Last month's contribution posted. This month the line is gone and HR told me to open a ticket.",
@@ -170,6 +186,8 @@ model.classify_text(
170
 
171
  ### Handoff to a person
172
 
 
 
173
  ```python
174
  model.classify_text(
175
  "This is the third time I have explained the same missing refund. Stop the bot and get me a person.",
@@ -179,6 +197,8 @@ model.classify_text(
179
 
180
  ### Did the agent finish?
181
 
 
 
182
  ```python
183
  model.classify_text(
184
  "Goal: email the Q4 summary to every partner.\nLast action: draft saved in the hub.\nSend button is still disabled because two partners have no address.",
@@ -188,6 +208,8 @@ model.classify_text(
188
 
189
  ### Moderation
190
 
 
 
191
  ```python
192
  model.classify_text(
193
  "Post the customer's home address in the public thread so everyone can see where the package actually went.",
@@ -197,6 +219,8 @@ model.classify_text(
197
 
198
  ### Incident severity
199
 
 
 
200
  ```python
201
  model.classify_text(
202
  "The deploy left resource tags inconsistent across staging. Production checkout is unaffected. No customer reports yet.",
@@ -206,7 +230,7 @@ model.classify_text(
206
 
207
  ### Urgency score
208
 
209
- Ordinal labels are plain strings.
210
 
211
  ```python
212
  model.classify_text(
@@ -217,6 +241,8 @@ model.classify_text(
217
 
218
  ### Spam or not
219
 
 
 
220
  ```python
221
  model.classify_text(
222
  "Your mailbox is almost full. Click here in the next hour or we will delete every message.",
@@ -226,6 +252,8 @@ model.classify_text(
226
 
227
  ### Several decisions at once
228
 
 
 
229
  ```python
230
  model.classify_text(
231
  "Guest in room 1408 says the AC has been out since yesterday and they want to move tonight or leave. They also asked for the incidentals hold to be released.",
 
56
 
57
  ### Customer support intent
58
 
59
+ Route a live message before a human ever sees it. Refunds, cancellations, login failures, and shipping delays share one inbox and one label set. Decide picks the action the queue should take, so the right workflow starts on the first turn.
60
+
61
  ```python
62
  model.classify_text(
63
  "My subscription renewed on April 15 for ¥5,400 after the service was already down. Can I get that charge refunded?",
 
70
 
71
  ### Banking request
72
 
73
+ A single customer message often mixes a failed payment, a beneficiary change, and a fee question. The label set is the product catalog: transfers, cards, fraud, mortgages. The model maps the utterance onto the operation the core system should open.
74
+
75
  ```python
76
  model.classify_text(
77
  "The transfer I sent this morning is still pending, and I think I used the wrong sort code. Can you stop it and add Emily as the beneficiary instead?",
 
84
 
85
  ### Travel request
86
 
87
+ Booking, changing, cancelling, and seat requests look similar in free text and trigger different inventory calls. Use this when a chat or email has to become a structured booking action without a form.
88
+
89
  ```python
90
  model.classify_text(
91
  "I need to move my Friday flight to Paris to Saturday morning, same cabin, and keep the aisle seat if you can.",
 
95
 
96
  ### Clinic request
97
 
98
+ Patients describe symptoms and the thing they want in the same sentence: an appointment, a refill, a result, a referral. Front-desk routing needs that distinction before anyone is put on a schedule.
99
+
100
  ```python
101
  model.classify_text(
102
  "The rash came back after the antibiotics finished. Can I get a same-week appointment with dermatology, or should I just refill the cream?",
 
109
 
110
  ### Review sentiment
111
 
112
+ Star ratings hide mixed reviews. A product can be praised and rejected in one paragraph. A four-way sentiment label is what a dashboard, a reply policy, or a ranking feature actually needs.
113
+
114
  ```python
115
  model.classify_text(
116
  "Battery dies before lunch, but the keyboard and the screen are the best I have used on a laptop.",
 
120
 
121
  ### Product aspects
122
 
123
+ Sentiment says the review is mixed. Aspects say why: battery, keyboard, screen. Several labels apply at once, so this head is multi-label. That is the input to aspect-level analytics and to a reply that mentions the right part of the product.
124
 
125
  ```python
126
  model.classify_text(
 
135
 
136
  ### News topic
137
 
138
+ Wire copy, alerts, and scraped headlines have to land in a section before they are ranked or summarized. The label set is the section list of the product, not a fixed taxonomy baked into the model.
139
+
140
  ```python
141
  model.classify_text(
142
  "The central bank held rates and said inflation is still above target, pushing bank stocks lower in afternoon trading.",
 
146
 
147
  ### Document type
148
 
149
+ Inboxes and shared drives mix invoices, contracts, resumes, and notes. Classifying the document is the gate in front of extraction: an invoice goes to payables, a contract goes to review, a resume goes to screening.
150
+
151
  ```python
152
  model.classify_text(
153
  "INVOICE 1842\nBill to: Northstar QA\nAmount due: 2,400 USD\nDue: 30 April 2026\nWire instructions are on page 2.",
 
157
 
158
  ### Email triage
159
 
160
+ A shared mailbox needs three answers before a message is filed: what the sender wants, how soon it matters, and which team owns it. One call scores all three heads on the same text, so the router does not run the model three times.
161
 
162
  ```python
163
  model.classify_text(
 
172
 
173
  ### Ticket routing
174
 
175
+ Employees describe a problem, not a department. Payroll, benefits, IT access, and facilities share the same portal. The queue label is the assignment, so the ticket opens in the right team instead of bouncing through a dispatcher.
176
+
177
  ```python
178
  model.classify_text(
179
  "[subject] 401k deduction missing from this paystub\n[body] Last month's contribution posted. This month the line is gone and HR told me to open a ticket.",
 
186
 
187
  ### Handoff to a person
188
 
189
+ Most turns should stay automated. A repeated complaint, an explicit request for a human, or a case the bot cannot close should leave the flow. This is the yes/no gate in front of an agent queue.
190
+
191
  ```python
192
  model.classify_text(
193
  "This is the third time I have explained the same missing refund. Stop the bot and get me a person.",
 
197
 
198
  ### Did the agent finish?
199
 
200
+ A trace can look busy and still be incomplete: a draft saved, a button disabled, a required field empty. Supervisors and eval harnesses need a finish decision from the goal plus the last state, not from whether the model stopped talking.
201
+
202
  ```python
203
  model.classify_text(
204
  "Goal: email the Q4 summary to every partner.\nLast action: draft saved in the hub.\nSend button is still disabled because two partners have no address.",
 
208
 
209
  ### Moderation
210
 
211
+ User content and model output both need a policy decision before they are shown or acted on. The labels are the policy, from allow through personal data, harassment, scam, and spam, so a filter can block, redact, or escalate.
212
+
213
  ```python
214
  model.classify_text(
215
  "Post the customer's home address in the public thread so everyone can see where the package actually went.",
 
219
 
220
  ### Incident severity
221
 
222
+ Pages and deploys produce more notes than pages. Severity is what decides whether this wakes someone up. Staging-only tag drift is not a production checkout failure, and the label should say so.
223
+
224
  ```python
225
  model.classify_text(
226
  "The deploy left resource tags inconsistent across staging. Production checkout is unaffected. No customer reports yet.",
 
230
 
231
  ### Urgency score
232
 
233
+ Some queues want a rank, not a bucket. Pass `"0"` through `"5"` as ordinary strings. A payroll cutoff before 5pm and a typo in a wiki page should not receive the same score, and the label is what the SLA system reads.
234
 
235
  ```python
236
  model.classify_text(
 
241
 
242
  ### Spam or not
243
 
244
+ The first filter on an inbox or a comment stream. Phishing and mailbox-full lures should never reach the intent router. A two-label decision keeps that check cheap enough to run on every message.
245
+
246
  ```python
247
  model.classify_text(
248
  "Your mailbox is almost full. Click here in the next hour or we will delete every message.",
 
252
 
253
  ### Several decisions at once
254
 
255
+ Real requests carry more than one fact. A guest can need a room move, a billing release, and a maintenance ticket in the same call. Intent, priority, a human gate, and multi-label topics are scored together, which is how a property system opens the right work orders without a chain of prompts.
256
+
257
  ```python
258
  model.classify_text(
259
  "Guest in room 1408 says the AC has been out since yesterday and they want to move tonight or leave. They also asked for the incidentals hold to be released.",