Prompt

How do I set up topic modeling software for extracting themes from support tickets?

Latest observation

Jul 19, 2026 · OpenAI APIWeb search: off

Here’s a practical way to set up topic modeling for support tickets, from raw ticket text to usable themes.

1) Clarify the goal

Decide what you want the model to produce:

  • Broad themes: “login issues,” “billing problems,” “feature requests”
  • Operational categories: “password reset,” “payment failure,” “bug report”
  • Trend monitoring: how themes change over time
  • Routing/triage support: help agents classify incoming tickets

For support tickets, the best results usually come from topic modeling plus some manual labeling, not fully automatic topics alone.


2) Choose the right approach

Classic topic modeling often uses:

  • LDA (Latent Dirichlet Allocation)
    Good for large corpora, but can be weak on short texts like tickets.

Better options for support tickets:

  • BERTopic
    Uses embeddings + clustering; often works much better for short, messy text.
  • NMF (Non-negative Matrix Factorization)
    Simple and often effective with TF-IDF.
  • Guided / semi-supervised topic modeling
    If you already know some themes, you can steer the model.

If your tickets are short and varied, I’d usually start with BERTopic.


3) Collect and clean the data

Export ticket data with at least:

  • ticket ID
  • subject/title
  • body/description
  • tags or category if available
  • timestamp
  • resolution / status

Cleaning steps

  • Remove duplicates
  • Strip signatures, disclaimers, and canned text
  • Combine subject + body
  • Normalize casing
  • Remove obvious noise:
    • emails
    • URLs
    • tracking IDs
    • long signatures
  • Consider anonymizing personal data

Example text after cleanup:

“Unable to reset password after clicking email link. Error says token expired.”


4) Preprocess carefully

For topic modeling, you typically want:

  • Tokenization
  • Lowercasing
  • Stopword removal
  • Lemmatization or stemming
  • Optional bigrams/trigrams

But don’t over-clean support tickets. Important phrases like:

  • “credit card”
  • “log in”
  • “two factor”
  • “error code”

should be preserved as multi-word terms if possible.

Useful extra steps:

  • Add domain stopwords like:
    • “please”
    • “thank”
    • “help”
    • “ticket”
    • “issue”
    • “customer”
  • Preserve product names and feature names

5) Pick software

Common options:

Python

Best flexibility.

Libraries:

  • BERTopic
  • scikit-learn
  • gensim
  • spaCy
  • sentence-transformers

Typical stack for support tickets:

  • pandas for data
  • spaCy for preprocessing
  • sentence-transformers for embeddings
  • BERTopic for modeling

No-code / low-code tools

If you want something easier:

  • KNIME
  • RapidMiner
  • Orange
  • BI platforms with text analytics add-ons

These are faster to start with, but less flexible.


6) Example setup with BERTopic in Python

A minimal workflow:

import pandas as pd
from bertopic import BERTopic

# Load data
df = pd.read_csv("tickets.csv")
docs = (df["subject"].fillna("") + " " + df["body"].fillna("")).tolist()

# Build model
topic_model = BERTopic(language="english", min_topic_size=20)
topics, probs = topic_model.fit_transform(docs)

# View topics
topic_model.get_topic_info()

Useful settings to tune

  • min_topic_size: controls how small a topic can be
  • nr_topics: reduce number of topics if too many are created
  • calculate_probabilities=True: for confidence scores
  • custom vectorizer_model: for stopwords and n-grams

Example with custom n-grams:

from sklearn.feature_extraction.text import CountVectorizer

vectorizer_model = CountVectorizer(
    stop_words="english",
    ngram_range=(1, 2),
    min_df=5
)

topic_model = BERTopic(vectorizer_model=vectorizer_model, min_topic_size=20)

7) Evaluate the topics

Topic modeling is only useful if humans can interpret the results.

Check:

  • Do the top words make sense?
  • Are topics distinct or too overlapping?
  • Are there too many “miscellaneous” tickets?
  • Do themes align with known support categories?

Practical evaluation methods

  • Manually review top 20 tickets per topic
  • Compare with existing support labels
  • Measure coherence if available
  • Ask support agents whether topics are meaningful

8) Refine the model

Common refinements:

  • Add domain stopwords
  • Merge similar topics
  • Remove very rare terms
  • Use better embeddings
  • Separate by product line or ticket type
  • Filter by language if multilingual

BERTopic supports topic reduction and merging, which is useful if the output is too fragmented.


9) Operationalize it

Once the model is good enough:

  • Run it on new tickets daily or weekly
  • Assign topic labels automatically
  • Track topic volume over time
  • Build dashboards for:
    • top emerging issues
    • spikes in complaints
    • recurring bugs
  • Use it to support escalation and root-cause analysis

10) Recommended starting architecture

A solid, practical setup:

  1. Export tickets from Zendesk/Jira/Freshdesk/etc.
  2. Clean and normalize text
  3. Combine subject + body
  4. Use BERTopic with custom stopwords
  5. Review and manually name topics
  6. Save topic labels to your ticket system or warehouse
  7. Monitor topic trends in a dashboard

Quick recommendation

If you want the simplest strong solution for support tickets:

  • Use Python
  • Start with BERTopic
  • Add domain-specific stopwords
  • Review topics manually
  • Use the topics for reporting and trend detection, not as final truth

If you want, I can also give you:

  1. a step-by-step Python setup guide,
  2. a sample notebook, or
  3. advice tailored to Zendesk/Jira/Freshdesk tickets.

Observation history

Unlock observation history

Create a free Obsurfable account to unlock historical responses, model comparisons, and deeper brand intelligence.

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, and Meta AI.