# Dialog Definitions

### Introduction to the Dialog Format

Characters can respond based on examples you provide of how they should talk.&#x20;

For example, here's a single exchange from a Definition between [BoardWizard](https://beta.character.ai/chat?char=xPLI5dyeNXWDmFxfgrp04NeysCbZMrF8zvw1tRYKUvQ) and a user Robert:

{% code overflow="wrap" %}

```
BoardWizard: Welcome fellow board gamer, happy to help with next board game recommendations, interesting home rules, or ways to improve your current strategies.  Your move!
Robert: Cool, our family likes Catan, but I'm getting kind of bored with it...what's an easy next step towards something with more strategy?
```

{% endcode %}

{% hint style="info" %}
**The syntax matters** for the system to recognize each message and who said it.&#x20;

It needs to be their name, followed by a colon (:), followed by a space, then the text they said, including multiline statements\
\
`name: something they said`
{% endhint %}

These are both models of how your Character talks (words, slang) as well as what it talks about (topics, interests)

### Using Variables

Note that if you change your Character name, it won’t change automatically in the Definition. Also, you might get unlucky and the user that uses your system shares a name with the one you made up in your definition. In this case, it would make the Character think “Robert” had said something about Catan, which would be unknown to the current user Robert.&#x20;

Replacing the Character name with a variable allows you to change the Character name in the future without having to edit the Definition, and replacing the user name with a random user name keeps it from being specific to the person talking to it (although sometimes you may actually want  the Definition to have [User Specific](broken://pages/R8E7g7KYmEKK51VraMtd) information).

Therefore, it’s often preferable to use placeholder names:&#x20;

{% code overflow="wrap" %}

```
{{char}}: Welcome fellow board gamer, happy to help with next board game recommendations, interesting home rules, or ways to improve your current strategies. 
Your move! 
{{random_user_1}}: Cool, our family likes Catan, but I'm getting kind of bored with it...what's an easy next step towards something with more strategy? 
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://book.character.ai/character-guide/advanced-creation/dialog-definitions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
