> For the complete documentation index, see [llms.txt](https://docs.borndigital.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.borndigital.ai/digital-agent/building-new-projects/step-5-train-and-test.md).

# Step 5 – Train and test

Train the version, fix training errors, and talk to your agent in the test bubble.

## Train the version

Click **Train version** in the bottom bar. Studio saves the flow, checks it and prepares it to run. The button shows **Training...** and then changes to **Untrain version**, and you see **Model is successfully trained.**

<figure><img src="https://4261467870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iQTvxgRZRwPS1NgIGEb%2Fuploads%2Fgit-blob-d3decdbe5042cb7e4f913720fce5b87e4905ff03%2Ftutorial-step5-train.png?alt=media" alt="The bottom bar after training: Save, Save version, Untrain version, and the now active Deploy and Test buttons highlighted"><figcaption><p>After training, Deploy and Test become available</p></figcaption></figure>

### If training fails

You see **Found errors in YAML file** and a red button appears in the bottom bar. Click it to open **Errors and warnings in YAML**. The most common errors:

| Error                                           | Fix                                                                     |
| ----------------------------------------------- | ----------------------------------------------------------------------- |
| `No target node from node …`                    | The named node has an empty **Next**. Open it and choose the next node. |
| `Non-existing CONDITIONS target `` from node …` | An intent or the **Fallback** of an Answer node has an empty **Next**.  |

Fix the node, then click **Train version** again.

## Test in the bubble

1. Click **Test** in the bottom bar and choose **Bubble**. The option becomes available a few seconds after training.
2. The chat opens with your welcome message. Ask a question – the AI node answers. Ask another one.
3. Click the **Goodbye** button or type *goodbye* – the agent says goodbye and ends the conversation.

<figure><img src="https://4261467870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iQTvxgRZRwPS1NgIGEb%2Fuploads%2Fgit-blob-d2ff8606b1cdb7e040f7ec53ec3187845b897651%2Ftutorial-step5-test-bubble.gif?alt=media" alt="Animation: the test bubble shows the welcome message and the Goodbye button; the question What is UNESCO? is typed and the AI answers from the knowledge base"><figcaption><p>Testing the agent in the bubble</p></figcaption></figure>

Next to the chat, the **Technical logs** panel shows what happened in this conversation, step by step. Use it when the agent does something you did not expect.

To try the agent as a phone call, choose **Call** instead of **Bubble** – you talk to it through your computer's microphone.

## Change something and test again

When you change a trained version, Studio reminds you that the trained agent no longer matches the flow. To test your change:

* click **Untrain version**, make the change, then **Train version** again, or
* click **Save version** to continue in a new version, and train that one.

Next: [Step 6 – Put the agent on your website](/digital-agent/building-new-projects/step-6-put-the-agent-on-your-website.md)
