[Paper Review] TopicGPT: A Prompt-based Topic Modeling Framework
TopicGPT uses prompt-based large language models to generate and assign interpretable topics from a text corpus, achieving higher alignment with human-ground-truth topics than LDA and BERTopic, and supporting topic refinement and hierarchy without retraining.
Topic modeling is a well-established technique for exploring text corpora. Conventional topic models (e.g., LDA) represent topics as bags of words that often require "reading the tea leaves" to interpret; additionally, they offer users minimal control over the formatting and specificity of resulting topics. To tackle these issues, we introduce TopicGPT, a prompt-based framework that uses large language models (LLMs) to uncover latent topics in a text collection. TopicGPT produces topics that align better with human categorizations compared to competing methods: it achieves a harmonic mean purity of 0.74 against human-annotated Wikipedia topics compared to 0.64 for the strongest baseline. Its topics are also interpretable, dispensing with ambiguous bags of words in favor of topics with natural language labels and associated free-form descriptions. Moreover, the framework is highly adaptable, allowing users to specify constraints and modify topics without the need for model retraining. By streamlining access to high-quality and interpretable topics, TopicGPT represents a compelling, human-centered approach to topic modeling.
Motivation & Objective
- Develop a human-centric topic modeling framework that yields interpretable topics with natural language labels and descriptions.
- Leverage iterative LLM prompting to generate and refine topics from a sample of documents without retraining.
- Provide document-topic assignments with supporting quotes to enhance verifiability of results.
- Enable a hierarchical extension to explore subtopics and finer granularity when needed.
- Assess robustness, stability, and alignment of topic outputs against ground-truth human annotations.
Proposed method
- Iteratively prompt an LLM to generate topics from a sample of documents and existing seed topics.
- Refine topics by merging near-duplicates and removing infrequent topics using embeddings and a frequency threshold.
- Optionally extend to a topic hierarchy by prompting for subtopics grounded in associated documents.
- Assign documents to topics via LLM prompts that return a topic label, description, and supporting quotation.
- Incorporate a self-correction step to fix hallucinations and formatting issues in topic assignments.

Experimental results
Research questions
- RQ1Do TopicGPT-generated topics align more closely with human-annotated ground-truth topics than LDA and BERTopic across datasets?
- RQ2How robust are TopicGPT outputs to prompt variations, sample selections, and open vs. closed-source LLMs?
- RQ3Can TopicGPT reliably produce interpretable topics with natural language labels and descriptive quotes that support assignments?
- RQ4Does extending TopicGPT to a hierarchical structure improve the granularity and usefulness of topics?
- RQ5What is the impact of seed-topic quality and quantity on topic coherence and alignment?
Key findings
- TopicGPT shows higher topical alignment with ground-truth labels than LDA and BERTopic across Wiki and Bills datasets (e.g., Wiki P1=0.73, ARI=0.58, NMI=0.71; Bills P1=0.57, ARI=0.42, NMI=0.47 in default settings).
- Refinement improves interpretability and reduces misaligned topics (e.g., refined Wiki P1=0.74, ARI=0.60; refined Bills P1=0.57, ARI=0.40).
- TopicGPT assignments remain stable across varied prompts and data samples, with performance comparable or better than LDA on alignment metrics; running the pipeline twice yields high stability (P1=0.95, ARI=0.92, NMI=0.92).
- Open-source LLMs can handle topic assignment (e.g., Mistral-7B-Instruct performs reasonably well for assignment), but open-source models struggle for topic generation compared to GPT-4.
- TopicGPT produces semantically closer topics to ground truth than LDA in both unrefined and refined forms, with refinement substantially reducing misaligned topics.
- Hierarchical TopicGPT can generate informative subtopics grounded in parent topics and their documents, enabling richer analysis.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.