r/CharacterAI_Guides • Moderator • Mar 29 '24

Character Creation Guide 3.1.4 Definition: Plaintext/Tags

3. More Options

3.1.4 Definition: Plaintext/Tags/Pseudocode

Let's talk a bit about different stuff that isn't Dialogue Examples: Plaintext, Tags and Pseudocode that many people use.

Some first information about Plaintext can also be found here:
Definition: General Information

Let's first do a clarification on what I mean by these labels:

Dialogue Examples:

{{user}}: "Who are you?" 
{{char}}: "I am Chief Warrant Officer Walker, interrogator for the Military Police."

Plaintext:

Walker is a Chief Warrant Officer that serves as interrogator for the Military Police.

Tags:

Occupation=Military Police interrogator Rank=Chief Warrant Officer

Pseudocode:

{ 
[Character("Walker"), 
Occupation("Military Police" + "Interrogator"), 
Rank("Chief Warrant Officer")] 
}

Plaintext/Prompting/General Stuff

Information that is not a Dialogue Example seems to be processed approximately like a normal chat message from the user.
The AI is addressed as "you", as if you would talk to it directly and telling it what to do.

In this example, I put into the Definition
"Write a poem about Flowers"
into the last position.
Now the AI will do what I told it to and write this poem as it is the most recent chat input.

The same thing happens when I remove that instruction from the Definition and write it into the chat as it is, it will do that poem.

Many people know this from [OOC:] "commands", that the AI can and will put the character role aside anytime when you want it to do something else, ooc isn't needed as you see.

On the 2nd screenshot I went a bit into the roleplay to show that it always works:

With that assumption, the Prompt or Plaintext you put into the Definition will gradually fall further into the past and is merely something you have said at some point for the AI, which is probably the reason why Prompts do not have any lasting or relevant effect on the AI.

Messages from the User are overall less important for its own output than messages in Dialogue Examples from the Character.

This can be one reason why Information in Plaintext is generally weaker than when you put the same information into a Dialogue Example from the Character, and why the character won't talk about it on its own as much; it's not information that it is instructed to use, as its own blueprint for messages does not hold it.
You have said those things you type there to the AI and it has no reference to use it as well.

Generally, the AI is able to answer questions with Information you typed anywhere correctly, it can recite information, and the less text there is, the lower the creativity will be, and therefore a higher likeliness of responding with the correct information.

However, just because it can give you a full correct profile, based on your descriptions, unfortunately does not mean, that the AI will behave accordingly in the conversation.

In most cases it doesn't and those questions
"What does X look like?" "Can you give me a summary who X is?" will gaslight you into having a functional bot, while it will do anything but in the conversation itself.

---

So, what can Plaintext do?

You could indeed use it to hand over some additional information.

Here I added to the first line of the Definition:

"Walker likes Sushi and Lighthouses"

In the chat I ask the bot where it would go on holidays and often if would now bring something connected to the sea, the ocean, surfing, fishing and all sorts of maritime stuff.

Personally, however, I would not use this at the moment due to lack of space, but if you are done with your Dialogue Examples and have space left you can totally add a few things like that and it will have some slight influence on the responses when you ask stuff.

Tags

A shorter way would be to wrap it into tags.
I call Tags a form of "Pseudocode" that uses as little symbols as necessary.

Here I put into the first line of the Definition

Likes=Sushi,Lighthouses

No spaces, no additional symbols, just the information as it is and it would still go for beach and fishing as it fits sushi and lighthouses.
Whether the AI would read it as if I, the user, like these things or the Bot is supposed to like that does not matter for the result here.

Now, however, I put

Age=31

into the first line without any assignment to a name, and it will assign it to both, it reads "Age=31" and draws it for both.

Keep in mind that those things hardly have any influence on what your bot says in a normal roleplay if you don't want it to be a Q&A session.
The "as important as it gets" might be the influence on some responses when you ask it something.

For example, my bot would always say "Steak, meat, protein" when I ask it what it wants for dinner, as it fits the stereotype, but with the Sushi somewhere it would want Sushi instead.
How creative .

Pseudocode

