JDriven Blog
Building a local AI storyteller - Part II - When the model is not enough
In the first part of this series, I described the most important lesson I learned while building a local AI storyteller:
A good LLM application is not a clever prompt. It is software architecture around a probabilistic component.
That sounds reassuringly architectural.
It also leaves one small question:
What exactly are we building around?
Tell a Story
As software engineers, we are constantly challenged to explain what we do and how we do it. This communication challenge becomes even more pronounced when we talk to non-technical stakeholders. Now that AI is enabling us to produce more than ever before, this problem has become even greater. But how do we effectively convey complex technical concepts to a non-technical audience?
Just one more prompt
It was two o’clock in the morning before I noticed the time.
Earlier that evening I had been building an application.
I had written all the work in a backlog.md, a neat list of stories, and I let the AI pick them up one by one.
It would finish a story, ask me to verify everything, and then close with a simple question: shall I pick up the next task?
And every single time, that question was the trigger. It would be a shame to stop now. Just this one more, and then I’ll go to bed.
Building a local AI storyteller - what I learned when prompts were not enough
I wanted to understand what happens when you stop treating an LLM as a chatbot and start treating it as a component in a software system.
So I built a local AI storyteller using a local LLM through an OpenAI-compatible API.
Selfware, software that fits you instead of the world
People need not only to obtain things; they need above all the freedom to make things among which they can live, to give shape to them according to their own tastes.
— Ivan Illich
Tools for Conviviality
Tools for Conviviality
Contemplations
The world is changed.
I feel it in the water.
I feel it in the earth.
I smell it in the air.
Much that once was is lost, for none now live who remember it.
— Galadriel (The Fellowship of the Ring)
Kotlin Kandy: Get Text Before Or After A Delimiter
Kotlin adds the substringBefore, substringBeforeLast, substringAfter and substringAfterLast extension functions to the String class. Instead of using indices to get a substring you can use a string or character value. The functions without Last use the first occurrence of the delimiter and the methods with Last use the last occurrence. If the delimiter is not found the original string is returned. You can supply a value that should be returned when the delimiter is not found.
Kotlin Kandy: Get A Random Element From A Collection
Kotlin has very useful extensions functions for working with collections. These extension functions make working with collections more easy and fun. One of the extension functions is the random function. When you call random() Kotlin returns a single element from the collection using the default random source. The function also accepts a Random instance as argument. This instance has a seeded value to return repeatable random values.
Event System: Breaking Down the Basics
Jim is a guy who never stops exploring. A couple of years ago, he dove into dependency injection. But now, all of a sudden, something else hit him. Event systems are pretty common these days. As a Spring guy, he’s been using events for ages, but now he feels the need to know how they actually work under the hood. So, how do they actually work?