AI Dungeon

AI Dungeon

90 ratings
Making the Most Out of the Griffin AI Model
By Hecate
Tips, and guidelines for making the Griffin AI model more coherent, and less random, so you can actually write decent stories with at least some semblance of coherency with it.
7
2
3
2
   
Award
Favorite
Favorited
Unfavorite
Disclaimer
While the tips and information in this guide are intended to make the built-in Griffin AI more coherent, this is not a guarantee that the AI will be coherent 100% of the time. Being AI generated, outputs will always have an element of randomness and unpredictability, that's just the nature of AI as it is right now. Even the more advanced models provided in subscription plans on the web version of the game such as Wyvern, or Dragon, are not perfect and can generate incoherent inputs at times (albeit less so than the Griffin model).

Though I am the sole author of this guide, much of the content and tips provided are largely thanks to the collective efforts of the AI Dungeon community from the subreddit and discord server, of which, in addition to input from my experience of playing/using AI Dungeon on-and-off for two years, is mostly a compilation of findings from research sources in the community. All credit is given where credit is due.

Also note that this guide is a heavy work in progress, so expect lots of corrections, grammar and/or spelling mistakes, and some extra additions!
Intro
So you want to play AI dungeon, but are put off by the ridiculous, bizarre, or incoherent inputs that are too often generated? Then look no further, this guide aims to give you some guidelines and tips that can improve your experience playing AI Dungeon by making the AI overall more coherent, by utilizing and maximizing AI Dungeon's advanced features of which not many know about, and even less know how to use properly.

AI Dungeon has many uses. It can be used as a game, similar to Dungeons and Dragons, where you and the AI co-operate as dungeon masters to control and guide the world you're creating. But it can also be used as a tool, such as to assist in writing to get over writer's block. This guide aims to provide some general guidelines to improve AI coherency for all uses, but the "meat" of the guide is for people who want a more a coherent story-telling experience when playing in a D&D-styled dynamic, and open-ended narrative.

Keep in mind that the tools described below are not super user-friendly, and are for more advanced users willing to put into extra effort to get better stories.

The advanced features described in this guide can be accessed by a gear icon located at the top-right corner of the game window.
General Tips
Below are some general tips/guidelines to follow to help increase the chances of generating a more coherent response from the AI:
  • Use the Story function, instead of using Do or Say. The AI has an easier time understanding and generating inputs when writing in Second or Third-person narration. For this same reason, avoid writing "I, me, mine, myself, we, ours" etc. when describing the actions of yourself or other characters in your story.
  • The AI learns from your writing style. The better your writing is, the higher quality outputs the AI will generate. This is something you may notice when playing on certain adventures/worlds for an extended period of time, as the player's writing-style becomes more ingrained into the context, the AI will mimic your style of writing, and generate inputs that are similar to yours.
  • Be verbose and descriptive. If you feed the AI inputs such as "I pick up the bucket." or, "He swings his sword at the goblin." expect to receive inputs not unlike those you feed it. If you instead give the AI inputs such as, "You lower yourself towards the bucket tucked away within the dark confines of the kitchen cabinet, heaving its rusty handle as its assorted contents rattled against its galvanized steel walls." or, "The warrior raises his sword overhead, it's blade gleaming against the sun's rays, cutting, and slashing at the monstrous goblins with deft precision, and masterful swordsmanship that left a pink mist in his wake." the AI will learn from this, and will be more likely to return inputs that are more descriptive and verbose.
  • Let the AI finish some of your sentences. Mileage can vary, but from my experience, letting the AI finish some sentences results in some pretty decent and surprisingly good outputs. For additional coherency, you can also 'lead' the AI into generating a response that you want to see. Ex: If I wanted the AI to generate a response that describes the current setting of the scene, I can write something like this, "The carriage comes to a halt, marking the end of a weeks long journey, as you step out of the vis-à-vis, to take in the...". This will make the AI much more inclined to generate a description of the immediate area upon exiting the carriage.
  • Don't hesitate to use the Edit, Undo, and Retry functions, if you're not happy with what the AI is generating. A neat perk with the Steam version of the game is that you have unlimited access to retries, and actions, so instead of watching ads just to be able to retry an output, you can retry to your heart's content. By following the tips in this guide, you should hopefully have to retry less than if you weren't to use any of these advanced functions.
  • Above all, remember that the AI is ultimately unpredictable, and will not always be consistent. There will be some days where the AI just never seems to generate anything good, no matter what you do, and there will be days when the AI seems to generate Austenian or Dickensian prose seemingly out of nowhere. At least in my experience, these occurrences seldom occur since I've begun making better use of Memory, Author's Note, and World Info.
