Topic Modeling
Use this sub-skill for BERTopic lifecycle work when the task is about building or changing a topic model rather than choosing embeddings, tuning c-TF-IDF/vectorizers, labeling topics, plotting, or saving models.
Covered workflows
- Construct BERTopic with default or custom reducer/cluster components.
- Fit,
fit_transform,transform, andpartial_fiton documents, precomputed embeddings, or image-aligned inputs. - Run guided, supervised, semi-supervised, manual, zero-shot, online, and multimodal fitting variants.
- Query topics, frequencies, documents, representative docs, and topic search results.
- Reduce, merge, delete, and outlier-correct topics.
- Merge multiple fitted models.
- Inspect parameter state with
get_params.
Not covered here
- Embedding backend selection or download troubleshooting.
- c-TF-IDF/vectorizer tuning, seed-word weighting, or online vocabulary tuning details.
- Topic representation and labeling models.
- Visualizations, comparison plots, or downstream analysis.
- Save/load, hub publishing, or other serialization paths.
Working notes
fit/fit_transformacceptdocuments, optionalembeddings, optionalimages, and optionaly.partial_fitis the streaming path; use a reducer and clusterer that supportpartial_fit.transformonly works on fitted models with an inference-capable cluster path.find_topicsneeds a liveembedding_model; if you only have precomputed embeddings, provide a local offline embedder or route the request elsewhere.reduce_outliersreturns a new topic list; if you need refreshed representations afterward, hand that job to the vectorizer/representation sub-skill.merge_topics,delete_topics, andreduce_topicsmutate the fitted model in place and updatetopic_mapper_.partial_fittracks the current batch intopics_; keep your own history if you need a cumulative stream view.imagesare supported for fit-time and transform-time multimodal workflows;partial_fitdoes not take images.
References
references/api-reference.mdreferences/workflows.mdreferences/troubleshooting.mdscripts/smoke_topic_model.py