Skip to main content
Good classes give you accurate reports. This page shows which method to pick for a new class and how to write class descriptions that work, with an example and ideas from real projects. To create groups and classes, see Manage groups and Manage classes.

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")
Start with Description. Switch to Regex, Filter or Customized only when you need an exact rule.

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

  1. Start the way Nebuly expects. For User query: “Inquiries where the user…” or “When the user…”. For Agent answer: “The assistant…”.
  2. One subject per class, in one sentence, with a matching name.
  3. Including: list edge cases you want in.
  4. Excludes: list similar cases you want out.
  5. Don’t send readers to other classes. Write “Excludes refund requests”, not “those go to Refunds”. Then make sure Refunds includes them.
  6. Fix both sides. When two classes overlap, edit both together.
  7. 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.”
“My flight was cancelled, can I get my money back?” fits both. Neither total is reliable.

Attempt 3: clear, no overlaps

ClassDescription
Flight disruptionsInquiries where the user asks about a delay or a cancellation decided by the airline. Excludes requests to be rebooked or refunded.
RebookingInquiries where the user asks to be moved to another flight, including after a delay, a cancellation or a missed connection.
RefundsInquiries where the user asks for money back or for the status of a refund, including after a cancelled flight.
Unexpected chargesInquiries where the user asks about a charge they don’t recognise or think is wrong. Excludes refund requests.
Booking changesInquiries where the user asks to change the date, time or passenger name of a booking. Excludes changes caused by a disruption.
Lost or damaged baggageInquiries where the user reports a bag that is missing, late or damaged.
Why it works
  • 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.
Now Lena sees that Refunds is growing fastest, and that most refund requests follow cancellations. She knows what to fix first.

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

  1. 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.
  2. 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.
  3. Check the first real interactions after launch, and refine with the steps above.
  4. Don’t judge results on dev or staging. There isn’t enough traffic. Use them only to check your setup.

Ideas from real projects

IdeaHow to build it
Off-topicA 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 intentsSplit support into hardware support, lifetime support and buying a new device. Purchase intents with high error rates point to unmet demand.
Commercial signalsUpsell, churn and channel deflection (“the bot sends the user to the app”), on User query.
Assistant behaviourClasses on Agent answer, such as a silent fallback: the bot answers about a different time period without telling the user.
Wrong routingDescribe what should go where, so mistakes show up as a class.
Work vs personal useFor internal assistants: off-topic or personal-use classes, left out of ROI.