Which method to select when creating new classes
Ask yourself one question: can you describe the class in words, or is it an exact rule?Description: describe it in words
Use it for most classes. You explain what belongs in the class, and Nebuly matches interactions by meaning, in any wording or language.Examples
- Refund requests: “Inquiries where the user asks for money back or for the status of a refund.”
- Assistant refuses: “The assistant says it can’t help with the request.”
Regex: match exact text
Use it when the class is defined by a precise pattern, such as a code or a name.Examples
- Order numbers:
ORD-\d{6} - Product mentioned:
(?i)pro plan|enterprise plan
Filter: reuse what Nebuly already knows
Use it to build a class from existing Nebuly filters. The result is deterministic: an interaction is in the class when it matches the filters.Examples
- Frustrated users:
User emotion = Frustrated - Mobile traffic: a tag filter such as
channel = mobile_app
Customized: combine conditions
Use it when one method isn’t enough. Combine descriptions, regex and filters with AND and OR, and nest them in groups.Example
- Angry billing complaints:
User emotion = Frustrated AND (description matches a billing issue OR regex matches "refund|charge")
Why good descriptions matter
- Overlapping classes split your data. If two classes fit the same interaction, it can land in either one, or in Other. Neither total can be trusted.
- Vague classes catch everything. They keep growing and hide the real trends.
Rules for a good description
- Start the way Nebuly expects. For User query: “Inquiries where the user…” or “When the user…”. For Agent answer: “The assistant…”.
- One subject per class, in one sentence, with a matching name.
- Including: list edge cases you want in.
- Excludes: list similar cases you want out.
- Don’t send readers to other classes. Write “Excludes refund requests”, not “those go to Refunds”. Then make sure Refunds includes them.
- Fix both sides. When two classes overlap, edit both together.
- Don’t create an “Other” class. Nebuly already has one.
Example: from a first draft to a good taxonomy
Brightwing Airways, an invented airline, connects its chatbot to Nebuly. Lena, who leads customer care, writes the Topic classes.Attempt 1: too vague
Lena reuses her team’s email categories: “Travel issues: problems during the journey”, “Customer service: general requests”, “Other requests: anything else”.- Almost anything fits “Travel issues” or “Customer service”.
- “Other requests” copies Nebuly’s own Other.
- The descriptions don’t start the way Nebuly expects.
Attempt 2: clear, but overlapping
Lena rewrites each class more precisely. Two still overlap:- Flight disruptions: “Inquiries where the user asks about a delay or a cancellation decided by the airline, and what they can do about it.”
- Refunds: “Inquiries where the user asks for money back or for the status of a refund.”
Attempt 3: clear, no overlaps
| Class | Description |
|---|---|
| Flight disruptions | Inquiries where the user asks about a delay or a cancellation decided by the airline. Excludes requests to be rebooked or refunded. |
| Rebooking | Inquiries where the user asks to be moved to another flight, including after a delay, a cancellation or a missed connection. |
| Refunds | Inquiries where the user asks for money back or for the status of a refund, including after a cancelled flight. |
| Unexpected charges | Inquiries where the user asks about a charge they don’t recognise or think is wrong. Excludes refund requests. |
| Booking changes | Inquiries where the user asks to change the date, time or passenger name of a booking. Excludes changes caused by a disruption. |
| Lost or damaged baggage | Inquiries where the user reports a bag that is missing, late or damaged. |
- No overlaps. Including and Excludes keep related classes apart.
- A clear rule for mixed messages. When a user describes a problem and asks for something, the request wins.
- No catch-all. What fits nothing goes to Other.
Improving a first draft
1
Read real interactions
Read 20 to 30 interactions the class should catch. Also read the near misses: similar ones that ended up in another class.
2
Turn near misses into rules
Add the recurring ones as Including or Excludes lines.
3
Update related classes
If another class overlaps, edit it at the same time.
4
Test on recent data
Reprocess the last 7 days and check the result before going further back.
Classes for a feature that isn’t launched yet
- Guess how users will ask about it, in their words, not your internal feature name. Also guess how the assistant will reply when it can’t help yet.
- Write the class on User query, or on Agent answer for fallback replies. If the feature has a unique name, add a regex condition with OR.
- Check the first real interactions after launch, and refine with the steps above.
- Don’t judge results on dev or staging. There isn’t enough traffic. Use them only to check your setup.
Ideas from real projects
| Idea | How to build it |
|---|---|
| Off-topic | A Topic class that describes your domain, such as “anything not about the software, the company or microscopy”. Teams can then filter it out. |
| More detailed intents | Split support into hardware support, lifetime support and buying a new device. Purchase intents with high error rates point to unmet demand. |
| Commercial signals | Upsell, churn and channel deflection (“the bot sends the user to the app”), on User query. |
| Assistant behaviour | Classes on Agent answer, such as a silent fallback: the bot answers about a different time period without telling the user. |
| Wrong routing | Describe what should go where, so mistakes show up as a class. |
| Work vs personal use | For internal assistants: off-topic or personal-use classes, left out of ROI. |