Abstract
Creative writing instruction plays a crucial role in developing students’ linguistic and cognitive abilities. However, challenges such as lack of engagement, difficulty in idea generation, and limited stylistic diversity hinder students from fully expressing their thoughts. Artificial intelligence (AI) offers a promising solution to enhance writing quality and creativity. This study aims to develop an AI-assisted creative writing framework by integrating GPT-4 with Innovative Locust Swarm Optimization (ILSO) to generate more engaging, coherent, and stylistically rich text tailored to students’ writing levels. A dataset of student-written essays, novels, and poetry was collected for training. Pre-processing techniques, including text normalization and tokenization, were applied to refine the input text. Feature extraction was performed using Word2Vec embedding to enhance semantic understanding. GPT-4 generates adaptive text suggestions, while ILSO optimizes model hyperparameters to refine text coherence, creativity, and narrative flow. The optimized model adapts to individual writing styles, offering dynamic suggestions that encourage creativity while maintaining fluency. The ILSO algorithm fine-tunes the generation process by enhancing text structuring and thematic consistency. The proposed method was implemented using Python 3.10.1. Experimental results demonstrate that the optimized GPT model significantly improves coherence scores, stylistic variation, thematic consistency, writing proficiency, and engagement rates. However, concerns regarding AI dependency and originality necessitate a balanced integration of AI-assisted and traditional writing pedagogy. This study provides a foundation for future adaptive AI-driven creative writing instruction, with potential extensions including real-time feedback systems and self-learning mechanisms for personalized writing enhancement.
Keywords
Introduction
Artificial intelligence (AI) serves as a revolutionary force that affects various academic fields by transforming human interactions with information and content creation. Generative Pre-trained Transformers (GPTs) have demonstrated powerful text generation abilities, producing human-like content and maintaining meaningful conversations to assist writers with different tasks. 1 GPT-based AI tools that create contextual content with coherent outputs have become essential in creative writing education, constituting innovative ways for students to enhance their creative abilities while increasing their engagement. 2 This academic practice is undergoing a transformation that contrasts established teaching methods, including direct instruction, group work, and independent learning. Assessing AI-powered writing assistants within the educational curriculum has become increasingly important. 3
Creative writing is an academic discipline that nurtures imagination while improving linguistic and critical thinking skills. Traditional educational approaches require prolonged guidance and multiple rounds of feedback, along with several text revisions, for students to enhance their writing competencies. In this context, GPT is bringing groundbreaking changes by providing automatic suggestions, developing plot ideas to enhance writing style, and offering both syntax corrections and grammatical assistance. 4 GPT-3 has been shown to elevate student confidence and motivation during writing, thereby fostering a more engaging interactive experience. The level of student engagement in creative writing is dependent on intrinsic motivation and self-assurance, which is often supported through relevant feedback. 5 GPT facilitates interactive dialogue and generates diverse writing ideas, proving effective in bridging the gap between students and personalized learning approaches. The tool aids in generating innovative ideas while students seek language refinement, receiving specific suggestions about tone, vocabulary, and organizational structure. 6 AI-generated feedback serves as an additional resource beyond instructor feedback, helping students enhance their drafts rapidly and efficiently. 7
The feasibility of GPT integration in writing curricula is influenced by a variety of variables across educational settings. Factors such as students’ digital proficiency, network accessibility, and instructors’ readiness to employ AI educational techniques impact the effectiveness of GPT implementation. 8 The multilingual capabilities of GPT models assist non-native English speakers in overcoming language barriers, promoting a more inclusive creative writing educational experience. GPT-powered platforms employ interactive features that enable students to improve monotonous writing tasks related to content development. 9 GPT-based writing tools provide equal writing assistance opportunities through their cost-effective, scalable features. While practical applications of GPT exist in creative writing instruction, ethical concerns and issues surrounding teaching practices remain. The vast amounts of human-written text available allow AI models to exhibit cultural biases that can affect student writing. Nonetheless, implementing GPT within creative writing instruction provides access to high-quality writing support through its inherent capabilities. 10 GPT functions as an enhancement tool that works in conjunction with human instruction. Educators should leverage AI’s capabilities to facilitate discussions about narrative techniques and conduct assessments comparing human and AI writing, thereby helping students evaluate AI’s creative potential. Furthermore, educators could design instructional activities that combine GPT with traditional teaching practices by implementing structured writing tasks. 11 In creative writing exercises, students may become excessively reliant on AI-generated content, potentially undermining their critical thinking and independence.
The goal of this study is to develop a framework that combines ILSO and GPT-4 into an AI-assisted creative writing framework to produce more engaging, cohesive, and stylistically rich content that is appropriate for students’ writing levels. The main contributions of this work are: • Develop an AI-assisted writing framework that generates contextually appropriate, stylistically diverse text. • Optimize narrative coherence and thematic consistency through swarm intelligence algorithms. • Evaluate pedagogical impacts on student engagement and expressive competence.
Related works
Applications of artificial intelligence (AI) have been widely implemented across educational domains to enhance learning outcomes and customize pedagogical approaches. Notably, Generative Pre-trained Transformer (GPT) models have emerged as significant tools in this transformation. Campino 12 employed transformer-based models to distinguish between human-authored and AI-generated texts, demonstrating superior precision in AI-generated content detection. Building on this foundation, Liu et al. 13 investigated the integration of generative AI in English as a Foreign Language (EFL) writing processes. Their analysis of reflective procedures, multimodal compositions, and hierarchical text generation revealed that students increasingly utilized AI assistance to develop coherent arguments and substantiate sub-claims, ultimately producing higher-quality written outputs. The growing societal demand for multidisciplinary geospatial data utilization has prompted innovations in AI-driven information retrieval systems. Li and Zhang 14 developed a framework enabling users to access heterogeneous datasets through keyword queries or interface-based selection mechanisms. Concurrently, advancements in natural language processing (NLP) have expanded the capabilities of language models, particularly in automated translation, sentiment analysis, text classification, and response generation. Bevilacqua et al. 15 conducted comparative evaluations of human-generated content versus GPT outputs, revealing significant implications for automated text scoring systems and highlighting challenges in maintaining assessment integrity amid proliferating AI-generated content.
The extraction of structured information from unstructured professional texts presents persistent challenges in data processing. Kim et al. 16 systematically evaluated GPT-3.5 and GPT-4’s performance in clinical text analysis, identifying task-specific decoding strategies to address model limitations in specialized domains. Their findings emphasized GPT’s potential in enhancing diagnostic data extraction accuracy. In pedagogical contexts, Robillos 17 implemented a GPT-based process-oriented writing framework, demonstrating significant improvements in students’ organizational coherence, content development, and argumentation skills through structured drafting and revision phases. The proliferation of large language models (LLMs) has sparked critical examinations of their operational characteristics and societal impacts. Ragsdale and Boppana 18 analyzed GPT’s text generation patterns, revealing both its capacity for human-like interaction and inherent limitations in predictable output generation. Babaei and Giudici 19 conducted comparative analyses of LLM performance in financial decision-making contexts, finding comparable efficacy between GPT models and traditional logistic regression in binary classification tasks for mortgage lending.
Multimodal AI applications have further extended GPT’s utility across technical domains. Busch et al. 20 validated GPT-4’s multilingual speech-to-text capabilities, achieving low error rates and robust semantic comprehension in cross-linguistic medical report generation. Lee et al. 21 explored sustainable implementations of GPT in educational discourse, identifying both opportunities and challenges in maintaining pedagogical integrity within AI-enhanced adaptive learning environments. Empirical investigations into LLM applications continue to reveal expansive use cases. Filippo et al. 22 proposed a data-driven taxonomy of LLM functionalities, demonstrating their versatility across creative and analytical domains through comprehensive task analysis. Comparative studies by Deveci et al. 23 revealed GPT-4’s superior performance in readability metrics relative to human-authored texts, though comparable proficiency in inquiry-based text generation. The integration of GPT in language education has yielded particularly promising results. Guo et al. 24 documented significant improvements in EFL students’ collaborative writing competencies through chatbot-mediated regulative writing patterns and iterative feedback processes. Almasre 25 developed a GPT-4-powered assessment tool for typography education, demonstrating enhanced evaluation consistency and design feedback quality. However, Akpan et al. 26 cautioned against uncritical adoption through multidisciplinary case studies, identifying risks of AI misuse and underscoring the need for ethical implementation frameworks in educational technologies.
The integration of GPT technology in creative writing pedagogy presents novel opportunities to enhance student engagement and writing proficiency. While conventional instructional methods often struggle to sustain learner attention and foster innovative thinking, GPT’s narrative generation capabilities offer mechanisms to stimulate creative ideation. This study addresses critical gaps in understanding human-AI collaborative creativity, examining both the pedagogical potential and implementation challenges of GPT-assisted writing frameworks. Specifically, it evaluates GPT’s capacity to augment written creativity development while maintaining essential human-centric educational values.
Proposed methodology
The Chat-GPT student essay dataset was collected from Kaggle. Data pre-processing was conducted to refine the raw data using techniques such as text normalization and tokenization. Word2Vec embeddings were employed for feature extraction to enhance semantic comprehension. The AI-assisted creative writing framework integrates GPT-4 with ILSO to generate engaging, cohesive, and stylistically rich text that is appropriate for students’ writing levels. While ILSO refines text coherence, creativity, and narrative flow by optimizing model hyperparameters, GPT-4 produces adaptive text recommendations. Figure 1 illustrates the overall flow of GPT in creative writing. Overall flow of the GPT on creative writing.
A dataset comprising 1500 student-written texts (essays, short stories, and poetry) was sourced from Kaggle, with metadata including student demographics (40% Asian, 30% European, 20% North American, 10% other regions) and genre distribution (800 essays, 450 short stories, 250 poems). The dataset spans diverse proficiency levels (beginner: 35%, intermediate: 50%, advanced: 15%) and includes AI-generated feedback for comparative analysis. The dataset delivers essential value for educators and linguists to ensure how AI systems impact student writing abilities.
Source: https://www.kaggle.com/datasets/steubk/chatgpt-student-essay-study
Data processing was employed to preprocess the raw data, which involved data normalization and tokenization. The unprocessed data was transformed into a readable format through necessary data preprocessing stages, which are essential for data exploration. The collected data underwent various transformations, including encoding, feature selection, data cleaning (removing duplicates), feature scaling or normalization, and handling missing values.
The fundamental data transformation process of text normalization refines textual data, enhancing both machine readability and analytical clarity. The development of expressive competence through GPT in educational contexts requires text normalization, which prepares Natural Language Processing (NLP) applications. Text normalization standardizes written text to enable smoother NLP operations, achieving higher consistency and accuracy rates. Techniques may include converting text to lowercase, removing special characters, expanding contractions, and correcting misspellings.
Tokenization serves as a preprocessing method for improving creative writing instruction by organizing textual input that feeds GPT models. GPT significantly alters creative writing education because it increases student involvement by supplying immediate evaluations while developing writing concepts and enhancing writing style. Using the NLP approach of tokenization, a collection of texts was distinguished into meaningful words, clauses, signs, statements, and other parts. Through the conversion of unstructured material into a structured format, tokenization streamlines text analysis and facilitates the use of NLP techniques. Tokenization allows for improved comprehension and processing by maintaining the semantic linkages and context of words in sentences. Tokenization was necessary to convert unprocessed text into format.
Here, text normalization and tokenization were applied to refine the input text. Next, it describes the feature extraction of Word2Vec embedding to enhance semantic comprehension. Word2Vec combined with the GPT model ensures creative writing instruction by creating a modern way to boost student interest and writing skills. Word2Vec functions as a neural network-based model because it converts words to numerical vectors, which reveal semantic meanings between words. The application of this technology in creative writing enables educators to evaluate student writing and enhance both patterns and word selection in generated content. An independent toolkit known as Word2vec was used to create word vectors. Word2vec have the following properties, such as the vector proximity between the word vectors that might be used to quantify the connection between words. The gap between two word vectors was smaller and it might be semantically relevant to the words. Word2vec was often used for NLP applications such as text categorization, sentiment assessment, identical terms, and segmentation. Text summarizing constitutes word meanings and word similarities; however, the majority of these techniques categorize sentences based on textual characteristics, making them limited to specific texts and lacking generalizability. The text summarizing method could maintain the semantic connection between sentences to ascertain the degree based on Word2vec.
AI-assisted creative writing framework
The proposed AI-assisted creative writing framework integrates GPT-4 with ILSO, aimed at producing more engaging, cohesive, and stylistically rich text suitable for students’ writing levels. The prediction approach of this hybrid method involves two sequential components. Initially, GPT-4 is utilized to generate adaptive text suggestions. Subsequently, the Innovative Locust Swarm Optimization (ILSO) model is employed to fine-tune by enhancing text structuring.
The integration of GPT-4 with ILSO presented a hybrid approach to enhance creative writing. AI-driven frameworks empower students to develop confidence and fluency in their writing skills. A creative writing framework consists of NLP models, which help to ensure the text content. GPT-4 models speed up creative writing with the help of AI systems. The functionality of GPT models has a strong potential to enhance student learning through adaptive feedback and text coherence improvement. The ILSO algorithm allows the system to adapt its model outputs through learning patterns while tailoring responses to accommodate student-specific needs and writing capabilities. The ILSO mechanism enhances response quality through its examination of AI-generated feedback on student revisions, which results in a better framing process. This framework connects AI systems for writing tasks to boost creativity, working effectiveness, and idea creation support. GPT-4 operates in real-time with ILSO to reduce the duplicate AI-generated concepts, therefore developing more coherent and substantive student compositions. GPT4-ILSO collaboration extends text generation enhancement through continuous improvement of personalized assistance for students who simultaneously receive support for creativity alongside the preservation of original work. Through GPT-4’s partnership with ILSO, students obtain multiple narrative approaches together with innovative writing suggestions as well as structured feedback that enables them to creative writing. The hybrid model GPT4-ILSO enhances AI support for creative writing education framework through adaptable customization, which produces an advanced learning environment for students.
The initial component, GPT-4, generates adaptive text suggestions. By offering an interactive writing assistance model, GPT-4 provides instant feedback, generates writing ideas, and delivers stylistic recommendations that can spur creativity. Moreover, it encourages students to explore various writing styles, expand their vocabulary, and refine their skills. Furthermore, GPT-4 fosters a dynamic and personalized learning experience tailored to the needs of individual learners. The primary advantage of GPT-4 is its ability to produce text that is more customized and aligned with user requirements. It serves as a resource for students seeking knowledge or assistance in solving problems, while also acting as a tutor to help them understand complex concepts. Educators can utilize GPT-4 to analyze text produced by students, obtaining valuable insights into their development and identifying areas for improvement. Enhanced GPT-4 technology also enables language learners to engage in conversations, receiving automatically generated explanations in their target language. Additionally, students communicate with an AI chatbot powered by GPT-4 through text or voice. GPT-4 facilitates rapid and precise content creation, serving as a teaching assistant that offers feedback on assignments and supports creative writing endeavors. GPT-4-powered chatbots can interact with users in role-play scenarios, generating content accordingly.
The second component, ILSO, was used to refine text coherence, creativity, and narrative flow. ILSO optimizes personalized learning paths based on the collective intelligence of locust swarms. The students get flexible instruction that promotes participation and expressive proficiency. Through swarm-based optimization, the model improves writing exercises, guaranteeing steady skill development. Moreover, GPT’s capacity helps to examine and improve linguistic patterns and fosters creativity. This combination enhances writing skills while fostering critical thinking and self-expression, which makes learning more engaging and efficient. Swarm behavior acted as a stimulant for the algorithm. The ILSO algorithm fine-tunes the generation process by enhancing text structuring and thematic consistency. The ILSO algorithm uses a plantation as a computational space, and the individuals represent locusts that communicate with one another. According to the ILSO algorithm, every outcome in the solution region constitutes the locust position. A food quality index was taken by each locust species in relation to the remedy. Based on the behaviors, a group of evolutionary performers used to guide the individuals, imitating a variety of supporting actions, was often observed in the swarm. The ILSO technique has poor convergence and ultimate solutions in some optimization situations. To enhance the ILSO algorithm as feasible, it tackles two distinct techniques. Initially, the ILSO algorithm employs a quasi-oppositional learning method to accelerate its rate of convergence were expressed in equation (1).
Here, Flow chart of ILSO.
The GPT-4-ILSO hybrid approach establishes a new standard for creative writing education, bridging the gap between real human coaching and AI writing assistance. The proposed approach aims to enhance creative writing instruction, emphasizing student engagement and expressive competence. Algorithm 1 outlines the process of GPT-4-ILSO. ILSO parameters were empirically optimized through grid search on a validation subset (20% of the dataset): population_size = 50, iterations = 100, inertia_weight = 0.7, cognitive_coefficient = 1.5, social_coefficient = 1.5. This configuration balanced computational efficiency (training time <2 h) and optimization performance (89% convergence stability).
Experimental results
System configuration and specifications.
Linguistic comparison of student and AI-processed essays using tokenization.
Comparative word embedding results for student and AI-generated text.
A correlation matrix shows the correlation coefficients across multiple variables to understand the relationships between them. It is employed to discover patterns, trends and multicollinearity of variables. This matrix facilitates the identification of feature correlations, which could guide feature development and selection models. It was useful for visualizing and understanding the interrelationships and strengths of linguistic features in different models. Figure 3 represents the correlation matrix of linguistic markers. Correlation matrix of linguistic markers.
The accuracy graph in Figure 4(a) indicates drastic consistency and high accuracy during both the training and testing phases, thus indicating robust generalization in success. In the loss graphs, Figure 4(b) shows a very steep drop in training loss while testing loss, on the contrary, a slight oscillation was seen despite settling down, which resonated with the inherent complexity. Furthermore, a very small gap between training and testing loss indicates the controlled overfitting of the model. The observations confirm the model’s functions in AI-assisted creative writing by improving student participation and idea creation to constitute individualized creative writing. Graphical representation of (a) accuracy and (b) loss.
A written text receives coherence evaluation through a coherence score, which assesses its logical organization along with structural clarity. The measurement tool assesses the linking capacity between sentences and ideas, which results in a coherent direct thought progression. Stylistic variation helps to measure the writing style diversity and richness with the help of an AI system. It reflects the varieties of sentence structures, vocabulary, and patterns of individualized writing. Thematic consistency is a vital metric, which rates how neatly a piece of writing keeps at a single and unified theme contemporarily. Figure 5 illustrates the coherence score, stylistic variation, and thematic consistency. Table 4 represents the comprehensive performance metrics at different epoch levels. Graphical representation of coherence score, stylistic variation, and thematic consistency. Comprehensive performance metrics at different epoch levels.
Engagement rate was a critical metric used to measure the activity of students toward the AI-generated writing suggestions. It was usually expressed in percentage and computed by dividing the number of edits completed with the use of AI systems by the whole number of edits completed in a single writing session. Writing proficiency was an important metric used to determine the overall writing quality of students based on linguistic as well as stylistic factors, allowing educators to track the progress of writing skills within the multiple training epochs and reveal how the writing aids powered by AI assist in increasing the proficiency over time. Figure 6 represents the engagement rate and writing proficiency. Graphical representation of engagement rate and writing proficiency.
Discussions
The feasibility of GPT integration in writing curriculum needs diverse variables across educational settings. GPT-powered platforms use interactive features that allow students to create monotonous writing tasks regarding content development. The automated evaluation features of the GPT model of LLM face challenges in complex human creativeness, which could generate improper quality evaluations or classification errors. The involvement of AI in text scoring practices poses problems that threaten the analytical consistency in category assignment, mainly during assessments of creative and subjectively-based material. It fails to provide a comprehensive evaluation of the comparison between AI-produced writing and human-made content in diverse linguistic frameworks. Excessive usage of automated models in text assessment presents ethical difficulties as it could reduce human involvement in the decision-making process. To mitigate over-reliance on AI, we propose instructor guidelines such as (1) mandatory human review of AI-generated suggestions, (2) limiting AI usage to 3 prompts per draft, and (3) hybrid assessment rubrics evaluating both AI utilization (20% weight) and original content quality (80% weight). These measures preserve critical thinking while leveraging AI’s creative potential. It becomes less reproducible due to LLMs regularly updating their systems, which makes past evaluation techniques potentially irrelevant. To overcome this, the AI-assisted creative writing framework was developed by integrating GPT-4 with ILSO to generate more engaging, coherent, and stylistically rich to students’ writing levels. The suggested framework model helps to adapt the distinct writing styles, providing inventive recommendations that preserve fluidity while fostering creativity.
Conclusions
The GPT-based AI tools that produce contextual content with coherent outputs have become indispensable in creative writing education, enhancing students’ creative capabilities. AI presents a promising avenue to improve writing quality and creativity. The integration of GPT-4 and ILSO into an AI-assisted creative writing framework yields more engaging, cohesive, and stylistically rich content appropriate for students’ writing levels. The dataset collected from Kaggle enabled the implementation of data pre-processing techniques such as text normalization and tokenization to refine the input text. Feature extraction was performed using Word2Vec embedding to enhance semantic understanding, while GPT-4 generated adaptive text recommendations. ILSO optimized model hyperparameters to enhance text coherence, creativity, and narrative flow. Additionally, the ILSO algorithm fine-tuned the generation process through enhanced text structuring and thematic consistency. The proposed model adapts to individual writing styles, offers dynamic suggestions, encourages creativity, and maintains fluency. The method was implemented using Python 3.10. Experimental results illustrate that the optimized GPT model significantly enhances coherence scores, stylistic variation, thematic consistency, writing proficiency, and engagement rates. Nevertheless, concerns regarding AI dependency and originality highlight the necessity of balanced integration between AI-assisted and traditional writing pedagogy. This study lays the groundwork for future developments in adaptive AI-driven creative writing instruction, with potential extensions involving real-time feedback systems and self-learning mechanisms for personalized writing enhancement.
Limitations and future scope
The GPT models are capable of producing text that was logical and appropriate for the context, and it might not be able to capture the complexity of human creativity, feelings, and subtle narrative. An excessive reliance to GPT-generated material might hinder students’ capability of creative ideas. Future scope moving towards the development of AI systems that offer adaptive feedback to assist students and improve their writing capabilities while retaining their imaginative writing.
Footnotes
Funding
The author received no financial support for the research, authorship, and/or publication of this article.
Declaration of conflicting interests
The author declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Data Availability Statement
The authors declare that the data supporting the findings of this study are available within the article. The raw/derived data supporting the findings of this study are available from the corresponding author at request.