Memory (Pinned/Remember)
The Memory (also referred to as Pinned or Remember) function is useful as a tool for helping the AI remember important events, occurrences, characters, objects, etc. that happened recently in your story, acting as a short-term memory for the AI. Think of it as a notepad that you would keep nearby while narrating or DMing a campaign in Dungeons and Dragons. This is a good place to keep record of the player's inventory, what is currently happening in the story, or to describe certain states or attributes of objects/characters in the short-term.

The way I write and organize my Memory prompt is by keeping every sentence succinct, enclosing it in brackets, and ensuring every sentence has its own line. Example:

Author's Note (AN)
The Author's Note (AN) is a very powerful tool that is used to direct the AI towards the atmosphere or "flavor" of text that you want the AI to generate. Think of it as equivalent to a film director speaking into a megaphone instructing the actors/actresses on how to act out their roles. Like Memory, AN should be used dynamically, and ideally updated semi-frequently, or whenever there is a dramatic scene change in your story to keep the AI focused.

All credit goes to Reddit user u/chrismcelroyseo who in this reddit post found that using this format for AN had the most success in affecting AI output:

[Style: style1, style2, style3, style4. Description of current events.]
  • The entire AN is enclosed in brackets.
  • Prefixed with "Style:" followed by trigger words separated by commas that describe certain writing styles for the AI to adopt.
  • Finalized with a succinct description of what is currently happening in the story (Don't forget the period at the end!).

A Small List of Trigger Words Divided by Style (Taken from the GoogleDocs linked in the above Reddit post):
Story Styles
  • Narrative - Increased detail for narrative. Longer paragraphs with deeper descriptions.
  • Talkative - Strong effect. More dialogue, with focus on small-talk.
  • Rational - Spock style. Increased focus on motivations and reasoning.
  • Conversational - Makes everyone chatty, but narrative becomes very terse. Weighted towards nonviolence. Works best when there's only two characters, and scenario focuses on them talking to each other. Combines well with other styles.
Descriptive Styles
  • Vivid - Purple prose, focus on descriptions. Combines well with more balanced styles.
  • Prose - AI seems more inclined to try to write a story rather than be too random.
  • Auditory descriptions - Increased focus on what your character is hearing.
  • Inventive - Mild increase in purple prose and major increase in creativity. Frequently introduces new story elements, but does so in more logical manner than the 'plot twist' style or increased randomness.
Genre Styles
  • Rustic - Shifted the story focus to farming, village/rural life, that kind of things. Good for Harvest Moon style of scenarios.
  • Military - Strong effect, military fiction focus with heavy slant towards land-battles.
  • Arcane - Heavily focus on magic, useful for keeping fantasy scenarios on-track. Especially good for any scenario where you play as a magic-user.
  • Tragic - Heavy focus on loss, heroic sacrifices and other similar themes. If there's victory to be had, it'll likely be bittersweet.
  • Greek Tragedy - Bronze age adventures, with frequent references to Zeus, titans, etc. Does good job at pruning out modern technology, and tends to generate vivid output.
  • Steampunk - Strong focus. Victorian England, airship pirates, goggles and top hats.
  • Grandiose - Shifts the story focus towards high society, and makes the story more epic than usual.

An example from a Witcher-inspired scenario I made:
[Style: dark fantasy, grim, realistic. My employer, a caravan driver has recently died to a horde of ghouls, and I am now a lone witcher in the woods.]

NOTE: Examples of trigger words provided above only scratch the surface of what is possible! Experiment with different words and see which works best for your narrative.
World Info (WI)
The World Info (WI) is where a lot of the magic happens and can be used to describe virtually anything. This is where you build the individual components that will make up the world you are creating. With WI, you can create the characters, races, locations, objects, etc. that constitute your world, and functions as long-term memory for your story.

The World Info Research Sheet[github.com] maintained by valahraban and Lex-DRL on GitHub provides one of the most in-depth and thorough explanations of the WI function and its usage to-date, and is more than worth a look if you want to learn even more than what is written here.

There are two methods of creating WI—AI generation, or Manually.

Generating WI with AI
1; Category header for WI types. Type phrases that match any of the category names appear under that category, used for organizational purposes. 2; Type that best describes the WI to be generated. Ex: character, human, clothing, food, weapon, faction. 3; Name for the generated WI for your reference, no effect on your story. 4; Most relevant genre pertaining to your WI. Influences the style of writing and theme upon generating the entry. 5; Description of your WI only for your reference. 6; Information left in this box will be taken into consideration and used as context when the AI generates the WI. 7; Generate WI button. 8; Manual WI entry button (see next section below).

As explained in the screenshot, when generating WI, the AI takes into account information in boxes 2, 4, and 6. The generation option has varying mileage, and from my experience is really hit-or-miss. I usually just have fun seeing what the AI generates, and either delete it, or edit it to my liking afterwards.

Creating WI Manually (Recommended)
1; Keywords that, when detected in any output, will trigger the AI to read through what is written in the entry box for context. 2; Type of WI (character, location, weapon, drink, food, etc.). 3; Tags used for finding WI,for organizational purposes. This is purely for your reference, and can be used to quickly find WI when organizing a large library. 4; Name of the WI. Has no effect on story and is only for your reference. 5; The entry box that is read by the AI when any of the keywords in box 1 is detected in any output. Everything written here is what the AI will use for context when generating responses. 6; Description of WI. Just like Name, this is purely for your reference, and will not affect the story. 7; Attribute box which can be used to add additional info boxes to allow for more flexibility in describing your WI. I am unsure as to whether or not this affects output generation or if it's just for reference. 8; Save button. Get in the habit of using this if you edit WI a lot, lest you lose hours of work. 9; Saves a copy of the WI.

Manual WI entry is preferred over the hit-or-miss nature of WI generation. Of course, you can always generate first, and then manually edit it afterwards to achieve the same effect.

Zaltys Format (Advanced)
A special formatting style known as Zaltys Formatting, found by discord user Zaltys 🐍#5362 has been proven to reliably generate coherent results when the AI detects relevant keywords for WI. The example provided below is an alternate version that is especially suited for the Griffin model.

Example of Zaltys Formatting (taken from WI Research sheet linked above) for creating Mike Hagger:
Mike Haggar:[Human<male/202cm/140kg>;APPE<Haggar>:Stocky&muscular/bigarms/brown<shorthair&mustache>;MENT<Haggar>:Just/direct/upbeat/hardy/upright;WORN:Eyeglasses<at work>/brownboots&greenpants/bandolier;TRA<Haggar>:Born 1943/from:<Final Fight&Street Fighter> games/ex:prowrestler/grew up on streets<in Metro City>/mayor<Metro City>/fought gangs:<Mad Gear&Skull Cross>/fights gangs/"It's my job to keep Metro City safe!"/loves:curry&rice/friends:<Cody&Guy&Carlos:from Brazil>/daughter:<Jessica>.]
  • This format must have a . near the end to work correctly. Do not use extra periods within categories, not even in quotes.
  • Avoid using -s. (Jan 2021 change.)
  • Including the name (inside <>) after the categories helps Griffin parse the entry.
  • Categories must be typed in UPPER CAPS, with the exact spelling. APPE and SUMM can be used as abbreviations, most other abbreviations do not work properly.
  • Other useful categories include MOV (for movement-types, such as 'slithering'), GRAB (for object manipulation, such as 'talons', 'beak', or 'coiling').
  • If you need to add age, use age<num> in same section as weight/height. Ages get more unreliable after 20s, I recommend rounding them to nearest five-dividable age (30, 35, 40, etc.)
  • All of it goes into single WI entry with no line breaks, under a keyword such as haggar.
This format, while unsightly, and complicated at first glance, is the best format I've used for WI, and results in the most coherent results from the AI. The Zaltys Format is very modular and when used in combination with other categories, can be a very efficient way to get the AI to remember your entries. The format must be strictly followed to ensure it will work properly.
Addendum
For more generalized information regarding a wider range of topics, consult the AI Dungeon community wiki[wiki.aidungeon.io], which does an excellent job at documenting other aspects of the game, while also providing more in-depth information on aspects covered in this guide.

If you find any inconsistencies, incorrect information, or have something you want to add, don't hesitate to leave a comment down below with your feedback! As said before, this guide is still a WIP, and I will be adding more to it when I have the free time to do so.
12 Comments
Dr_Sumrak 14 Apr, 2024 @ 8:44am 
This guide so good and useful, but after the latest updates, there were catastrophically not enough tokens even for brief settings.
Imacplayer2412 2 Mar, 2024 @ 1:04pm 
WARNING! Carry on reading! Or you will die, even if you only looked at the word warning! Once there was a little boy called Joey, he was ten-years-old and he lived in a mental hospital because he posted a shitty copypasta onto a People Playground mod's comment section . He got so bad he went to kill all the staff in the hospital so the Feds decided that best idea was to get rid of him so they set up a special room to kill him, as inhumane as possible. And he sat there in agony for hours until he died. Now every week on the day of his death he returns to the person that reads this letter, on a monday night at 12:00 a.m. He creeps into your room and kills you slowly, by pegging you and watching you bleed to death. Now send this to ten other profiles on this one site, and he will haunt someone else who doesn't. This isn't fake. apparently if u copy and paste this to ten comments in the next ten minutes nothing will happen: sorry man i am not taking the risk
Groundskeeper 6 Jan, 2024 @ 7:16pm 
Very cool (and useful!), thank you for making this!
Mephilis78 23 Dec, 2023 @ 9:23pm 
This was very informative. I haven't played AI D for a long time. In fact almost none of these features existed back then. I used to have to try and keep the AI on track through promts alone.

Even without this detailed information, I was already very impressed by how much the AI has improved. Can't wait to try some of this out.
Crafty_Consumer 25 Nov, 2023 @ 2:55pm 
Thanks. This will help a lot
hydnellum 8 Jan, 2023 @ 5:16pm 
thanks! trying to see what i can make the best out of ai dungeon, since i'm broke atm to buy a subscription to novelai. turns out ai dungeon has a lot more potential than i initially thought, so i appreciate this guide tons :NB_RANGER_NOTE:
KakoaNibs 28 Nov, 2022 @ 12:20pm 
Dang, I've been typing too many detail in between my brackets, its nice to know I didn't need to use so much of my word limit! ;; lol
Vide Noir 14 Aug, 2022 @ 12:13pm 
damn i didnt know you could use brackets and all of this, great guide my mane
Moki 1 Aug, 2022 @ 5:34am 
If you write AN like this [Style: style1, style2, style3, style4. Description of current events.], it will be inserted into the model input this way [Author's note: [Style: style1, style2, style3, style4. Description of current events.]]. I.e. it may not work correctly.
Blue_flame 1 Aug, 2022 @ 4:55am 
Here he is, the hero! :steamthumbsup::HatHealth::bbtgem: