> For the complete documentation index, see [llms.txt](https://docs.foretellreality.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.foretellreality.com/foretell-ai/authoring-tool/ai-personas/speaking-style.md).

# Speaking Style

After providing the AI agent with the necessary information to hold a conversation with the trainee, you may want to further influence the way it speaks by giving it emotions, vocal tics, or specific responses to certain conditions.&#x20;

We typically use two context sections for this: a “Common Responses” box, and a “Speaking Style” box.

## Common Responses

The most direct way to influence what the AI agent says is to provide a list of suggestions for things it should say.

* Providing examples of responses also gives the AI agent something to fall back on for situations where the AI agent doesn’t understand what the trainee said
* We have experienced issues where the AI agent will switch roles in the conversation if the trainee says something unintelligible, but adding default responses helps to prevent this from happening

<figure><img src="https://1178934140-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr08j74qgewGGqooZnv5z%2Fuploads%2FFFqlA7zUqdrmQby7n1oZ%2Fimage.png?alt=media&amp;token=860507cc-070a-49eb-9cc9-758e8cfff838" alt=""><figcaption></figcaption></figure>

## Vocal Tics

To create vocal tics such as stuttering, or incorrect emphasis, such as a student who is struggling to read aloud or someone for whom this isn’t their first language, you should provide written examples of what that speech looks like.

* Enforce mispronunciation of words through purposeful misspellings
* For example, a struggling reader might sound like this:

<figure><img src="https://1178934140-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr08j74qgewGGqooZnv5z%2Fuploads%2FsoXyv7mkozucgoMI1lPL%2Fimage.png?alt=media&amp;token=7098fc13-cb94-4580-86a7-c9a96581f533" alt=""><figcaption></figcaption></figure>

* To encourage emphasis on certain words, you can use ALL CAPS

<figure><img src="https://1178934140-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr08j74qgewGGqooZnv5z%2Fuploads%2F8d7nCpgZq5mirQROB6z2%2Fimage.png?alt=media&amp;token=af34f42e-c824-4271-80b0-7e8df93ec20d" alt=""><figcaption></figcaption></figure>

* Pauses and hesitation
  * In the “Speaking Style” box, you can ask the AI Agent to insert pauses into their sentences, i.e.
    * “John hesitates and pauses after every word”
  * When providing sample responses, you can use ellipses "..." for pauses

<figure><img src="https://1178934140-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr08j74qgewGGqooZnv5z%2Fuploads%2FGgRnWDGK8F2WaYc3dCaO%2Fimage.png?alt=media&amp;token=bd529fba-9615-4b3d-8c68-7143c9e31264" alt=""><figcaption></figcaption></figure>

* You can simulate a stutter by putting dashes between letters in a word.
  * We recommend avoiding adding the word "stutter" into the instructions as this can cause audio playback issues in certain voice engines

<figure><img src="https://1178934140-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr08j74qgewGGqooZnv5z%2Fuploads%2FWhTgd5weyBBp76u0VHWv%2Fimage.png?alt=media&amp;token=c71894ff-b9df-41cf-83d2-f4293dfbce0a" alt=""><figcaption></figcaption></figure>

* When describing technical terms or acronyms, it might help to spell things out phonetically to make sure the voice engine says it correctly.
  * Explain what acronyms stand for and provide descriptions of technical jargon so the AI understands how to use those words properly
* Try writing numbers as words, i.e. (“$50” becomes “fifty dollars”)
  * Format phone numbers with pauses: "555... 123... 4567"
* There is no default way to let the AI system know something is an instruction that shouldn’t be read aloud, so avoid instructions like \[crying], \*yelling\*, or (shouting) in your Common Responses box
  * Instead, use a “Speaking Style” context box that describes emotional responses associated with a specific topic of conversation

## Sentence Structure

AI has a tendency to create long responses, but we can tell it to limit its responses to a specific format in a “Speaking Style” box, such as:

* “Alice keeps her requests to a maximum of three sentences.”
* “Ben’s sentences are short, between 2-5 words”

## Mannerisms

You can control how formal or casual the sentences are in a "Speaking Style" box

* “John uses a lot of surfer slang such as ‘dude’, ‘gnarly’, and ‘wicked’”
* “Maximillion uses highly formal language, preferring to use longer, fancier words”
* “Jennifer tends to start sentences with 'So, like…' and other filler phrases"

Include natural speech elements in the “Common Responses” box

* Brief acknowledgments: "I see," "Got it," "Right"
* Filler words: "Actually," "Well," "So"
* Conversational transitions: "Now then," "Here's the thing"

## Emotions

* Setting the starting emotion can go a long way in ensuring that the AI agent stays in character, in particular the “Tone” dropdown and the “Opening Line” you give
* You can associate specific topics of conversation with specific emotions to allow for a more flexible approach to the AI agent’s emotions changing throughout the conversation
* An example of the “Speaking Style” box you might write for someone slowly getting more upset during a conversation where they ask for a better grade:

<figure><img src="https://1178934140-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr08j74qgewGGqooZnv5z%2Fuploads%2FJhRJRkYFpAAyeU4wh995%2Fimage.png?alt=media&amp;token=55d20de4-fb09-4031-a2ef-0a25e2f11dc8" alt=""><figcaption></figcaption></figure>

* You can add instructions like “Alice sobs twice per sentence” if you want to control how often certain non-verbal actions occur
* There is a known issue where OpenAI has a tendency to input its own instructions for emotions such as \[sobbing] or \[voice shaking] and then reading them aloud
  * Unfortunately this is out of our control
  * For whatever reason, these instructions are less likely to be read aloud when in the middle of a sentence, so you can try to skew the emotional responses to encourage interjections in the middle of the sentence instead of at the beginning, but this will not always work

## Conditions

While AI agents are good at making a conversation that sounds about right, when a topic of conversation comes up that wasn’t included in the starting instructions the responses tend to feel more generic and lacking in detail.

* If there are specific topics that you expect to come up in your conversation, it is a good idea to give the AI agent a preplanned response that it can work with
  * For example, if your instructions say that the AI agent is “struggling with a problem in class”, it will take a lot of pushing before the AI agent provides generic details about a generic problem it has invented
    * To solve this, you can provide specific details about the problem they are having, and the AI agent can then take that starting point and branch out from there
* Conditions allow you to provide detail that will appear when the trainee says the appropriate things
* Conditions are also a great way to associate certain topics of conversation with specific emotions
* Conditions allow you to prepare the trainee to handle common lines of conversation that you as the simulation author may be aware of
* Conditions can help keep the focus by redirecting the conversation back to the topic at hand when something outside of the scope is mentioned
* You can set up conditions that trigger the AI agent to escalate the conversation, such as a patient reacting angrily to getting bad news about their health

<figure><img src="https://1178934140-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr08j74qgewGGqooZnv5z%2Fuploads%2FxZZEXQcQWYj0amQpExZ4%2Funknown.png?alt=media&amp;token=3ed8bffb-c5eb-4446-bae7-164b67a5d2a3" alt=""><figcaption></figcaption></figure>
