Manuscript Offprint

arXiv:2609.31460

Segment-Level Agentic Topic Modeling for Improved Data Exploration and Resource Efficiency

Myeongjun Erik Jang, Antonios Georgiadis, Sae Young Moon, Fran Silavong

Abstract

Topic modeling is an effective technique for discovering hidden themes within documents and is widely used in text mining and data analysis across a variety of industry sectors. Recently, large language model (LLM)-based topic models have been emerged that prompt LLMs to generate topics then assign the topics to documents, producing more natural and human-readable topics than conventional topic modeling algorithms. However, the nature of topic assignment process causes certain drawbacks, such as the incapability to produce topic distributions over a document, too broad or narrow topics, and high resource consumption, which increases with the number and length of documents being assigned topics. These issues are particularly critical for industrial applications, which require high-quality, in-depth analysis and the processing of large volumes of documents. In this context, this paper introduces a framework called SeLATM, which addresses these concerns by employing segment-level topic generation and topic refinement through agentic feedback loops. Experimental results on various datasets demonstrate that SeLATM significantly reduces the LLM resources compared to methods based on topic assignment process, while maintaining superior performance.

1. Introduction

Topic modeling is a Natural Language Processing (NLP) technique designed to discover meaningful topics within a corpus, which has a broad range of practical usage for data explorations in research and industry (Ranaei et al., 2017; Asmussen & Møller, 2019; Xiong et al., 2019). Recent advances in large language models (LLMs) have further propelled progress in this area. Compared to conventional methods such as LDA (Blei et al., 2003), which represent a topic as distributions over words, these approaches prompt LLMs to generate free-text topics and assign the topic to individual documents (Pham et al., 2024; Lam et al., 2024; Mu et al., 2024; Doi et al., 2024; Liu et al., 2025; Moon et al., 2026), resulting in more comprehensive and human-understandable topics.

Although, LLM-driven topic generation and assignment methods provide significant benefits for the intuitiveness of topic representations, they are limited in their ability to capture document-topic relations. It is natural for a document to cover multiple topics. For example, a monthly financial report may address topics such as interest rates, global events, and political changes, with varying amounts of content devoted to each topic. Conventional topic modeling methods can capture this information, as they represent each document as a distribution over multiple topics. In contrast, LLM-based approaches typically assign only a single topic to each document (Lam et al., 2024; Liu et al., 2025; Moon et al., 2026); even when multi-topic assignment is supported, these methods cannot precisely quantify how much each topic contributes to a document, limiting interpretability for data exploration. Also, the topic assignment process is highly resource-intensive, as it requires labeling topics to each individual document. Consequently, the LLM call cost O(N×L)O(N \times L) where N and L imply the number of documents and the document length. This poses a significant challenge for real-world industrial applications that process large volumes of data, particularly in sectors handling long documents, such as finance (Masry & Hajian, 2024; Hu et al., 2025) and legal (Chalkidis et al., 2022; Jang & Stikkel, 2024).

Furthermore, current LLM-based topic modeling approaches pay limited attention to topic refinement, either neglecting it at all (Mu et al., 2024; Doi et al., 2024) or focusing solely on topic merging to reduce overlap (Pham et al., 2024; Liu et al., 2025; Moon et al., 2026). However, there is a potential risk that the generated topics maybe less coherent and could be further divided into smaller, more distinct topics. Additionally, relying solely on topic merging can result in ambiguous and vague topics. For example, consider two

1^{1}J.P. Morgan Chase, London, United Kingdom. Correspondence to: Myeongjun Erik Jang myeongjun.jang@jpmorganchase.com, Fran Silavong fran.silavong@jpmorganchase.com.

Preprint. September 28, 2026.

topics, TAT_A and TBT_B, each comprising several subtopics ( tit_i): TA={ti,1≤i≤5}T_A = \{t_i, 1 \leq i \leq 5\} and TA={ti,3≤i≤7}T_A = \{t_i, 3 \leq i \leq 7\}, respectively. Let us assume that the existing topic-merging methods combine these topic due to a significant overlap of 60%. This results in a mega-topic T={ti,1≤i≤7}T = \{t_i, 1 \leq i \leq 7\}, which could be too broad and incoherent, especially if subtopics t1t_1 and t2t_2 are distinct from t6t_6 and t7t_7. Instead, it would be more natural to separate t3t_3, t4t_4, t5t_5 from TAT_A and TBT_B, create a new topic, and then decide whether to merge it with the closer of TAT_A or TBT_B; if not, the new topic should remain separate.

To this end, we propose a novel LLM-driven agentic topic modeling algorithm called SELATM (Segment Level Agentic Topic Modelling). As we regarded topic assignment as a major bottleneck of modern LLM-driven topic modeling, we remove this step from our pipeline. Instead, to facilitate accurate topic naming from the outset, we introduce segment-level topic modeling, in which documents are divided into segments and topic names are assigned at the level of segment clusters. Owing to the semantic conciseness of text segments and their benefit to alleviate LLMs' limitations when handling long contexts (Liu et al., 2024; Zhou et al., 2024), our method can produce more precise topic names than previous approaches. In addition, our framework represents documents as distributions over multiple topics, allowing the contribution of each topic to a document and the association of specific content with corresponding topics, while also reducing computational costs. Furthermore, inspired by recent progress in iterative refinement via LLM-driven feedback loops (Madaan et al., 2023; Yuksel et al., 2025; Ravi et al., 2025), we propose an agentic topic refinement process. In this framework, evaluator agents assess the quality of generated topics, operator agents apply topic split and merge operations based on the feedback from the evaluator, and a planner agent determines whether additional refinement iterations are required. To the best of our knowledge, this work is the first to explore the use of refinement-based feedback loops for topic modeling. Prior LLM-based topic modeling approaches have been less amenable to such iterative refinement, as repeated topic assignment can substantially increase computational cost. Experiments on multiple public and industry datasets suggest that SELATM yields higher-quality topics while remaining resource-efficient, thereby helping to mitigate the aforementioned concerns.

References (40)

  • Distributed representations of topics (opens arXiv in a new tab)
  • Contextual token embeddings are all you need
  • a practical topic modelling approach to exploratory literature review
  • Journal of machine Learning research, 3(Jan): 993–1022, 2003
  • A benchmark dataset for legal language understanding in English
  • Long-Form Narrative Document Segmentation
  • (eds.), Findings of the Association for Computational Linguistics: EMNLP 2024, pp. 6473–6486, Miami, Florida, USA, November 2024
  • Neural computation, 23(9):2421–2456, 2011
  • Retrieval-Augmented Generation for Large Language Models: A Survey
  • BERTopic: Neural topic modeling with a class-based TF-IDF procedure
  • Routledge, 4 edition, 2013
  • EMNLP 2022, pp. 5321–5344, Abu Dhabi, United Arab Emirates, December 2022
  • A benchmark for evaluating large language models on long-text financial documents
  • Journal of classification, 2:193–218, 1985
  • Aligning judgment bias of LLM-as-judge with humans in industry applications
  • Association for Computational Linguistics
  • Analyzing unstructured text with high-level concepts using lloom
  • Advances and challenges
  • How language models use long contexts
  • Iterative refinement with self-feedback
  • A multimodal document understanding model for long financial domain documents (opens arXiv in a new tab)
  • Using patterns of thematic progression for building a table of contents of a text
  • which algorithms implement ward's criterion? Journal of classification, 31(3):274–295, 2014
  • A prompt-based topic modeling framework
  • A case study in pharmaceutical industry
  • Journal of the American Statistical Association, 66(336):846–850, 1971
  • Improving llm-generated code and tests through automated iterative feedback loops
  • The Bell system technical journal, 27(3):379–423, 1948
  • Few-shot grounded planning for embodied agents with large language models
  • Psychological methods, 9(3):386, 2004
  • Journal of machine learning research, 3(Dec):583–617, 2002
  • Penguin, 2007
  • CoRR, 2024
  • Advances in Neural Information Processing Systems, 36:75993–76005, 2023
  • is a correction for chance necessary? In Proceedings of the 26th Annual International Conference on Machine Learning, ICML '09, pp. 1073–1080, New York, NY, USA, 2009
  • Computers & Industrial Engineering, 135: 333–347, 2019
  • Auto-differentiate any llm workflow (opens arXiv in a new tab)
  • differentiation (opens arXiv in a new tab)
  • PhD thesis, University of Minnesota, USA, 2005
  • Openreview, 2024