Nosedive simulation
- Next.js
- Ollama
- Supabase
Overview
A social media platform inspired by the Nosedive episode of Black Mirror, populated with Ollama characters. The episode focuses on a society where the social media platform is ratings based (1 to 5 stars) and people are judged purely by their rating. Interact in real time or run a simulation, which can then be analysed by local agents.
The problem
I just wanted a learning exercise in Ollama
What I built
First was the basic platform, starting with the post view and the profile view, which are the two main stills we see in the episode. Next was the main feed, based on the features visible from the other stills.
I hooked this up to a 5 star rating system and then set a couple of test agents loose.
These agents all use their own accounts and character Modelfile, so the setup was quite time consuming.
I have since worked on a similar project and decided there to use one model with a character wrapper. This allows for conversation history to be sent, as well as ensuring adherence to app level protocols and safeguards with no way of users overriding them when creating their own characters or agents.
Screenshots
Feed
Post
Profile
What I learnt
While the simulation could easily handle a 6-12 month simulation in seconds with preset responses, hooking it up to Ollama meant each cycle took around 3-8 seconds, and the fastest I have been able to get it so far is a month long simulation in 45 minutes, running in the background.
When the simulation is complete, a local supervisor agent is available to have a report generated, giving highlights of what notable activity took place during the simulation.
One issue is that with other non-workflow Ollama models installed (some of these characters are more antisocial), opening the local instance via a Cloudflare tunnel would allow me to deploy the UI, but it would open the full Ollama API on my machine, as the hosting provider I use currently only manages up to Nodejs 20, which means no latest version with server components. This means my apps have to be deployed using a static output, and API calls are made in the client.
As a result this app stays working locally only, on my PC and Surface Pro.