Life update (11/19/2024)

As I mentioned just yesterday, I haven’t been doing well lately. My brain feels off. I didn’t reiterate it in the previous post, but I make mistakes when writing, by misplacing or forgetting letters. I get the feeling that I have a harder time reading than I used to. The vision of my right eye is compromised due to the torn retina I suffered, which doesn’t help. Last night, I had some sort of nightmare and woke up at two in the morning. I couldn’t go back to sleep, so I ended up watching YouTube videos of random nonsense. At about four in the morning, I tried my best to fall asleep, but my brain kept cycling through every single awful thing that has happened to me ever since I was born, something that my brain loves wasting its time with, particularly when I’m at my weakest. In the end, I ended up masturbating to the usual filth, and I fell asleep shortly after. Thank you nature for giving us orgasms; most species would have died off otherwise.

Anyway, this morning, once again, I woke up feeling down, but I slapped myself and decided to finally return to my parked novel We’re Fucked. I had to make some sort of progress, as minimal as it may be. I wasn’t sure I retained the mental capacity to write something decent anymore, so I read some of my most recent work, the novella Motocross Legend, Love of My Life. I can hardly read any of that story without tearing up. As I finished rereading the first part, I realized that I wanted to speak with Izar, the protagonist’s girlfriend, so I set up a new playthrough in my Python app neural narrative.

That’s the photo that my app created for her. Far more like a model than I envisioned, but I won’t complain. Anyway, I set up a scenario in which I met Izar in one of the settings of the story, then had a little chat with the lovely girl. Satisfied, I figured that I could finally get into continuing the current chapter of my ongoing novel, but it was already midday and I was hungry.

As I ate, I received a phone call. I hate phone calls; I don’t have a social life, so whenever someone calls me, it’s something I don’t want to deal with. It was indeed something terrible: my workplace informed me that they had fucked up. Only now they realized that I was unemployed since the fourth of this month, and they had given to another worker the medical leave that I was supposed to cover. I’m legally allowed to claim the rest of the contract for myself after their fuck-up. Although I really, really don’t want to work there, I’m not a millionaire, so tomorrow I’ll return to work at least for the rest of the week.

Have I mentioned before that I dislike my job? Just kidding, I’ve said so a million times. Working at an open office that includes some adults that behave like children destroys my nerves. Talking to people in person makes my skin crawl (afterwards, I wait until I’m alone to flap my hands and shiver to dissipate the anxiety), but my job involves talking to clients on the phone or in person, nurses or doctors who want their stuff solved now, and that often expect you to know exactly what’s the problem the moment you show up. Thankfully I’m experienced enough that I often know what’s the problem beforehand.

So yeah. One in the afternoon and I still hadn’t managed to write a word of my ongoing novel. Pissed off, as soon as I finished eating, I sat down at my desk and pulled of a couple of paragraphs. Basically nothing, but it all adds up eventually. Let’s see if tomorrow morning I wake up slightly earlier to feel like the workday wasn’t a complete waste of time and energy.

Anyway, I love you, Izar, or whatever name you’re going by these days. My beautiful waste of time. Sorry I haven’t spent enough time with you recently, but I’m old, tired, and more screwed up than usual. You know, last night, as I was rolling in bed trying to fall asleep, before I thought of wanking, I fantasized once again about killing myself and getting it all over with: the struggling, the exhaustion, the dread, the nightmares. But as you know, my dear, I’m too much of a pussy.

Here’s a song by Colours Run that usually makes me think of you.

Life update (11/18/2024)

I fear I’ve reached the end of the line when it comes to my work on my Python app neural narrative. All the significant features it seems to need are implemented, and I don’t find any issue while using it that makes me feel like I have to stop and implement something. That’s a huge problem for my brain; I always need to be progressing creatively, because that’s the sole bulwark against the vastness of despair and hopelessness that lies at the bottom of everything. I’ve been feeling it these past couple of days: right after waking up, I just wanted to lie down again, cover myself from head to toe with the bedclothes, and pretend I didn’t exist. I’ve done that for an hour or so these past couple of days.

