# How To: Insert Dialog

The simplest way to create these dialogs is to simply have conversations with your Character.&#x20;

As an example, let's add chats to a Character we're trying to refine.&#x20;

Let's try to build a character that yells *some* of the time by starting to type in all caps. Here's a start, with name and greeting:

![](https://1892234324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEPKaFCA0X9sMHG2M4S79%2Fuploads%2Fm0IKELjD6MscasBHxox8%2Fimage.png?alt=media\&token=9dc350ae-ab98-46ae-954f-65b960c775b0)

### Insert a chat

From the Edit Character page, there is a button to "Insert a chat" into the Definition.

<figure><img src="https://1892234324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEPKaFCA0X9sMHG2M4S79%2Fuploads%2FLOopQSbuvCTHjTzWQpty%2Fimage.png?alt=media&#x26;token=ea979d3c-8a37-432f-81db-f2d8e0432008" alt=""><figcaption></figcaption></figure>

Right now, the Definition is empty. Press the Insert a chat with Yelling Guy button, and a chat will start.

<figure><img src="https://1892234324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEPKaFCA0X9sMHG2M4S79%2Fuploads%2FtNjEgqWdQY3tkUahn2mO%2Fimage.png?alt=media&#x26;token=7f6b90a8-a311-481c-a8c7-680ea04ad256" alt=""><figcaption></figcaption></figure>

After the greeting, you simply have a chat with the Character. Remember you can **swipe** these responses to see alternatives. Choose the closest one. You can also restart the conversation if it isn't going well.&#x20;

{% hint style="info" %}
Don't worry about getting the perfect dialog in these examples. You'll see in the next steps how you can edit the responses to be exactly as you want them.
{% endhint %}

### Store the chat

Once we have a few exchanges, we press Next to return to the Edit screen. There, you will see the Definition has been updated with the text of your chat, but with a few differences.

<figure><img src="https://1892234324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEPKaFCA0X9sMHG2M4S79%2Fuploads%2F4VSTaC22L4uuwoZDkm0h%2Fimage.png?alt=media&#x26;token=83f21095-b61d-48d5-a956-3bb28e5ae639" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Be sure to press Save when you return from the chat, once you've completed any edits to the text.
{% endhint %}

You'll notice that it replaced "Yelling Guy" with `{{char}}` and the user "Greg" with `{{random user 1}}`. We'll talk more about why this happens in Section X.

### Edit the chat

Let's say we didn't actually want the Character to always YELL, just sometimes. But in the chat it never gave that as one of the swiped options. So let's edit the text here to be more like how we want the Character to sound.

<figure><img src="https://1892234324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEPKaFCA0X9sMHG2M4S79%2Fuploads%2F0wOqPK8wJWysUJsmhwhf%2Fimage.png?alt=media&#x26;token=924bf5c4-2d22-4fc6-a449-431959d05d55" alt=""><figcaption></figcaption></figure>

### Test and add another chat!

At this point, we can Insert a chat again to see how it's working now.

<figure><img src="https://1892234324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEPKaFCA0X9sMHG2M4S79%2Fuploads%2FLVoczDI4MIaaHWANwuXz%2Fimage.png?alt=media&#x26;token=3011c9f9-0136-47d0-8899-fa7c3f15023d" alt=""><figcaption></figcaption></figure>

Much better! \
\
When we press Next again, this new example chat will be appended to our prior Definition, giving further evidence about how Yelling Guy should interact with users.

### Final Notes

You can have one long chat or many smaller chats, and can edit the details as much as you want (though see details in following sections about the proper format for names and messages).

{% hint style="info" %}
You can only have 3200 characters in your Definition. When you get close to this limit, it will stop offering the option to insert another chat. You can delete text from the Definition to have the option again.
{% endhint %}


---

# 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/how-to-insert-dialog.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.