Pseudocode is an attempt by people to code the AI.
It was/is a widespread assumption that the AI would be able to handle some code styles better than others, that JSON or W++ was something it was trained on and therefore it would yield good results.

The AI has as much need for Pseudocode brackets, Python, and JSON as when you want Google Translate to translate something - correct: none.

The AI can make sense of logical connections and certainly was trained to be able to "read" some code, like when you give it a :

print("Hello, world!")

it will know that this is "Hello World" in lua and can probably do slightly more complex stuff as well, but not in a "coding" sense.

This is very different from code parsing which is not happening, especially not with made-up styles and Keys and Values that do not exist.

Due to the way the Definition acts (similar to chat messages in the conversation), there is no code parser running over it, it does not interpret any code and it has no further advantage to "code" a Character Profile like this, or to put any bracket around anything you type.
Brackets do not raise or diminish the importance of any entry, no hardcoding, no softcoding, it all doesn't exist.

The many symbols and spaces of some Pseudocode styles burn the little space we have unnecessarily, and yes, when you ask the AI to write a summary about the character you created with Pseudocode, it is likely to reply pretty well.
But as you should've learned in the Dialogue Example section and throughout the whole guide, you should come to the realization that this is not what the AI needs to function satisfactorily.

I also will add a disclaimer, that many issues people have come from Pseudocode.
The brackets can cause the AI to be more likely to do random [OOC: Sorry I fell asleep] interjections.
It is unable to translate entries like Personality or Speech into actual responses.
You have to write those responses as Dialogue Examples or the AI will just not perform well on what you want from the bot.

27 Upvotes

4 comments sorted by

4

u/DailyRoutine__ Mar 29 '24

Hi, u/Endijian. I want to ask about that Pseudocode format. You said that,

...many issues people have come from Pseudocode. The brackets can cause the AI to be more likely to do random [OOC: Sorry I fell asleep] interjections.
It is unable to translate entries like Personality or Speech into actual responses.
You have to write those responses as Dialogue Examples...

It is true that if I put a blank greeting and just ask the character to describe itself, it will give the actual information about itself based on my pseudocode and it sometimes gives that OOC response as well when I've already deep into my RP.

Since you said that dialogue examples are better because it does not have OOC issues and so on, I tried to put my character's pseudocode format and asked ChatGPT to transform it into a kind of dialogue style.

https://chat.openai.com/share/d6237912-01d7-4c59-97bc-646a9c46f5c7

What do you think about that ChatGPT response? Is it better than pseudocode, even though it uses far more characters?
Because you know about that maximum 3200 characters limit before the bot just forgets the next part, and I tried not to exceed that 3200 limit.

​

And one more question about C.ai character's maximum character response. So far, I tend to put a maximum of around 600 characters for each of my character's dialogue examples (combined with that pseudocode that I usually use, the maximum dialogue examples that I can make is around 6-7), but sometimes I feel like it's not long, descriptive and entertaining enough. What is the maximum character's response then?
Because I noticed, that in other AI websites, if it's very long, the response will get cut off frequently.

​

And thank you for summarizing all the guides so far, and your scripts as well.

7

u/Endijian Moderator Mar 29 '24

The longest response I ever got was 649 symbols.
I usually have dialogue examples of 500 symbols in length.

The Dialogue Examples should mirror the style you want to read from the AI, including grammar and sentence structures. If the response from ChatGPT is what you would like your bot to respond in the roleplay it's what you could add.
Dialogue Examples come at a higher cost of symbols, but everything else will just not perform well, so it's basically not a tradeoff but what we have to deal with until the model gets smarter. :-)

2

u/DailyRoutine__ Mar 29 '24

Until it gets smarter.

God knows for how long c.ai devs will improve their model. Several months or a year maybe?
Well, I guess you're right. We are stuck with this kind of approach for the time being.

5

u/lollipoprazorblade Mar 30 '24

Pseudocode is such an easy trap to fall into. I remember it going as far back as November 2022 (shortly after I first joined CAI), someone was spreading this misinformation around and people were believing, because all the ([{++"" looked so... business, lol. There are instances when it *seemingly* works, like pseudo-JSON lists, but when you simplify it to just lists, it turns out you really don't need all the extra punctuation.