> 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="/files/L3qkE5sh6P8Y3hen9YZ7" 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="/files/uwuNwYUlwc950iOPEsGl" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/FPGBGuFOvjQDdyRjIfKN" 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="/files/8vDpda9LuxxNpSbiO4Ow" 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="/files/cl2SCvr34BGZ0532o7VG" 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="/files/TYk7OOyijpqDqQXso15E" 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="/files/YQWbDOkUM09X5rFHoNBv" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.foretellreality.com/foretell-ai/authoring-tool/ai-personas/speaking-style.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
