Generative AI-based dialogue generation and optimization in the style of traditional Chinese opera Dream of the Red Chamber using K-means Clustering
This study proposes a generative artificial intelligence framework that integrates prompt engineering and K-means clustering to generate stylized dialogues from the tradition of Dream of the Red Chamber. The prompts for each character were constructed from the linguistic features of classical texts, and each generated sentence was encoded into semantic, lexical, and keyword-based features. K-means clustering was used to identify stylistic categories, and the number of clusters was validated using the Elbow Method and the Silhouette Coefficient. Evaluation used BLEU, Perplexity, and a custom Style Consistency Score. As a result, the K-means-enhanced model improved fluency and style consistency over the baseline. This method provides a quantitative approach to improving generative models in traditional cultural domains.
Authors
- Adzrool Idzwan bin Ismail (ORCID: https://orcid.org/0009-0001-0584-7118)
- Z. S. Xu (ORCID: https://orcid.org/0000-0002-2511-4675)
Publication Details
- Journal
- Environment and Social Psychology
- Published
- 2025-09-24
- DOI
- https://doi.org/10.59429/esp.v10i9.4081
- Primary Topic
- Educational Technology and Pedagogy
- Type
- article
- Field-Weighted Citation Impact
- 0.00