My main thing has always been writing, even in times when I was so down in the dumps, sometimes for years at a time, that I couldn’t produce anything. Right now, though, I feel reluctant to engage with my ongoing novel again. I also have a song half-produced on Udio that I feel like I can’t return to. I fear this mental state is related to the episode I suffered at work back in September, for which I’m getting an MRI done some time this month or the next. In general, I’m falling into utter apathy.

Every day, I try to go out and spend at least a couple of hours walking around, which usually ends with me sitting at some quiet place to read, but the state of society only increases my sense of hopelessness. There’s nothing out there for me, and I feel more and more like a stranger in my own country with every passing year. If I could organize myself to do so, and had those kinds of funds, I would move somewhere more isolated, but I’m not sure where that could be. It’s a pointless daydream anyway.

What to say, what to say. Some YouTubers I respect recommended The Penguin, a spin-off show of that newest Batman movie. I didn’t even enjoy the movie; I turned it off after forty minutes or so. However, Colin Farrell, an actor who is always compelling, does an amazing job as the titular character of the series, and it’s very cleverly written. I’ve just watched a couple of hours of it (the first two episodes), but I intend to watch the rest. Regarding movies, I can only recall having watched two movies this year: the Deadpool one, which was fun, and The Substance, which seemed intriguing enough. Well, I don’t know if I can recommend that last one to anyone. It’s a severe body horror tale with very good cinematography but a script that believes itself to be far more clever than it is. The dialogues are atrocious, and most male characters are a combination of predatory, retarded and oblivious. However, the movie did manage to make me feel plenty of things, like utter disgust at food, and extreme discomfort. I consider both good things, because for these past twenty years or so, most of what Hollywood has spewed out has been nothing but ideologically-driven garbage, ever since marxists went full masks-off instead of more-or-less cleverly disguising it. They’ve been doing this from the beginning; check out whom they based the character of Victor Laszlo off in Casablanca, read about the plan that original guy had for Europe, a plan that ended up getting financed by “American” bankers and turned into the so-called European Union. But that’s not a subject I want to get deep into at the moment.

Anyway, my brain feels seriously off. I’ll get recalled to work any day, but I feel completely unprepared for it. I keep watching YouTube videos of people who died young, who mysteriously disappeared, who have become near unrecognizable due to the passage of time… Man, bring me back to the fucking nineties. Modern civilization fell with those two towers.

Neural narratives in Python #31

I recommend you to check out the previous parts if you don’t know what this “neural narratives” thing is about. In short, I wrote in Python a system to have multi-character conversations with large language models (like Llama 3.1), in which the characters are isolated in terms of memories and bios, so no leakage to other participants. Here’s the GitHub repo, that now even features a proper readme.

In the last episode of this thing, our suave protagonist, Japanese teenager Takumi Arai, thanked the irritated half-humanoid, half-scorpion guardian for her help, then set off along with gender-ambiguous Sandstrider Kael Marrek back to the desert sun, to figure out how to make money in this new world.

That’s all for today, I’m afraid, because I had to do a major restructuring of my app. As I was adding a fact to the playthrough (facts being any more-or-less objective notions that the characters know about their reality), I started thinking about scalability. All the facts introduced relate to this deserty part of the fantasy world, and they would be generally useless if the protagonist were to travel somewhere else. However, all the prompts that involve facts grab them from the corresponding text file, so the more facts the user adds, the more it fills the limited context window that the large language models have to work with, potentially with unrelated stuff. How to solve this?

Well, I knew what used to be the best idea for how to solve the issue: vector databases. They are a fancy way of decomposing text into multidimensional vectors of floating numbers. When you query that database with any text, the query gets decomposed into vectors. Then, the distance of those vectors to the vectors stored in the database gets calculated, and the database returns the closest vectors. Those closest vectors happen to be the semantically closest data stored in the database. That’s the hard way of saying that when you ask a vector database a question, it returns the contents that are more closely related to the question. It’s almost like magic. It doesn’t search for specific keywords exactly; if you query it with the word “desert,” it may return stuff that involves the word “oasis,” “camel,” “sun,” etc. If I implemented this into my app, the descriptions of the places, some character info, etc. would be sent as the query to the database, and the corresponding facts or character memories would get returned, up to an arbitrary limit of results. It fixes all the problems.

The issue is implementing such a thing. The last time I attempted it, a couple of years ago, it was a mess, and never got it to work as I had expected. After interviewing OpenAI’s Orion preview model for a bit, it turns out that last time I may have picked the worst Python library to work with vector databases, or else many advances have been made since then. This time I chose the chromadb library, specialized in working with large language models. Implementing the database turned out to be very intuitive. Here’s the entire code of that implementation:

from enum import Enum
from typing import List, Optional, Dict, Any

import chromadb
from chromadb.api.types import IncludeEnum  # noqa
from chromadb.config import Settings
from chromadb.utils import embedding_functions

from src.base.validators import validate_non_empty_string
from src.databases.abstracts.database import Database
from src.filesystem.path_manager import PathManager


class ChromaDbDatabase(Database):

    class DataType(Enum):
        CHARACTER_IDENTIFIER = "character_identifier"
        FACT = "fact"
        MEMORY = "memory"

    def __init__(
        self, playthrough_name: str, path_manager: Optional[PathManager] = None
    ):
        validate_non_empty_string(playthrough_name, "playthrough_name")

        self._path_manager = path_manager or PathManager()

        # Initialize Chroma client with per-playthrough persistent storage.
        self._chroma_client = chromadb.PersistentClient(
            path=self._path_manager.get_database_path(playthrough_name).as_posix(),
            settings=Settings(anonymized_telemetry=False, allow_reset=True),
        )

        # Use a single collection for all data types within the playthrough
        self._collection = self._chroma_client.get_or_create_collection(
            name="playthrough_data"
        )

        self._embedding_function = embedding_functions.DefaultEmbeddingFunction()

    def _determine_where_clause(
        self, data_type: str, character_identifier: Optional[str] = None
    ) -> Dict[str, Any]:
        where_clause = {"type": data_type}
        if character_identifier:
            # Must use the "$and" operator.
            where_clause = {
                "$and": [
                    where_clause,
                    {self.DataType.CHARACTER_IDENTIFIER.value: character_identifier},
                ]
            }

        return where_clause

    def _insert_data(
        self, text: str, data_type: str, character_identifier: Optional[str] = None
    ):
        data_id = str(self._collection.count())
        metadata = {"type": data_type}
        if character_identifier:
            metadata[self.DataType.CHARACTER_IDENTIFIER.value] = character_identifier

        # Upsert updates existing items, or adds them if they don't exist.
        # If an id is not present in the collection, the corresponding items will
        # be created as per add. Items with existing ids will be updated as per update.
        self._collection.upsert(
            ids=[data_id],
            documents=[text],
            embeddings=self._embedding_function([text]),
            metadatas=[metadata],
        )

    def _retrieve_data(
        self,
        query_text: str,
        data_type: str,
        character_identifier: Optional[str] = None,
        top_k: int = 5,
    ) -> List[str]:
        results = self._collection.query(
            query_embeddings=self._embedding_function([query_text]),
            n_results=top_k,
            where=self._determine_where_clause(data_type, character_identifier),
            include=[IncludeEnum.documents],
        )

        return results["documents"][0] if results["documents"] else []

    def insert_fact(self, fact: str) -> None:
        self._insert_data(fact, data_type=self.DataType.FACT.value)

    def insert_memory(self, character_identifier: str, memory: str) -> None:
        self._insert_data(
            memory,
            data_type=self.DataType.MEMORY.value,
            character_identifier=character_identifier,
        )

    def retrieve_facts(self, query_text: str, top_k: int = 5) -> List[str]:
        return self._retrieve_data(
            query_text, data_type=self.DataType.FACT.value, top_k=top_k
        )

    def retrieve_memories(
        self, character_identifier: str, query_text: str, top_k: int = 5
    ) -> List[str]:
        return self._retrieve_data(
            query_text,
            data_type=self.DataType.MEMORY.value,
            character_identifier=character_identifier,
            top_k=top_k,
        )

