Case Study - A magical, AI-powered storyteller
A father's dragon name generator evolved into an AI-powered story creator, delighting kids with personalized tales of mythical beasts.
- Client
- Bits&Letters
- Year
- Service
- AI development
The Problem
One day, my then-8 year old, dragon-obsessed daughter had been playing with random name generators, and she asked me if I could make one for dragons. So I did. She gave me a list of words to use as the different parts of the dragon's name, and I used a simple random number generator to pick a good name.
She was delighted, and asked if a random number generator like that could be used to generate a whole story. At first I said no way, you'd need a lot more words to make a whole story, even a short one. Then I realized that, actually, you could do it if you had a large language model.
The Solution
The first version of the dragon generator used my random number generator to create a name, then fed the name into OpenAI's API to generate a story. As we went, my daughter kept wanting to stop and read the stories, and also wanted to send them to her friends. So I added a lightweight MySQL database layer to save each story, and a little admin page so she could browse and read all of them.
In addition to the MySQL database hosted at Planetscale, the site was based on Next.js and hosted on Vercel, with Tailwind CSS for styling and Google Fonts for, well, the fonts.
Since the dragon generator was first deployed in 2023 there, AI models from OpenAI and Anthropic have advanced greatly. On the less fun side, Planetscale discontinued its free tier in 2024, and I ran out of OpenAI credits, leaving the site unusable state…
Version 2.0
UNTIL NOW! Version 2.0 of the dragon generator uses Anthropic's Claude 3.5 Sonnet model to generate stories. Unlike the first version, input from the user to customize the prompt and generate a more interesting story. Our Claude API calls also incorporate a system prompt with context about our AI author's style and influences, as well as parameters to control the length and creativity of the generated story.
Dragon Stories is live at dragongenerator.fun.
- Generative AI
- Frontend Development
- React
- User Experience