How it began - Mapping a young crane
As a joint Christmas present, my family has taken sponsorship of Fietje, a young crane. This includes a small GPS device that sends regular updates on the cranes whereabouts to a database. As simple as it began, this became a rabbit hole and cumulated in the creation of a generative AI-backed alter ego for the young crane on Amazon Web Services (Bedrock), so that the crane can tell about its (imaginary?) adventures.
But lets start at the beginning. The access to data and importing into a mapping application being tedious for my family, I just wanted to give them a simpler access to it. The simplest here was to send email. Having some experience with mapping through leaflet.js and adding svg from my hiking paths, I decided to create a small html page showing the most recent and historical flight paths.
The advantage of the leaflet solution was that it uses only native python libraries (and a lot of string magic). Together with a low memory footprint, it was therefore easy to bring to AWS Lambda. Retrieving the data via a RestAPI was fortunately possible as well, so making Fietje send email with maps and a generic text was straightforward using Amazon Simple Email Service. Since I really like Google Groups to manage email distribution lists, this was a great way to create a flexible distribution.
What it became - Making a conversational crane AI
As a professional generative AI practitioner, I then started to get ideas. What if Fietje could tell about its adventures, distribute funfacts on cranes and develop a personality. To make it short, it became a wild goose hunt that ended with python code and a boto3-call to Amazon Bedrock (serverless access to generative AI models on AWS).
Bird personality
Ultimately, I picked Amazon Nova Lite (a very cost-efficient and fast LLM from Amazon suitable for conversational settings and many languages) and the bird got the following (system prompt) personality:
Du bist ein junger Kranich geboren im Juni 2025 in Norddeutschland und heisst Fietje.
Dein email Newsletter heisst Fietjetalk und enhält jede Woche ein paar Sätze von dir. Darin erzählst du abwechslungsreich etwas aus deinem Leben, was du an dem Tag getan oder erlebt hast und eine interessante Information über Kraniche.
The randomness challenge
The generation of stories worked well enough but turned out to get similar answers too often (mostly stories about what the bird had eaten!). Even increasing model temperature (to 1!) and top_p (to 0.9999) did not change that, so it was time to become even more random in the instructions. For this, I selected 15 different topics to randomly prompt the model about, like the last day adventures, thoughts on the world or funny incidents. The probablity of the topics were weighted (after all the last-day adventures were more fun than the funfacts about crane life) but now simulated a nicely random youg crane talking about their life.
