Skip to content

Prompt templates

Prompt templates decide how Museris puts characters, lore, scene instructions, and chat history together before sending them to the AI.

Templates use Liquid, a simple Handlebars style language. The easiest use is replacing a name in double braces with its value:

liquid
{{ characters }}

Museris includes a default template, so you can start roleplaying without making one. Create a template when you want to change the order or wording of the context sent to your model.

Each prompt template also has a system prompt. Museris sends it separately to tell the model its main role and writing rules. See Write effective system prompts for help writing one.

Available template values

The prompt template itself receives four prepared blocks of text:

ValueContains
{{ characters }}Each selected character's name and definition.
{{ lore }}The enabled lorebook entries for the chat.
{{ instruction }}The optional chat instruction.
{{ chat }}The conversation history.

The default template is a useful starting point:

liquid
{{ characters }}
{% if lore %}
Use the following background information as lore.
{{ lore }}
{% endif %}
{% if instruction %}
{{ instruction }}
{% endif %}

Chat Log:
{{ chat }}

Use Preview while editing to see a template rendered with example characters, lore, an instruction, and chat messages. It checks the template structure, not the quality of a particular model's response.

Add simple conditions

Liquid tags can show a section only when it has content. This keeps the prompt clean when a chat has no lore or extra instruction:

liquid
{% if lore %}
Background information:
{{ lore }}
{% endif %}

You can also use elsif, else, comparisons, and logic for more complex layouts.

Leave notes with comments

Comments help you remember why a template is set up a certain way. They are not sent to the AI.

liquid
{% comment %}
Keep the chat history last so recent turns are easy for the model to find.
{% endcomment %}
{{ chat }}
```

Build stories your way with Museris.