# TR-GPT-CF: A Topic Refinement Method Using GPT and Coherence Filtering
## 1 Introduction and State of the Art
These projections are useful for displaying the semantic relationship between distinct words within a topic, providing a clearer grasp of their interconnection. By allowing users to engage with the visual representations of topics, a visual analytics framework enhances this method. This interactivity enables users to change these models to improve the topic depending on their personal knowledge and interpretation. This engagement includes adding, removing or repositioning words within the concept space. Another study [36] also leveraged user feedback to refine topics. This approach focuses on a mixed-initiative approach where both the user and the system collaborate to refine topic models dynamically. The refining process starts with the initial creation of a topic, applying conventional topic modeling methods. Users engage with the model by making changes and offering comments on the topics produced after the first generation of models. The system then analyzes this user feedback to learn their preference and adjust its algorithms based on the user preference model. The system has six agents to support various refinement operations, including combining similar topics by identifying and combining the topics that are most similar to one another. On the other hand, the Split agent divides a topic into two distinct new topics. The remaining agents remove topics, reinsert small topics, reinsert outliers, and reinsert the worst topics. Additionally, ref. [37] presents a unique approach to refining topic models by emphasizing key phrases, instead of specific words or whole documents. The system initially extracts key phrases from the documents using an RNN-based encoder-decoder model. LDA is used as an initial topic model to obtain topic words. A function to remove and add key phrase refinement was proposed to identify documents that should be added or removed from the specified topic. Rather than changing the list of top words, the proposed method directly modifies the document topic association by considering the key phrases as a representative overview of the documents. Unlike the research discussed above, study [38] outlines a novel technique for enhancing topic models customized for short texts. This approach introduces topic refinement, a model-agnostic mechanism that utilizes the functionalities of large language models (LLMs) to enhance topics post-extraction. The method systematically generates prompts to query LLMs for each topic. It gradually chooses a word as the possible intruder word in a topic, while the other words represent that topic. Then, it evaluates whether the word aligns with the semantic expression of the other words. Once alignment is verified, the word is retained; otherwise, the coherence word will be provided as a candidate to substitute for the intruder word. In this work, we introduce TR-GPT-CF, a novel approach for post-extraction topic refinement to improve coherence and interpretability. This method does not engage in the preliminary modeling of topics but focuses on enhancing topics post-extraction. Our strategy focuses on detecting words that are not semantically related to the other word in the topic, which we named'misaligned word', and then substituting them with alternatives suggested by the WordNet and GPT model. The process starts by extracting topics using a topic model method such as LDA or BERTopic. From these generated topics, we detect the misaligned word using Z-score-based cosine similarity of each topic word from the topic centroid. Subsequently, the word most similar to the topic centroid is selected as the basis for generating alternative words from the WordNet and GPT model. Words with the highest coherence score are chosen as candidates to replace the misaligned word. Evaluation across several datasets demonstrates that our method significantly improves topic coherence, offering an effective solution for achieving more interpretable and semantically coherent topics.