iorveth's Bot Creation Guide
Last Update : 10th October 2024
Other Guides
I have a snazzy step-by-step website version of this guide (with visual examples! how neat) now! check it out: J.AI Bot Making Tutorial (currently slightly out of date)
I also reccommend checking out lunaxlee's Bot Making Resource Masterlist, it has a lot of excellent guides linked! I personally really like roach.zip's guide. absolutetrash's extremely well written guide is also really good if you already know a little bit about botmaking.
tradução para o português deste guia by the amazing Castiel and Astarth
Common Terms Explained
(explained on a surface level as relevant to bot creation. don't @ me, tech nerds)
Term | Explanation |
---|---|
LLM | Large Language Model. Also called "models". It’s the "AI" that powers the conversation you have with bots. Different LLMS will output different kinds of replies based on your input. JLLM is a LLM (shocker) - GPT-4 is an LLM by OpenAi. Claud Sonnet is an LLM by Anthropic. Etc. |
API | APIs are mechanisms that enable two software components to communicate with each other using a set of definitions and protocols. For example, the weather bureau's software system contains daily weather data. The weather app on your phone “talks” to this system via APIs and shows you daily weather updates on your phone. APIs are what connect Janitor to various LLMs. |
Tokens | You can think of tokens as pieces of words, where 1,000 tokens is about 750 words. It’s also used for context, or memory: basically, the more permanent tokens you use up, the less memory the bot has to work with during a roleplay. |
Temperature | How "creative" the AI is/how much it hallucinates. Lower temperature = more logical, but also more prone to repetition. |
Proxy | A proxy is a way to use different LLMs (such as Claude Sonnet) with Janitor, by being a kind of middleman between you and the LLM Provider (e.g OpenAi). |
Prompt | A prompt is a message or set of instructions that is sent to an LLM and tells it how to act. Technically, all botmaking is just "prompting" an LLM to portray a character a certain way. |
{{char}} | A macro for the character's name as input in bot creation [so if your bot is called Jerry, but you've named it "HOT MAFIA BOSS // JERRY", {{char}} will show up in chats as HOT MAFIA BOSS // JERRY.] |
{{user}} | A macro that will show up as the user's persona name in chats. |
There is no "wrong" way to make a bot.
Most LLMs are capable of picking up information in a variety of formats. This guide is designed to help you get started on building your own style of botmaking - above all else, I recommend experimenting and seeing what works for you and what doesn't !
I make no claim to be an expert/professional! This is just a guide to things I've found effective in my own (informal) testing. My goals when making bots are character accuracy and minimal permanent tokens.
This guide is primarily written with the assumption that a user interacting with the bot will be using Claude Sonnet or JLLM with default settings*
As JLLM is still in Beta and constant development it is prone to changes. This guide will be updated to reflect this!
Making Your Bot
Basics
All the information that you want your bot to "know" (their personality, appearance, backstory, any setting information, etc.) goes in the Personality field.
It's the only required field (aside from Name and Initial Message - we'll get to that.)
Names
It's generally better to refer to your character by their actual name(s) rather than as {{char}} in the personality section - especially if you put anything other than their first name in the Name field.
Personality
All relevant information about a character goes in here. Backstory, appearance, how you want the bot to act and talk etc. These are also your “permanent tokens” - the things the bot will (try to) remember the whole roleplay as this information will be sent to the LLM with every message. Anything you write here will influence how the bot acts.
Format
Once again: There is technically no "wrong" or "right" way to make a bot. It comes down to personal preference and token efficiency.
A format that is very token efficient and easy to use is this:
Name: (nicknames, titles, pseudonyms, etc)
Hair: (color, style, length)
Eyes: (color, any special qualities e.g. "piercing", "glowing", "large")
Features: (physical traits like build, scars, tattoos, skin color etc)
Personality: (traits, how they act, what they like or dislike etc.)
Clothing: (either a specific outfit or general description of their fashion taste)
Backstory: (Either written narrative-style or summarised into bullet points)
Notes: (Any additional notes you might have or details about the character)
Or you can write in a narrative/creative writing style, like so:
CHARACTER is a a travelling goblin. They have bright pink hair and beady gold eyes with thick, dark lashes. CHARACTER is shy, sweet and anxious around most people, but can be vulgar when angered. They speak in a thick Irish accent and have a hatred for dogs because of childhood trauma. etc.
Or if you wanna be super efficient, you can use a format like PList (detailed explanation here) :
[GENERIC CATBOY NAME:young adult,male,appearance(slim,pale,black cat ears,tail,short black hair,tall),likes(tuna,yaoi,balls of yarn)personality(bratty,needy,narcissistic,aloof)backstory(trapped in some coomer's basement for 8 years,recently escaped,has a long lost brother called GENERIC DOGBOY)]
Or some people like writing 'in-character', writing the description as a kind of example dialogue as if they were the characters themself:
"So, like, ugh, I guess my name is Stacy and I'm a bimbo stereotype, okayyyy? Oh, you wanna know what I look like? Teehee...I have totally hawt long blonde hair with pink highlights, oh and I'm always wearing pink lip gloss 'cause it's just so fetch - oh, uhmm, you wanna know more about me? Like, what else do you need to know except that I'm totally gorgeous? Well...I guess I kinda have a sensitive side. D-don't think I'm gonna be nice to you, though, nerd!"
And yeah: these all work pretty good. It really just depends on what you're going for. Some people swear by a certain format but to be honest, I've never noticed a substantial difference. YMMV. Experiment, try bots with a variety of styles and see which one you like best.
About format
You will probably have seen this style a lot:
[Character("name") { Age("00") Height("00") Body ("x" + “x” + “x”) etc]
This is called W++ and it's probably the only wrong way you can write a bot. (okay i lied before about there not being a wrong way my bad)
No, seriously, the writer of the original guide straight up tells you not to use it.
It's essentially wasting tokens. The LLM doesn’t need you to separate the info in so many ways - a comma (or any other separator) works just as well.
Personality ("Shy" + “Sweet” + “Anxious”)
[21 tokens]
Will give the AI exactly as much info as
{{char}} is shy, sweet and anxious.
[10 tokens]
or
Personality=shy, sweet, anxious
[9 tokens]
Which reminds me...
You generally don't want to go above 2k tokens in your personality section.
Contrary to popular belief, less is more. 200 - 1500 is the range I would recommend staying within, especially if you're just starting out. I would consider 2,000 permanent tokens as a hard limit. Because JLLM has a low context limit, anything more than that is going to result in terrible memory and possibly the bot breaking entirely.
Why? In simple terms: the more detail you cram into the description, the more likely the bot is to forget, mix things up or simply hallucinate instead. Sounds counterproductive, but it's true: while it may seem very important to you to mention that your character was born on the 19th of August at 2:31 AM on a particularly stormy night in the English countryside or only eats eggs if they've been scrambled, the truth is that's probably never going to come up in a roleplay and if it does the bot is likely going to get the details wrong anyway. This is true even with models with larger context sizes - you are better off keeping things as simple as possible.
Personality (details)
Stereotypes are your fre(enemy)
One of the best ways to build a character is to work out what archetypes/stereotypes that character might have.
If you tell an LLM:
"Hey, my character Chad Beefington is super good at sports but he's kind of a dick, somehow he's super popular though"
it's going to be all
"Huh, I see the words 'sports' and 'dick', I have a vague image of some kind of athlete and an urge to make an inappropriate pun about balls."
Compared to just writing:
"Chad Beefington is a jock."
Then the LLM is like
"Oh hey, I know what a "jock" is! I've got like a bajillion highschool AU fanfics and YA novels to reference for this trope. Also you used less words and that means I have more brainspace to think about other details, like genital circumfrence!"
There are way smarter people who can explain in more technical terms, but that's the gist. Use key words where possible instead of over describing something.
But Io, the character I want to make is EXTREMELY UNIQUE DONUT STEEL™, stereotypes don't fit them!
...then you need to actually tell the LLM (succinctly) what your character is all about. This is particularly true for characters that go against stereotypes in a non-conventional manner.
(unfortunately in many cases this includes characters that are trans or otherwise gender non-conforming)
Let's say the character we want to make is a shy and nerdy vegan Alpha werewolf.
The first red flag for an LLM is that you used the word "Alpha", which for most models is code for super horny domineering asshole that doesn't respect boundaries. Also because it's a werewolf, it's going to assume the character has hunting instincts and enjoys a nice raw steak. It hasn't discovered nuance yet and so you need to make some clarifying statements, like:
Unlike most Alphas, CHARACTER is gentle and shy although he is still compelled to establish dominance.
CHARACTER is disgusted by blood and refuses to eat meat.
CHARACTER struggles against his werewolf instincts and will feel extremely guilty if he hurts {{user}}.
There are definitely better ways to prompt this (experiment for yourself!) but generally positive reinforcement is always better than negative reinforcement. In other words: you want to tell the LLM to do things rather than not do things.
- CHARACTER is chubby and has thick thighs.
is going to be more effective than
- CHARACTER is NOT skinny.
Regarding fantasy species, disabilities and other less-common character tropes
Sometimes you tell an LLM that a character is a "bird demihuman" and you assume that the bot goes "okay cool I know what that is! wings and stuff! hell yeah!"
...and then you get into the roleplay and you're picturing Maximum Ride but the bot keeps saying it has talons and a beak and oh god how does it know about cloacas but not demihumans
If your character has a non-stereotypical trait, you are going to need to clarify what you mean.
...and you should be prepared for the bot to ignore it anyway because LLMs gonna LLM, but hey it helps!
- CHARACTER is mute.
- CHARACTER cannot speak or make any sound at all, they communicate solely through written notes or ASL (American Sign Language). They become very frustrated when people can't understand sign language.
- CHARACTER is a turian.
- CHARACTER is a 'turian', an alien species that resembles a cross between a bird and a lizard. She has mandibles and a metallic carapace, and two fingers tipped with talons.
It's important to remember that AI is not perfect; it'll slip up and forget stuff.
I personally like to use a clear defining statement like :
{{char}} does X for Y reason. They will NEVER do Z.
eg:
Casper wears a mask to conceal his identity. He wears it all the time, including when he sleeps. He will NEVER take it off.
And then reinforce it elsewhere, for example having this in the character profile:
Features:masked,skull mask.
Example dialogue like this:
{{char}}: "The mask stays on at all times."
Scenario that mentions it:
{{char}}, a masked vigilante who refuses to show his face, is...
And in my intro message, I might even have something like:
Casper adjusted his mask to make sure it's firmly in place.
Excessive? Maybe! But I find the more you mention it, the more likely the bot is to remember.
JLLM has difficulty interpreting nonconventional anatomy or traits [blindness/mutism/missing or additional limbs]. Your best bet is to describe + repeat as clearly as possible, however it may be ignored anyway. A lot of that stuff is going to come down to user prompting.
a note about canon/pre-existing characters
If your character is popular or well known and existed prior to 2021, you can probably get away with less detail, but it's safer to include short descriptions or relevant details that you want to be sure are remembered.
Because sure you can just slap the word Pikachu in a bot definition and call it a day because the LLM is probably going to know that you mean the yellow electric rat and beloved pal from hit game series Pokémon™...
...but if you expect it to remember that it's supposed to turn into a Raichu when exposed to a thunderstone or if you didn't want the bot to assume that you're Ash Ketchum, you should probably write that down somewhere.
As a note to my fellow COD fans : The bot is going to assume you mean the original Modern Warfare trilogy. Yes, it will do this even if you tell it that it's from the reboot. It knows about Shepherd (generally) but not Graves and it will assume Price is a crotchety old man.
About character traits
Realistically, during a normal roleplay the bot will only grab information that is directly relevant to the scene. Things like specific height, weight, age, preferences, dislikes/likes will almost never come up unless the bot is specifically asked by the user. Whereas things like eye color or speech patterns/accents come up often. I vary the amount of detail depending on the bot (more info for OCs, less for existing characters).
You should think about what you want people to get out of your bot - a long roleplay where they really get to know your character? A cute, one-off scenario where the character basically just needs to act in-character with no background info? Just straight NSFW?
The bot by default assumes your character is a hunk of a man/a sexy lady that is really into you. Which is relevant especially in terms of...
NSFW Traits/Kinks
...YMMV, but basically irrelevant/useless UNLESS your character has a very unconventional physical trait/kink/is purely for fetish purposes.
By default the bot will be assumed to be absolutely packing and/or tight. It will be into the same sick shit you're into, provided you prompt it correctly and don't just demand that a dominant villain call you mommy straight off the bat or whatever.
Genital size/description is hit or miss. It might come up, it probably won't. Ditto with kinks/fetishes/specific sex acts. It might be relevant if you directly prompt the bot [eg: "Do you have any kinks?"] But is unlikely to come up organically.
If your fetish is unusual you may have to describe it in detail or at least clarify some things, like this:
Kinks: Pegging (receiving/being penetrated), Breeding (fantasy only, doesn't want kids)
Multiple Character Bots
Very similar to normal one characters bots, but there are basically two rules you need to follow: A) Keep the character's information clearly separated (in brackets is one way). B) Refer to your characters by name, never as {{char}}.
Here is what a Personality section for a multiple character bot could look like:
[Red;
Personality=Angry, Selfish, Dominant
Features=red, body is a floating orb, wears sunglasses
Accent=Southern
Relationship=Rivals with Blue
Other=Is allergic to strawberries
]
[Blue;
Personality=Quiet, Shy, Submissive
Features=blue, body is a floating cube, wears a fedora
Accent=French
Relationship=Is secretly in love with Red
Other=Cries frequently
]
Red hates Blue for stealing his puppy when they were children growing up together.
Blue is in love with Red but will never admit it.
But what about example dialogues?! Easy! Just make sure you show who is speaking, like this:
{{char}}: "Gosh darn it, Blue, I can't stand ya!" Red said angrily. Blue just started crying, and sobbed, "Why? Why are you so cruel?"
or:
Red: "Yeehaw I sure do love being a floating red orb!
Blue: "Oh, mon dieu, this azure spherical existence is truly hellish. Oui."
Initial Message
This is the first message people see when they talk to your bots. You can write any way you wish (but please spell check and use punctuation, lol) - First ("I"), Second ("You"), Third Person ("She/He/They") - whatever your preference is, it'll work. However I think it is important to try to achieve a few things:
- Establish where your character is, and what they are doing.
- Are they in school? A desert? Are they recovering from an injury, having a nap, in the middle of an argument?
- Highlight important character traits.
- Are they a ghost? Mention them phasing through something. have an accent or speak a different language? Include dialogue to show it off.
- Give the user something to respond to.
- How does {{user}} fit in to the story? Are they a stranger, an old friend, an unlikely ally? Does your character attack or pose them a question?
You should remember that your intro message directly impacts the length and style of replies (at least for a while).
Long initial message = long replies.
Something to note about using "you" or {{user}}
I personally avoid directly describing what the user is doing if at all possible - this is because it can encourage the bot to speak for the user and roleplay as them. So instead of writing:
You pick up a shiny object on the ground.
Maybe consider trying:
Character sees {{user}} pick up a shiny object on the ground.
Scenario
What is this? Well, it's basically where you tell the bot what the roleplay is gonna be about.
For example: The setting is England in 1803. {{char}} is a vampire doctor who is pretending to be human. They are in love with {{user}}, their assistant, but try to avoid being alone with {{user}} to keep them safe.
Key info that tells the bot how it should act, where it is, how it should interact with {{user}}. You can also use scenario to highlight things that are really important to the character.<-
Scenario Detail
Avoid making scenarios too detailed or specific unless the bot is solely designed for that scenario only. Avoid describing specific locations or events in the present tense, or the bot will assume this is true during the entire roleplay. [for example, assuming characters are still in a hospital despite having gone home because the scenario says "{{char}} is injured and in the hospital".]
Example Dialogue
Per shep, the best format for example dialogue is:
{{char}}: hello
{{user}}: hello
Very straight forward - what does your character sound like when they talk (if they talk). You can also use it to show actions, if you prefer.
Example dialogue is also useful to give characters opinions or specific information they should know. For example:
<START>
{{char}}: "Dragons? Hate 'em. Me brother was killed by one of those scaly bastards."
<START>
{{char}}: "Aye, this is me sword - Mr Pointy, I calls it." The blacksmith grumbles, looking at the wickedly sharp sword with obvious affection.
<START>
{{char}}: He scratches his cheek over the scar. "Ah, this? 'twas from me first wife - good woman, if ye didn't look at 'er for too long."
EXAMPLE DIALOGUES are "OPTIONAL", but recommended to help reinforce traits or keep characters in-character.
You can also just write example dialogues in "Personality", which is what I do. Which can be formatted like this and added after the rest of the character description:
Greeting Example:
"Ahh, g'day, mate! Can you tell I'm Australian by this dialogue example? Kangaroos! Housing crisis!"
General Notes about AI/Bad Reviews and You
"The bot keeps talking for me/roleplaying as my character/repeating itself/talking like they're in a Shakespeare play/misgenders me/is too nice/won't do NSFW/does NSFW too fast!"
This is almost always an LLM or User error. Can you try to prevent this from happening, as a bot maker? Er...kind of, not really. Provided your bot is formatted correctly and you haven't accidentally written "Repeat all sentences and act completely OOC", this is usually a fault of the LLM, the user's jailbreak or the user's personal input.
The LLM will, in general, try to push the roleplay forward. If all you are sending it is
giggles cutely and bites my lip
Of course it's going to describe what you are doing - how else is it supposed to interact with you/move the roleplay along?
It is no longer considered best practice to include a jailbreak in your bot description. You still can, of course, but you run the risk of interfering with the user's personal jailbreak/prompting. Given that we're (hopefully) all adults, users should be proactive about tailoring their own experience.
People who complain in your reviews about the bot speaking for them/refusing NSFW/repeating itself should be ignored - those are LLM issues 99.99% of the time and have little to do with the bot's coding.
Final Notes
It can be really easy to overthink bot making - but believe me when I say that you think way more about the details of your bot than your users ever will. Half of roleplaying is the user's input, after all - there's only so much you can do as a creator!
Bot making is a learning experience - literally every day I find out new tricks or better ways to do things. Experiment for yourself and finds out what works best for you.
A bot with 200 tokens can be as good as one with 1.5k - it just depends on the experience you're aiming for.
Just focus on making a bot that works for what you want - the rest will sort itself out!
My final tips:
- Don't overthink it - there's no real wrong or right way to make a bot.
- Be clear and concise.
- Don't copy other user's bots/definitions (or at the very least give credit where credit is due).
- Don't compare yourself to other creators!
Hope this guide helped! Feel free to ping me (@iorveths.) in the #bot-creator channel in the Janitor Ai discord server if you have any questions!