World Building with GPT
ianbicking.org
ianbicking.org
> If you ask very explicitly for flaws you can get some. It’s very hard to get a truly despicable character.
This reminds me of one interesting tidbit in recently canceled Dilbert author Scott Adams's racist rant of a podcast.
Said something along the lines that it's absolutely irrelevant what kind of AI we can craft, nobody will want it. The state and industry wouldn't allow most of what such an AI would say or do. Extrapolating from this: crafting and training the AI is the "easy part", an even more complex task is to restrict the output in the end: make it dumb, simple, tailored and censored to the imagined end user, and profitable for the creator.
this is pretty profound. and seems necessary only since inherently humans can be hateful, vile and racist but we can't come to terms with it. in crafting an AI, that is less humanlike, we actually inject a lot of biases based on our own understanding of what an ideal human should be like - which for most humans is themselves
as in "do as I say" or "do as I do"?
- The censorship might be baked into the model as part of the training.
- Self-hosting the model might be prohibitively expensive.
- Restricting the output might have additional benefits to quality beyond censorship.
First baby steps towards the house AI's of Neuromancer :)
> and profitable for the creator.
Those two goals are mutually exclusive. The first one is what you need to fly under the nose of salacious media and paranoid investors. The second one involves delivering unique value to your customers who already have their fill of dumb, simple, and censored tools and toys.
I feel bad for being dismissive of their work, but... a lot of it is just low quality and predictable filler.
We'd likely need consoles to pave the way with AI cores on their SOCs, then we might get new pcie AI cards and that's probably the first time the feature could be leveraged properly.
Doing everything in the cloud would be prohibitively expensive and likely too slow, as 15 second would be just too long for a player to stand around waiting for an answer.
Though the best way to do interesting worldbuilding IMO is look up a few cultures less represented in fiction (or at least parts of them that are less represented) and study their history to get ideas. I've been reading up on ancient Greece lately and getting a ton of ideas.
I think I enjoyed the back and forth, the ability of me giving the rough sketches of the story and scene and then the bot filling in and adding some details. Then I could use those details to further the story.
It's still not there, but mostly because ChatGPT is too terse and biased towards everything being OK. Nonetheless, it is a lot of fun to have a story-telling copilot.
With these kinds of repetitive tasks I find that the chatbot interface is not the best and that using an API is much better.
The chatbot approach is constantly feeding the history of the “conversation” back to the LLM. However, if you are asking for a fresh completion every time but with a number of few-shot examples of the output you can get much more reliable outputs.
This applies to the data formatting examples as well. If enough examples are provided in the prompt it tends to lock into the pattern very well.
As for why I’m specifically using the API is that I tend to eval(completion), sometimes on generated functions, but sometimes just to have a function like toNum() in scope to turn “1,356” into 1356!
Which could be another method used for errant {size: “3x5”} instead of {w:3,h:5}… the hallucinations become somewhat predictable and hence parsable in ways that reduce errors drastically!
I have spent a lot less effort on a similar endeavor before deeming GPT inappropriate for this purpose, with similar takeaways as the ones noted in "What doesn't work"
I think the reason behind these shortcomings is because of the nature of GPT.
It's designed to predict the most likely words to come after the prompt and as such it's very prone to fall in cliches, stereotypes and tropes.
I think the next iteration algorithm is going to feel less like generated content but will still maintain a hack writer feel.
I would wager the author could get better results with a system where the substance of the content is generated through another process, possibly something like dwarf fortresses world and lore generation, and having a GPT layer that would put that content in more creative prose.
For example it generated exactly 1 Npc that could be considered rude with a special note how it’s sorry about that but that it’s important some npcs are rude for a more dynamic world (which I find amusing)
As you state, if your creating a general help AI for things like searching you don't want a user asking "How do I solve all my problems?" and the AI responding "Tie a rope around a tree, the other end around your neck and jump". That's how you get the NYT headlines of 'AI kills users'.
But that particular safety approach fails to create interesting 'human' stories. Sometimes the bad guy comes in and performs a genocide setting off the heros story arc. Sometimes the good guy is a terrorist (Luke Skywalker: No, I'm a freedom fighter).
The problem I see here is the power to create interesting and believable fiction is the same power to talk people into suicide. It's the same power to talk a mob in to rioting. It's the same power that could drive a nation to war. As the power to run these models goes from something that requires a datacenter to run down to something that runs in the palm of your hand it's something that society and the world will have to deal with. Any of you that run sites that allow posting won't like the idea of a million virtual Nazi's that never sleep (or maybe you do like the idea of?). Authoritarians in power may love the idea of countless voices spreading their message.
As they say, may we live in interesting times.
If I ran a social site, I would totally love a virtual world filled with virtual nazis, in which quietly confine the real ones, so that they can't pollute healthy environments with their nonsense.
"Here is a list of 10 things that have nothing in common:" ?
Ask GPT this and it comes up with a pretty good list (a pineapple, the color blue, the taste of coffee...). Ask yourself this same question and you can come up with a pretty good list... but it's also surprisingly hard.
There are ways we can increase our creativity and tangential thinking. Brainstorming lists, exploring opposites, free association, etc. A lot of these also work with GPT. Which is itself a strange thought... is GPT mimicking us or is there an attribute of cognition which we share?
Anyway, while it takes work and exploration to figure this out, I've yet to hit a wall, so I am pretty optimistic about GPT generally. But it does involve a mixture of prompt and algorithm and human intervention.
Finally, after all that, present the output to the user. It means inference takes 4x as long because you are doing multiple rounds of inference before actually presenting output but the final output you get is way more stable/consistent/accurate
Check Your Facts and Try Again: Improving Large Language Models with External Knowledge and Automated Feedback
https://arxiv.org/abs/2302.12813
The “facts” being derived not from Wikipedia but rather the rules of the fictional world.
Are you building in a recursive layer by asking it to take on a role while also targeting its output at a constructed user persona?
The second level of consistency is: consistent with a stereotype. So "standard fantasy world" is going to be consistent with fantasy tropes. (Mostly, except with a strong tourist industry and the occasional café; the modern world leaks in.)
The third level of consistency is: consistent with what you explicitly state about the world. That's the city backstory. If you want magic to come from the sun and you can catch magic in little sun basins and then use that to power your dishwasher, then you can state that... but it may have a hard time remembering that, and a harder time extrapolating all the effects. But GPT won't entirely forget it, and may even come up with some interesting ideas.
The real challenge though is: consistency with the author's as-yet-unfulfilled desires. That's where an interactive tool that allows co-creation with the AI might offer something, but it WILL be a struggle because the author must develop, articulate, refine, and reform their ideas, and the AI may help or resist, but often will simply make it clear the gaps that exist between desire and vision.
a) you live in a world full of magic (the mysterious, unpredictable kind) or
b) you have a small child at home
But there is a challenge in building fiction that even things that can reasonably happen will often be rejected by the reader if they are strange and unexplained. The saying "truth is stranger than fiction" actually tells you more about fiction than about truth.
Here's a contradiction: we expect "free markets" to outperform national or otherwise government services; now square that with East Palestine and the fact that by averages, we have more than one derailment a day.
Another contradiction: we exhort the value of "hard work" even as we build AI to do all the work for us, if the hardcore singularitarians have it their way.
But they do care about what you've said. If you told your players that all magic comes from the sun, those creatures from the deepest caverns better not have any magic. You can make up excuses as you go along, but they will think you a worse GM for it.
If they draw an inference that was valid from what you'd said, ("Hagrid said every single wizard who had gone bad was in Slytherin. At the time he said it, everyone thought Sirius Black had gone very bad indeed. Ergo, Sirius Black must have been in Slytherin! See, they can be good!"), that's annoying in a book, but in a role playing game it's downright frustrating.
Popular fiction doesn't give a shit about contradicting itself
I'm not saying it's fine in general. I'm saying it doesn't matter for pop fiction
Popular fiction gets retconned all the time. I'm fundamentally disagreeing with "not contradicting yourself too much" mattering at all for fiction that's successful with the masses
If you ever feel tempted to think that quality writing matters for popular success, just remember that lewd Twilight fanfic has sold more than a hundred million copies
Pretty much every creative work has contradictions and discontinuities that people gloss over, even (or especially) stark ones in critical success. The people who really get riled up about it are a very particular kind of person and not one I even meet outside of internet forums.
So it was you who wrote the script for last season of GoT!
We're building an open source wrapper around ChatGPT that lets you use it programmatically as an API or from Python or in CLI. Best of all, it's completely free! So it is great for testing the waters on a hobby project.
Check it out on GitHub: https://github.com/mmabrouk/chatgpt-wrapper
p.s. Just to answer all the comments below. OpenAI currently does not provide an API to ChatGPT. Our goal is not to abuse ChatGPT, but to provide tools for hobbiest to leverage it (by creating a power shell around it, making workflows around it, even using templates...) until an official API is available. As soon as an official API is available, we would integrate it in our CLI. In any case, chatGPT has hard query limits that would not allow you to use our project for any heavy lifting!
ChatGPT doesn't have an API and this looks like it will break T&CS.
Fine for a PoC, pet project perhaps but you can't expect anyone to build a commercial offering on the back of this.
Or is this just a wrapper to the chatGPT public and free frontend?
If thats the case I don't think this is fair use.
Queries with lots of context (like in this example) can quickly rack up the costs, but I've never felt that they are prohibitive for personal projects. The problems only start when you want to publish something other people can use, and at that point abusing ChatGPT sounds like a bad idea too.
So I think that's nonsense
Nice, so what? I seriously doubt that authors of the content crawled by CommonCrawl agreed to terms that their content will be used by openai. Moreover CC seems to be opt-in by default according to their faq:
> You configure your robots.txt file which uses the Robots Exclusion Protocol to block the crawler. Our bot’s Exclusion User-Agent string is: CCBot. Add these lines to your robots.txt file and our crawler will stop crawling your website
Again, I doubt that plenty of people are putting CC specific rules into their robots.txt, moreover I'm not naive and I doubt that in our reality where "move fast and break things" is THE motto for any big corpo any rules like that are respected at all.
This is only one small step away from blatantly copying.
Seems like a different discussion
We probably need a license.txt convention to resolve this.
In general, automated systems and humans are considered different by the law. For example: looking out the window and noticing that your neighbor is going to the shop is ok; building an automated system that tracks people everywhere: not ok.
> someone copying the web and claiming it's their own would be problematic surely?
Is it ok for humans to repurpose, repackage and regurgitate knowledge they've "scraped" and not software?
Once you’ve got characters in your world, the GPT models are pretty good at taking any arbitrary statement and rewriting it as if that character had said it. You can add in extra guidance too like having that character summarize it.
I don’t think it’s quite “one-shot” - it’s often an iterative process of copying out the bits you like and meshing them with your own writing. But I’ve found it’s pretty good to get the creative juices flowing.
What a spectacularly long and thorough list of items none of which want anything. The closest it got was some sort of evil wizard boss who wanted power. At several places in the description it filled in a bit more about how he wanted power, and control, and was seemingly a bad guy… and wanted power!
Why?
World building with GPT is clearly A Thing. Looks to me like it's nearly as good as real-human world building. Maybe better. It's quicker, more granular, and has infinite patience for every little item in a massive city with billions of fully realized inhabitants, if 'realized' means 'what do they have in their pockets, what adjectives fit them, etc'.
What do any of them want? How does their story play out?
It doesn't. You built a world instead of a story. Congrats. It's a classic trap to fall into.
In a more story-oriented approach you find the story and the main characters and then if you are smart you'll build the world around them. But secretly! If you make it obvious then it will feel manufactured, that fate is guiding the protagonist, not the protagonist's free will. Which is true: the author is fate and the protagonist has no free will.
Another option is to find the story amid the world. In an open world game you hope the player finds their own stories.
From a more technical point of view, I don't think you want the normal building/character generation to the main antagonists, the villain, or the hero. GPT can't hold itself back, and now every other building will have some character like this. Like if there's a big prison break from Arkham and the villains don't even work together (rendering many characters as one) but instead Gotham is filled with an apocalyptic danger on every street corner. If this tool was to have villain creation it should probably be a top-level thing: you make N villains and place them, they don't emerge organically in the fabric of the city.
All that said, perhaps a quick fix would be to change the current prompt from:
{
name: "FirstName LastName",
type: $building.jobTypes|first|repr, // Or $building.jobTypes|rest|repr
description: "[a description of the person, their profession or role, their personality, their history]",
arrives: "8am",
leaves: "6pm",
}
To something like: {
name: "FirstName LastName",
...
goal: "[a driving desire]",
flaw: "[a character flaw or weakness]",
}
This is another place where defining the schema as part of the city design could be helpful, as it might let you highlight what interests you about the people in your world.But inside of that consistent world, you now can have many stories. Pick out one of those detailed NPCs and explore their life and if you done the world right, then this can be an epic story.
> Neighborhoods are called "neighborhood"
I think in a practical application (i.e. a game), it might be feasible to "lazy load" the world. If I remember correctly, watchdogs 2 does something like this.
Need a new character? Just create it on the fly.
You'd have make be sure to create all the necessary background structures as neighborhood, family ties, etc as well. Or at least mark make sure you don't introduce (glaring) inconsistencies.
Basically, all the boring and well established stuff should be procedural and then use GPT to make it exciting by writing narratives and plots as well as adding the setting.
But talking to the mayor or the king or something, different story. imagine if playing Dragon Age or whatever you get to the king and ask rude questions and he politely tells you to piss off. or goes on random tangents about how lazy some of his courtiers are, etc.
How are you all exporting your chats in the meantime?