chtmp223/topicGPT
A prompt-based framework that uses large language models to perform topic modeling on text collections.

TopicGPT leverages LLMs through structured prompting to generate hierarchical topics from documents. It implements a multi-stage pipeline: generating high-level topics with generate_topic_lvl1, creating sub-topics with generate_topic_lvl2, refining topics by merging similar ones, assigning topics to input text with supporting quotes, and correcting assignments for consistency. The framework supports multiple LLM backends including OpenAI API, VertexAI, Azure, Gemini, and vLLM for local GPU inference.