Practical overview
When it fits
Use TopicGPT when a document collection needs exploratory topic analysis and the resulting clusters should be investigated or adjusted through natural-language interaction.
Who it is for
- Researchers analyzing themes across a text corpus
- Analysts who need to inspect and refine topic clusters
- Python developers building LLM-assisted text-mining workflows
Documented uses
- Cluster documents and extract representative topic words
- Generate readable descriptions for identified topics
- Ask questions to retrieve detailed information from documents associated with a topic
- Compare or restructure topics through splitting, combining, adding or deleting them
Requirements & limits
The library is installable through PyPI and the public repository is MIT-licensed. The documented workflow requires an OpenAI API key for embeddings and prompts; an Azure OpenAI configuration is also shown.
- TopicGPT requires an LLM API credential for embeddings and prompts.
- The README says fitting may take from a few minutes to several hours, depending on corpus size and whether embeddings are supplied.
- The example allows a fixed topic count or HDBSCAN to determine the number of topics automatically.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install TopicGPT and prepare a document corpus
Set up the Python library and prepare text in the input format shown in the repository example.
Before you start
- Python environment
- A corpus represented as a list of strings, with one document per string
- An OpenAI API key, or Azure OpenAI credentials and endpoint details for the documented Azure configuration
Steps
Install the package with the command below.
pip install topicgptPrepare the corpus as a list of document strings, removing empty documents if needed.
Initialize
TopicGPTwith the relevant API key and select a topic count, or configure the Azure endpoint as shown in the README.
Expected outcome
The library is installed and the model is configured with a text corpus format and LLM credentials for the next documented stage, fitting the model.
Guide limitations
- This guide covers installation, corpus preparation and initialization, not model fitting or analysis.
- The API key is needed to compute embeddings and execute prompts.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 14 October 2026
- Original website title
- ArikReuter/TopicGPT · Official homepage title · retained in its source language

