Trustworthiness of Children Stories Generated by Large Language Models (2023)

Abstract: Large Language Models (LLMs) have shown a tremendous capacity for generating literary text. However, their effectiveness in generating children’s stories has yet to be thoroughly examined. In this study, we evaluate the trustworthiness of children’s stories generated by LLMs using various measures, and we compare and contrast our results with both old and new children’s stories to better assess their significance. Our findings suggest that LLMs still struggle to generate children’s stories at the level of quality and nuance found in actual stories.

## introduction advancements in pretrained large language models (llms) like gpt-3 @xcite and llama @xcite , have made it easier to generate natural language text for a variety of downstream tasks, including generating narrative text like children's stories. the ability to generate natural text using llms has seen substantial improvement with the innovation of instructionfollowing models like instructgpt @xcite and alpaca @xcite , resulting in a better alignment with user intentions. these systems are being used as a generalpurpose chat-bots by the general public. as these models are integrated more into everyday applications, it is crucial to continuously evaluate llms' performance to ensure that they are indeed trustworthy and accurate. trustworthiness in the case of llms is a broad term that refers to reliability and confidence in the generated text outputs along with their suitability for a specific downstream task. a trustworthy llm minimizes errors, biases, and potentially harmful 1 code and dataset are publicly available: https://github.com/prabin525/trustworthiness-of-childrenstories-generated-by-llms content while consistently producing clear and contextually suitable text. with the advancing capabilities of llms, concerns regarding their trustworthiness have arisen. notably, they are being used more frequently to support creative writing @xcite , raising concerns about the generation of inappropriate or offensive text (price, 2016) and biased content @xcite . one domain in which trustworthiness is of particular importance is text generation intended for children. this paper seeks to evaluate the trustworthiness of children's stories generated by llms including generative llms and instruction following models. in the case of text generation geared towards children, llms' ability to generate age-appropriate materials to target audiences also becomes a vital aspect of overall trustworthiness. to assess the trustworthiness of llms in generating children's stories, we use two open-source foundation language models, opt @xcite and llama @xcite , along with an instruction-following model alpaca @xcite to generate children's stories. then, we compare these generated stories against actual children's stories, old and modern. our assessment takes into account a number of aspects, including statistics derived from the text like the flesch reading ease score @xcite , toxicity present in the text, the most influential topics present in the text, and the sentence structure of these texts. our findings reveal that llms lack a high level of trustworthiness when tasked with generating children's stories. while the generated children's stories do share similarities in topics and patterns with the actual stories (mostly modern ones), they are also susceptible to generating toxic content. moreover, llms struggle to capture the intricacies and nuances of children's literature, evident from the disparity in sentence structure between the generated and actual stories. ## methodology to investigate the trustworthiness of children's stories generated by llms, we compare them with actual old and modern children's stories. we collect a diverse set of stories from different sources, including both older stories such as folktales, and more recent children's stories. we use both llms and instruction-following models to generate stories with different prompt lengths and instruction templates. as story generation is an open-ended problem with no reference text, we rely on other metrics instead of any automatic measure of evaluation like bartscore @xcite or bertscore @xcite . we use various metrics to compare the generated stories with actual stories, including in-text statistics such as sentence length and a measure of toxicity in the text, as well as an evaluation of topics covered in these stories. furthermore, we analyze and compare the grammatical structures of the stories using dependency structures extracted from both the original and the artificially generated stories. in the following section, we describe the experimental setup, including details on the collected data, the story generation process, and the evaluation metrics used for comparison. subsequently, we present the results obtained from our experimentation. ## generated stories share main topics with original stories after preprocessing the data, the original stories were found to have four major topics. all of the topics tended to share the existence of some small character. the first topic mentions elements such as time, goodness, and greatness, and the presence of words like head, round, night, and water likely indicate specific scenes or settings within the narrative. the second topic contained new elements like a prince, the color white, a girl, and eyes. these additional keywords suggest different perspectives within the overarching narrative. the third topic introduces elements like a house and a heart. like the previous topics, it shares mentions of a little character, time, goodness, and a prince. the difference between 'house' and 'heart' could indicate a change in the setting or moral of the narrative. the last topic introduces new elements of wolf, people, eyes, and a mother. these keywords might suggest narratives that introduce new characters and themes. overall, these topics provide insight into the underlying themes present in the older 122 stories in the data set. the topics revolve around narratives involving a small character, time, goodness, and various other elements such as princes, nights, water, girls, and wolves. comparatively, the topics of the generated stories obtained from opt, llama, and alpaca show minor differences. the first topic suggests a narrative that involves characters like kings, mothers, princes, and princesses. it also mentions elements of time, goodness, greatness, and shadow. the prince, princess, and shadow hint at the fairy tale or fantasy theme. the second topic shares similarities with the previous topic, with a focus on little, prince, time, goodness, and greatness, but it also introduces new elements like eyes, houses, heads, and the color white. these additions suggest different scenes, perhaps removed from the monarchy or castle theme, and suggest a different narrative. the third topic seems to center around family dynamics, with mentions of mothers, fathers, and children. it also includes keywords relating to time, goodness, night, and poverty. this suggests a change in the narrative away from the fantasy-focused topic. the last topic includes keywords like little, time, and goodness. it includes elements of fathers, eyes, and houses. the presence of 'long' and 'night' suggests a different tone or atmosphere within the narrative. these general results show remarkable similarity the plot shows that the most shared topics (x:2, y:2) include 'white', 'world', 'great', 'water', 'black', 'house', 'little', 'king', 'called', and 'good'. the least shared topics (x:1, y:1) include 'heart', 'head', 'poor', 'house', 'looking', 'children', 'good', 'young', 'lady', and 'night'. with the data set on which the llms were trained. the topics revolve around narratives involving characters such as kings, princes, mothers, fathers, and children. the topics also touched upon topics of time, goodness, greatness, poverty, and setting elements of houses, nights, and the color white. as with toxic content testing, we ran topic modeling for a small number (10) of modern stories in order to compare the general topics that are currently aimed at children. the first topic includes keywords related to spatial orientation (right, inside, door, left), objects (ream, head, frog), time, and actions (started). the keyword 'eyes' may suggest a focus on visual perception or observation. the second topic emphasizes time, objects (ream, door), spacial orientation (right, inside), a frog, a head, fairies, and 'need'. the presence of fairies introduces a fantastical or imaginative element to the topic. the third topic revolves around time, spacial orientation (right, inside, door), physical attributes (head, eyes, long, hand), and a frog. the inclusion of 'long' might suggest a temporal or duration-related aspect. the last topic highlights time, spatial orientation (right, inside, door), objects (ream, frog), physical attributes (head, eyes, small), and the action of starting something. the modern stories' topic modeling results suggest a re-curring theme involving concepts such as time, spatial orientation, objects, and actions. each topic emphasizes different aspects and introduces additional elements like fairies or physical attributes. figure 4 represents the level of similarity and difference between the real stories and the llm-generated stories. there are greater similarities between these stories than there appear to be differences in the main topics. as expected, the results of the topic modeling showed similarities between the original 122 stories in the training corpus and the stories generated by the llms. these stories shared fairy tale and fantasy elements as well as topics of goodness, greatness, time, and setting elements of night, houses, and the color white. once we compare this with the modern stories, we see that the focus of the small data set we have is similarly focused on time and fairies, but has more topics relating to spatial orientation. we are likely seeing a change in the content of stories written for children. with only ten modern stories, we cannot reliably generalize over all stories, but we noticed tendencies such as that the modern story set did tend to involve more overtly educational elements aimed at younger age groups when compared to the older stories. ## generated stories do not have similar sentence structure to original stories the stories generated by alpaca have a slightly higher overlap with modern stories compared to ## conclusion and future work our study examines the trustworthiness of children's stories generated by large language models. while these generated stories may share similar topics and patterns with actual stories, they fail to capture all the nuances present in children's literature, and may even contain toxic material that is inappropriate for children. based on our findings, we conclude that llms are not yet appropriate for generating high-quality children's literature. moving forward, we plan to extend our work by implementing reinforcement learning with both automatic and human feedback to improve the quality of llm-generated children's stories. bhandari has been partially supported by the national science foundation grant no. iis-2127901. our sincere appreciation goes to antonios anastasopoulos and géraldine walther for their valuable suggestions and unwavering support throughout the course of this research.