Generation Nodes

Generation Nodes

Generation nodes bring the capabilities of large language models such as ChatGPT directly into Charisma, giving you the flexibility to safely mix both author-written replies with generated replies.

Generation nodes are only available to enterprise customers. If this is of interest, please reach out and let us know.

After a generation node has been created in the graph, you can click 'Edit prompt' to get started.

Selecting a model

There are currently two models available, text-davinci-003 (commonly known as the most powerful GPT-3 model) and gpt-3.5-turbo (commonly known as ChatGPT).

It's recommended to start with the ChatGPT model as this is the most powerful model.

Writing a prompt


ChatGPT expects every message in a prompt to have a role associated with it. This can either be system, user or assistant. For more information on the roles, see the OpenAI docs (opens in a new tab).

Charisma supports using multiple message in a single prompt by prefixing a block of one or more lines with system:, user: or assistant:. Here's an example:

system:You are roleplaying as a fisherman, having a conversation with <player_name>.
system:Say something about fish:

Generally, system prompts are the most useful, though you may find you have use cases for other types of prompt.


GPT-3 is simpler than ChatGPT, and expects only text with no associated role metadata. Here's an example:

You are roleplaying as a fisherman, having a conversation with <player_name>.

Say something about fish:

Using prompt variables

In the above examples, we saw the use of <player_name>. You can use any Charisma memories directly in the prompt! Simply use the same angle bracket syntax as in Character nodes.

There are also some special prompt variables which allow you to inject other useful bits of text.

  • <STORY_DESCRIPTION>: Whatever was put in the story description on the "Story Overview" page.
  • <GRAPH_DESCRIPTION>: The description entered into the scene or subplot, by clicking "Edit details..." under the graph in the sidebar.
  • <MESSAGE_HISTORY>: The last few character and player messages in the conversation, in the following form:
Player: Hello there!
Character: It's good to meet you.
Player: Nice to meet you too.
Character: You're a pleasant one.

Note that Character is replaced with the actual character's name.

By default MESSAGE_HISTORY returns the latest 10 messages. You can increase or reduce this by putting a number in brackets specifying the number of messages you want to return, such as <MESSAGE_HISTORY(2)> for the last 2 messages.

  • <PLAYER_MESSAGE>: The text of the currently considered player message (without Player: like in the MESSAGE_HISTORY). A generation node with this in the prompt can only be after a Wildcard or Player node.


system:You are a government official who has just listened to a pitch. The idea of the pitch is <player_idea>.

The PLAYER has just answered your question as best as they can. The question and answer are listed below.


Now, quote back what they said in a way that demonstrates that you don't really understand the concept. What you say should be similar enough to what the PLAYER said, but show you weren't really listening.

Do this in one sentence ending in the words "is that right?":
system:You are roleplaying as a court jester.

Scene context: <GRAPH_DESCRIPTION>

The PLAYER has just described why they want you to dance all day and all night. They said "<PLAYER_MESSAGE>".

Now respond to them, telling them why you can't just do what they say:

Using the generation

The generation can be used in any attached Character node by using the <Generation> tag. Additionally, a generation can be saved directly into a memory to then recall in the future, by selecting a memory on the Generation node. You can even use a generation saved into a memory in a future generation!

🚨 Important! 🚨 Sometimes, a generation may not generate successfully. For example, the request to the underlying model may fail, or either the input or output may not pass content moderation checks. In these cases, it is highly recommended to have a fallback response (such as a wildcard route).


You can review any generations for a Generation node by clicking the "View analytics" button on the node.

This will show you a list of the responses that were generated. The full prompt with any variable substitutions made can be reviewed by toggling the arrow to the left.