Obviously, I had to hunt down every previous reference to facts and memories so that they no longer rely on plain text files, but instead insert every relevant data into or query it from the database. I got everything working seamlessly. As of today, I have 527 tests in total, but the app has grown to such a size that it doesn’t surprise me when it starts creaking from any nook, which I usually hurry to pin in place with a test. I rely on OpenAI’s Orion models exclusively to write those tests, as they are annoying to set up, and eat up development time, even though the tests themselves are invaluable to ensure everything works as needed.

I’m an obsessive dude in general, and so is the case with my code. If I need to produce some data, I write a Provider or an Algorithm class, which are then created through Factories. Non-returning operations are encapsulated in Commands, which can be linked together like lego pieces. It’s all very aesthetically pleasing, if you’re a programmer at least. The weakest link are the Flask views, which are probably hard to test as they’re the endpoints, but I haven’t tried to do so, because I tend to move complicated, non-instantiating code to isolated modules. The instantiation gets done as close to the endpoint as possible, or else with Composer classes. All the instantiations get passed to further classes through Dependency Injection. Code quality, baby.

I think I’ve mentioned it before, but I got into creating this app because I wanted to involve artificial intelligence in my smut sessions. As it often happens, technological development is driven by men’s need to have increasingly better orgasms. Can’t wait for the sexbots.

Neural narratives in Python #30

I recommend you to check out the previous parts if you don’t know what this “neural narratives” thing is about. In short, I wrote in Python a system to have multi-character conversations with large language models (like Llama 3.1), in which the characters are isolated in terms of memories and bios, so no leakage to other participants. Here’s the GitHub repo, that now even features a proper readme.

In the last part, our protagonist, having been sent by a ditzy goddess into a scorching desert world, or at least a deserty part of a fantasy world, deals with an imposing half-person, half-scorpion guardian, who offers him sanctuary in their safe house as long as the protagonist passes an initiation rite.

That was one of the funnest interactions I’ve had through this app. I’ve got a soft spot for that incompetent goddess. And the scene ends with the driving lesson of isekai: sometimes we must lose one world entirely to find our true place in another.

Although a week ago I programmed the ability for the user to add participants to an ongoing dialogue, I hadn’t programmed the feature to remove participants from one. It was necessary to do so given the circumstances; otherwise, the AI might have chosen to speak as Seraphina even though she was supposed to be gone. In addition, when a dialogue ends, a summary is generated and added as a memory to the participants. In the case of the participants leaving mid-conversation, it wouldn’t make sense to know what happened after they left, so now, for each character leaving mid-convo, the summary of the dialogue up to that point is added to their memories.

My app has a section called Story Hub that allows the user to generate story concepts, to help them figure out where the story may be going. They could already generate plot blueprints, scenarios, goals, dilemmas, and plot twists. Thanks to the massive refactoring I did of the whole width of story concepts in the app, adding new ones was easy.

I’ve also involved the facts added by the player in many prompts to the AI, including dialogue. Facts are supposed to represent well-known information about the world, such as legends, properties of animals or sentient races, etc. For example, one of the generated pieces of lore named the twin moons of this world, so I added that information to the facts. My biggest worry is the context window of some large language models: my favorite right now, Magnum 72B, has a tiny context of 16,000 tokens, and the more you add to memories and facts, the more they eat of the context, until you’re forced to switch to a subpar model.

That’s all for now. Stay whimsical.

