-
-
Notifications
You must be signed in to change notification settings - Fork 5
Prompt Format Template
A Prompt Format Template is part of a Chat Template. It controls how NarratrixAI builds and post‑processes messages before sending them to the LLM. The template shapes the final prompt with your chosen structure, sections, separators, and optional reasoning wrappers. This lets you tune behavior per Model without rewriting chats.
When the LLM replies as a Character or you trigger Quick Buttons, NarratrixAI formats the input and injects sections into the model’s System Prompt according to this template.
Note
The UI includes (?) help markers for each field. This page focuses on how the pieces fit together, not every individual toggle.
Rules here normalize the history before sending it to the model. Examples include trimming incomplete sequences, collapsing lines, and squashing consecutive user/assistant messages. Turn options on/off to balance cleanliness with fidelity of the original transcript.
The System Prompt sets the model’s baseline behavior—tone, rules, and constraints. The model’s adherence depends on the provider, but a well‑written system prompt strongly guides replies.
The template supports multiple sections that can be conditionally injected. You can enable/disable sections and drag to reorder them; their order appears in the final system prompt, separated by your Context Separator.
| Field | Description |
|---|---|
| Context | Always included. |
| Chapter Context | Included when the active Chapter provides a scenario or instructions. |
| Character Context | Included when the speaking character has a Personality/Description. |
| User-context | Included when you have a User Character Sheet (speak-as-user). |
| Character-memory | Not yet available. Will include memory for the speaking character. |
| User-memory | Not yet available. Will include memory for the user character. |
| Lorebook-top | Inserts Lorebooks content targeted to the “top” region. |
| Lorebook-bottom | Inserts Lorebooks content targeted to the “bottom” region. |
| Custom Field | Always available, free‑form content. |
You can rename any section by clicking its title—useful for labeling house rules, content boundaries, or style guides.
Sections support dynamic placeholders that NarratrixAI resolves at runtime. Common examples:
-
{{char}}— character name -
{{user}}— user name or persona -
{{char.personality}}— character Personality / Description -
{{chapter.title}},{{chapter.scenario}},{{chapter.instructions}}
See Text Placeholders for the full list.
Separators define how sections and lore entries are joined.
- Context Separator — inserted between System Prompt sections.
- Lorebook Separator — inserted between Lorebooks entries.
Example
- Context: You’re the roleplay master.
- Character: Here are your character details:
{{char.personality}} - Context Separator:
\n---\n
Final system prompt:
You’re the roleplay master.
---
Here are your character details: {{char.personality}}
Tip
You can use\nfor breaking lines.
For models that natively support reasoning, NarratrixAI displays thinking separately. For others, you can emulate the behavior by setting a Prefix and Suffix (for example, <think> and </think>). The UI will sectionize everything between them in the Messages panel so the “thinking” block stays readable or can be hidden in the transcript.