Contextual Fine-Tuning of Language Models with Classifier-Driven Content Moderation for Text Generation
In today’s digital age, ensuring the appropriateness of content for children is crucial for their cognitive and emotional development. The rise of automated text generation technologies, such as Large Language Models like LLaMA, Mistral, and Zephyr, has created a pressing need for effective tools to...
Saved in:
| Main Authors: | , |
|---|---|
| Format: | Article |
| Language: | English |
| Published: |
MDPI AG
2024-12-01
|
| Series: | Entropy |
| Subjects: | |
| Online Access: | https://www.mdpi.com/1099-4300/26/12/1114 |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| _version_ | 1850050896463921152 |
|---|---|
| author | Matan Punnaivanam Palani Velvizhy |
| author_facet | Matan Punnaivanam Palani Velvizhy |
| author_sort | Matan Punnaivanam |
| collection | DOAJ |
| description | In today’s digital age, ensuring the appropriateness of content for children is crucial for their cognitive and emotional development. The rise of automated text generation technologies, such as Large Language Models like LLaMA, Mistral, and Zephyr, has created a pressing need for effective tools to filter and classify suitable content. However, the existing methods often fail to effectively address the intricate details and unique characteristics of children’s literature. This study aims to bridge this gap by developing a robust framework that utilizes fine-tuned language models, classification techniques, and contextual story generation to generate and classify children’s stories based on their suitability. Employing a combination of fine-tuning techniques on models such as LLaMA, Mistral, and Zephyr, alongside a BERT-based classifier, we evaluated the generated stories against established metrics like ROUGE, METEOR, and BERT Scores. The fine-tuned Mistral-7B model achieved a ROUGE-1 score of 0.4785, significantly higher than the base model’s 0.3185, while Zephyr-7B-Beta achieved a METEOR score of 0.4154 compared to its base counterpart’s score of 0.3602. The results indicated that the fine-tuned models outperformed base models, generating content more aligned with human standards. Moreover, the BERT Classifier exhibited high precision (0.95) and recall (0.97) for identifying unsuitable content, further enhancing the reliability of content classification. These findings highlight the potential of advanced language models in generating age-appropriate stories and enhancing content moderation strategies. This research has broader implications for educational technology, content curation, and parental control systems, offering a scalable approach to ensuring children’s exposure to safe and enriching narratives. |
| format | Article |
| id | doaj-art-4714738971ea48aaa38cc870b2ee7838 |
| institution | DOAJ |
| issn | 1099-4300 |
| language | English |
| publishDate | 2024-12-01 |
| publisher | MDPI AG |
| record_format | Article |
| series | Entropy |
| spelling | doaj-art-4714738971ea48aaa38cc870b2ee78382025-08-20T02:53:19ZengMDPI AGEntropy1099-43002024-12-012612111410.3390/e26121114Contextual Fine-Tuning of Language Models with Classifier-Driven Content Moderation for Text GenerationMatan Punnaivanam0Palani Velvizhy1Department of Computer Science and Engineering, College of Engineering Guindy, Anna University, Chennai 600025, IndiaDepartment of Computer Science and Engineering, College of Engineering Guindy, Anna University, Chennai 600025, IndiaIn today’s digital age, ensuring the appropriateness of content for children is crucial for their cognitive and emotional development. The rise of automated text generation technologies, such as Large Language Models like LLaMA, Mistral, and Zephyr, has created a pressing need for effective tools to filter and classify suitable content. However, the existing methods often fail to effectively address the intricate details and unique characteristics of children’s literature. This study aims to bridge this gap by developing a robust framework that utilizes fine-tuned language models, classification techniques, and contextual story generation to generate and classify children’s stories based on their suitability. Employing a combination of fine-tuning techniques on models such as LLaMA, Mistral, and Zephyr, alongside a BERT-based classifier, we evaluated the generated stories against established metrics like ROUGE, METEOR, and BERT Scores. The fine-tuned Mistral-7B model achieved a ROUGE-1 score of 0.4785, significantly higher than the base model’s 0.3185, while Zephyr-7B-Beta achieved a METEOR score of 0.4154 compared to its base counterpart’s score of 0.3602. The results indicated that the fine-tuned models outperformed base models, generating content more aligned with human standards. Moreover, the BERT Classifier exhibited high precision (0.95) and recall (0.97) for identifying unsuitable content, further enhancing the reliability of content classification. These findings highlight the potential of advanced language models in generating age-appropriate stories and enhancing content moderation strategies. This research has broader implications for educational technology, content curation, and parental control systems, offering a scalable approach to ensuring children’s exposure to safe and enriching narratives.https://www.mdpi.com/1099-4300/26/12/1114large language models (LLMs)supervised fine tuningtext classificationBERTgenerative modelsdeep learning |
| spellingShingle | Matan Punnaivanam Palani Velvizhy Contextual Fine-Tuning of Language Models with Classifier-Driven Content Moderation for Text Generation Entropy large language models (LLMs) supervised fine tuning text classification BERT generative models deep learning |
| title | Contextual Fine-Tuning of Language Models with Classifier-Driven Content Moderation for Text Generation |
| title_full | Contextual Fine-Tuning of Language Models with Classifier-Driven Content Moderation for Text Generation |
| title_fullStr | Contextual Fine-Tuning of Language Models with Classifier-Driven Content Moderation for Text Generation |
| title_full_unstemmed | Contextual Fine-Tuning of Language Models with Classifier-Driven Content Moderation for Text Generation |
| title_short | Contextual Fine-Tuning of Language Models with Classifier-Driven Content Moderation for Text Generation |
| title_sort | contextual fine tuning of language models with classifier driven content moderation for text generation |
| topic | large language models (LLMs) supervised fine tuning text classification BERT generative models deep learning |
| url | https://www.mdpi.com/1099-4300/26/12/1114 |
| work_keys_str_mv | AT matanpunnaivanam contextualfinetuningoflanguagemodelswithclassifierdrivencontentmoderationfortextgeneration AT palanivelvizhy contextualfinetuningoflanguagemodelswithclassifierdrivencontentmoderationfortextgeneration |