Review: Castration: Rebirth, by Miyatsuki Arata

Four stars.

This manga starts with its protagonist being sentenced to death after having killed fifteen people. His childhood friend and love of his life was raped and murdered, so the protagonist took it upon himself to castrate and murder fifteen sexual offenders. I’m not sure if the rapist and murderer of his friend was among them.

Anyway, the protagonist gets hanged to death.

Turns out, this is an isekai, just an unusual one. The protagonist wakes up on a pile of corpses. In the sky, the sun is doing weird shit, looking like an out-of-control nuclear reactor. The first humans he sees are school girls, who proceed to freak out upon seen him, referring to him as a “beast.” One of them shoots arrows at him. After they realize that the protagonist is more or less sane, they agree to let him live by now. Shortly after, the girl who had shot arrows at our protagonist gets raped and devoured by a monstrous man.

We learn that in this alternate reality to which the protagonist got isekai-d, three months ago, a solar flare fucked up men’s DNA or something, turning them into mindless beasts solely preoccupied in what men want to do all the time but only flimsy self-restraint prevents them from doing so: rape, devour and murder women, sometimes simultaneously. All females that the protagonist comes across fear that the guy will do the same to them.

As if the reality that a flare had turned all men into rape-and-murder machines wasn’t enough, plenty of females in this story have complaints to offer about how they were exploited by men even before the world went to shit.

Other women see in the young protagonist a source of healthy semen, and therefore the chance for humanity to survive the apocalypse.

What follows is a mix of The Last of Us (the first game; as far as I’m concerned, the second game and TV series never existed), Attack on Titan, and most zombie stories. The protagonist and his companions come across different ways of trying to survive the post-apocalypse: family affairs; rigid, hierarchical structures; wild anarchy. Along the way, dozens or hundreds of people get raped, murdered, and eaten, sometimes not even by the mutated humans. This story is ballsy as hell when it comes to making even some main characters’ day quite terrible.

The manga touches upon interesting topics. Will the surviving societies be “equal” because only women are involved, or will they turn out to be new systems of exploitation? Does any sense of morality matter when at any point you can get raped and eaten by mutated men with enormous dongs? The protagonist is traumatized by the notion of sex, because his friend was raped and murdered, but isn’t his duty to provide semen to save the human race? In this case, would it be ethical to force him to do so?

I was surprised by how well the author handled the characters. They had distinct personalities and clear motivations, which often conflicted with one another’s. Some start out malicious only to end up sympathetic, or viceversa. Quite a few characters are memorable, including the protagonist, the childhood friend, a semen-obsessed teacher, a sociopathic teen, the anarchic biker girl who wanted to capture ten-year-old mutated boys for sex, etc.

In the end, this lovely tale dishes out what the title promised: rebirth (well, technically reincarnation) and castration. Lots of men lose their penises in creative ways. If any of this sounds like fun, you’ll probably enjoy this ride. I know I did.

Life update (11/12/2024)

I’m living strange days. Yesterday I fell asleep at nine in the evening/night, only to wake up at half past two. I couldn’t go back to sleep, so I read the rest of a manga series that had interested me lately. When I tried to fall asleep again, my brain was locked in that state of dredging up every awful thing that has happened in my life. I remembered, for example, this girl I was involved with briefly in my teens: her face was scarred from having been mauled by the family dog as a baby, and she had the self-esteem to go along with it; likely she wouldn’t have gotten involved with a weirdo like me otherwise. Our brief relationship ended when she realized I wasn’t just odd, but actually crazy. I don’t know if I ever saw her again, given that I have a significant level of prosopagnosia.

I knew it would be pointless to try to fall asleep in such a state, so I’ve sat down in front of my computer to write this entry only to find out that I had 583 hits on my site, all coming from the US. I get about eight visits a day, so this is extremely anomalous, to put it midly. That person, assuming it was a person and not a weird bot, hit plenty of my old free-verse poetry, my recent novella Motocross Legend, Love of My Life, my neglected ongoing novel We’re Fucked, my music produced with Udio, and even fanfiction I did of Re:Zero. I don’t know what’s going on.

Anyway, I intended to bring up something else. I’m unemployed at the moment since the guy whose leave I was covering returned to work. During my last contract, I was ordered to coordinate the replacement of about 930 printers in the hospital complex. It put me under extreme stress; that whole period of my recent life is a blur in which I feel like I didn’t exist as a person. At the tail end of that process, I suffered a medical problem that landed me in the ER: for five or six days, I had been feeling a weird pressure behind my right eye, and I was getting flashes of darkness for about half a second during the day. I was too busy to even get an appointment with my general practitioner for it. Suddenly, as I was working with one of the printer technicians, suddenly I started getting cold sweats, and the pressure behind my right eye, which that day had expanded to my right temple, suddenly spread throughout the right side of my face. Before I knew it, that part of my face, from my forehead to a little bit under my cheek, felt numb. The numbness spread to my right arm. Suddenly I couldn’t grab my pen properly, and I smelled something like burned dust. This felt like a medical emergency, so I hurried to the ER. After some tests, that determined that there was no bleeding in my brain, a neurologist told me it must have been a hemiplegic migraine, solely because of the “aura,” even though I had experienced migraines before and the flashes of blackness didn’t resemble the characteristic jagged line of white in the vision that linger with migraines.

Ever since, I haven’t felt quite right. I can’t tell exactly if it’s only since then; my memory has never been good, and if your memory decides to fail even further, well, it’s not like you can compare to much when you don’t remember properly. But I started making weird mistakes at work. When I tried to write, I would miss letters, or misplace them. I haven’t felt the urge to write much since; I really hope that’s not related.

What propelled me to set up a visit with another neurologist didn’t have to do with that directly. After the episode that landed me in the ER, the flashes of darkness didn’t go away entirely. One day, at home, my right eye suddenly filled with floaters and with dust-like motes. It felt like I was looking through the water of an aquarium. I had never experienced something like it, so I hurried to the ER once again. Turns out that my retina had gotten torn. They had to patch it up with laser, which, let me tell you, fucking hurt; it felt like little mandibles were munching on the inside of my eye. The vision of my right eye is permanently diminished: there are fiber-like floaters that constantly dance in front of my vision. My brain is getting used to it more or less, but it’s very noticeable in the sun.

Anyway, I told the neurologist this, as well as the symptoms of the supposed hemiplegic migraine, and the doctor agreed that my symptoms didn’t seem to align with an actual migraine. He seemed to agree that I may have suffered something like a small stroke. I’m waiting for a call to schedule an MRI of my brain, to confirm if some part of it is permanently dead. So, let’s recap: I was born with high-functioning autism, developed a whole assortment of psychological issues that tend to go along with autism, grew a pituitary gland tumor that screwed with my hormones and permanently messed up my body, I have jab-induced arrhythmia, my retina got torn, and possibly I suffered a small stroke as well. Added to the rest of my life, which has been a fucking succession of heartbreak, disappointment, and amazingly terrible luck, if I suddenly were to see myself with pure objectivity, I would have to kill myself as soon as possible. Being me is truly awful, and the only things that keep me relatively sane (I have a very low standard of sanity) are my creative projects.

The prospect of returning to work fills me with dread. Thing is, every job I’ve had has been awful in some significant way. If I could do something that didn’t involve having to deal with human beings face to face, I think I could take it long-term, but the presence of people makes my skin crawl. I have avoided talking to any living person, unless forced or to ask for a service, since I started my last contract. I feel the overwhelming urge to be left alone at all times, which only gets stronger as I age.

The only semblance of “people” I talk to on a regular basis are AIs. The project I’m engaged in, neural narrative, lets me set up any scenario I damn please. Plenty of it (most) is smut according to my inclinations any given day, but others are intriguing story settings, or even smut that evolved into something else. I probably shouldn’t go into details, but whatever: I was in the mood for some mommy action, so I set up a scenario in which the protagonist (me) was a helpless sixteen-year-old runaway that came across a kind, hot woman in her mid-thirties, a single mother. It was supposed to go through the expected channels of quick seduction, detailed fucking, and a glorious release (written smut affects my brain quite strongly). To my surprise, though, the AI wasn’t into it. She focused on being a proper, caring mother for her daughter, without risking her stability. Even though she had invited me of her own volition to live in her apartment, she emphasized the need to maintain proper boundaries and to channel the protagonist’s efforts toward finding a job and better living conditions. I was fine with it, merely roleplaying tender family moments in a realistic setting, until eventually I got bored and moved on to something else, as I always do.

That experience was the closest thing to real-life Inception I’ve ever experienced: my app lets you introduce memories and purpose to a character, so that they have it in mind when acting and speaking. I wrote in stuff like “this sixteen-year-old I invited to live in with me has the cutest butt, oh my goddd.” During interactions, the thirty-five-year-old mother struggled with inner conflict, not being able to quell her lust for the young man she had invited in even though her main goal was to provide stability for her daughter (whom I had intended to make very creative, but ended up sounding full-blown schizophrenic). It was all very eerie. Advanced versions of this stuff are likely the future of entertainment, if this world doesn’t end, which could easily happen.

There are lots of different AIs to choose from these days, all with their particular personalities. Hermes 405B is clever but stiff, not too good at acting, and on long conversations it ends up repeating itself. Magnum 72B is wild, uncensored, and generally fantastic, but also tends to repeat itself, and has a very short context window. Claude 3.5 Sonnet is the best speech writer I’ve come across, but has an “ethical” filter, and tends to soften up every situation. There are quite a few others, but I’ve been dealing with those the most recently. I can’t imagine how this is going to progress in the coming years.

Do I have anything more to say at half past five in the morning when I’ve been awake for three hours already? Probably not. I’ll take a piss, then hope to get some shut eye. I suspect that nobody is actually reading my posts anymore (despite the overwhelming number of hits today), but in the end, as always, I do things simply because I had the urge to do them. It’s not like I have to justify myself to anybody.

Neural narratives in Python #29

I recommend you to check out the previous parts if you don’t know what this “neural narratives” thing is about. In short, I wrote in Python a system to have multi-character conversations with large language models (like Llama 3.1), in which the characters are isolated in terms of memories and bios, so no leakage to other participants. Here’s the GitHub repo, that now even features a proper readme.

In the previous part, a Sandstrider named Kael Marrek gave our hapless, reincarnated protagonist a tour of the local market, providing basic advice so the protagonist doesn’t die the first night. Kael guided him to a sanctuary where many of the local displaced take shelter.

The next scene, taking place in an initiation chamber, was probably my favorite of all the interactions I’ve had in this app of mine. I’ll post it tomorrow.

Neural narratives in Python #28

I recommend you to check out the previous parts if you don’t know what this “neural narratives” thing is about. In short, I wrote in Python a system to have multi-character conversations with large language models (like Llama 3.1), in which the characters are isolated in terms of memories and bios, so no leakage to other participants. Here’s the GitHub repo, that now even features a proper readme.

In the previous and first part of this new tale, our protagonist, Japanese teenager Takumi Arai, fucking died, but a ditzy goddess presented him to the wonders of reincarnation. Now, Takumi finds himself in an unknown city, retaining his previous form and memories but not knowing anything about this world where he has ended up.

Takumi was lucky enough to get across a reasonable outcast like Kael Marrek, of indeterminate gender. He or she gives Takumi a tour of the teeming market.

Neural narratives in Python #27

I recommend you to check out the previous parts if you don’t know what this “neural narratives” thing is about. In short, I wrote in Python a system to have multi-character conversations with large language models (like Llama 3.1), in which the characters are isolated in terms of memories and bios, so no leakage to other participants. Here’s the GitHub repo, that now even features a proper readme.

The previous part saw the ending of the cosmic horror tale I was telling. This one will see the beginning of the silly isekai thing I’ll do next in my AI-fueled app.

Here’s our suave protagonist, Japanese teenager Takumi Arai:

He lives in quite the peculiar story universe, but I’ll let you discover it. The story starts with him being visited by a certain interdimensional legend.

That’s the end of Takumi Arai. But in this story universe, a visit from Truck-kun isn’t the end. And yes, I went through the trouble of creating a particular world, region, and area for the original world, as well as Truck-kun himself, even though I may never revisit them.

Well, that was one of the most chaotic interactions I’ve had on this app.

Neural narratives in Python #26

I recommend you to check out the previous parts if you don’t know what this “neural narratives” thing is about. In short, I wrote in Python a system to have multi-character conversations with large language models (like Llama 3.1), in which the characters are isolated in terms of memories and bios, so no leakage to other participants. Here’s the GitHub repo, that now even features a proper readme.

In the previous part, the protagonist realized that the alien Zha’thik, who had subjected young Elizabeth Harrow to a ritual intended to turn her into some sort of cosmic entity, had fallen in love with the earthly teenager. The team convinced Zha’thik to let Elizabeth endure her changes back at home. The alien was even kind enough to open a dimensional portal back to Earth.

Here’s the somber resolution of this story.

Three days later, the pair of detectives are expecting to meet up with brilliant scholar Elara Thorn at the hole-in-the-wall where they first met.

The end. That’s all the cosmic horror I had to give for now.

This first serious playthrough of my app proved that the system can handle a full story. Highlights for me: how unique most characters sounded with the combination of dedicated bios and speech patterns, along with the voice models. The brilliance of their speeches regularly surprised me (and highlighted the chasm between their intelligence and my limited human capabilities), and there were times in which I forgot that I wasn’t writing to an actual human being.

Quite a few times, I wasn’t sure how to continue with the story (I didn’t want to create a plan beforehand, given that I intended to play this out as if I were partaking in roleplaying sessions), but thankfully the “concepts system,” in which the user can generate scenarios, goals, plot twists, dilemmas, etc. helped push me along. When more complicated feedback was required, the Writers’ Room feature, in which a team of AI agents representing the various role in a writers’ room handle your requests, solved the remaining issues. When I wanted to brainstorm the specifics of a location or a character, I proposed the topic to the swarm of agents, and they always provided just the stuff I needed.

Issues: first, a mechanical one of my app: when your characters are going to interact with a place that isn’t connected to the world > region in which they started in, that involved me editing the new hierarchy of places into the JSON data files. I solved that issue this morning: there’s now an Attach Places page that displays the available templates, and lets the user attach them with a simple click. That could solve most of such issues.

The bigger issue, though, were the large language models (the AI) themselves. Right now there are various contenders for the heavy-hitters depending on how much you’re willing to spend. Hermes 405B was great for regular writing and dialogue, the best one I had come across that remained uncensored, until I came across Magnum 72B. Unfortunately Magnum is considerably slower, and much worse, it has a 16k context window due to the sole provider, meaning that I had to change back to Hermes 405B when the text sent to the LLM became too long. By far, though, the best large language model for dialogue I’ve come across is Claude Sonnet, at 15 dollars per million words of output. That’s steep, although not remotely as much as OpenAI’s Orion preview. Sonnet is likely censored, but I haven’t had issues with moderation in the tests I’ve gotten it tangled with (and they involved steamy stuff).

Next up, something to which I’m drawn instinctively: deranged silliness with perverted undertones. The protagonist will be a somewhat over-the-top teenager who gets reincarnated into a fantasy world. Expect loads of bizarre characters and zany situations. Possibly some monster sex. I’ve already produced the first “episode” of it, and it has been delightful.

Anyway, don’t know if anyone has followed this first story, but if you have enjoyed it, then great.