--- title: "Training and Testing" slug: "ai-agents-training-and-testing" updated: 2026-10-13T05:48:30Z published: 2026-10-13T05:48:30Z canonical: "docs.sestek.com/ai-agents-training-and-testing" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.sestek.com/llms.txt > Use this file to discover all available pages before exploring further. # Training and Testing A virtual agent learns its intents from your utterances only when you train it. This article covers training, testing single utterances and whole lists, choosing the confidence threshold and publishing. It is part of [Virtual Agent](https://docs.sestek.com/docs/en/ai-agents-virtual-agent). --- ## Training Click **Train** on the intents page. You need the project's Train permission, and you can train only on the draft version. To train, a virtual agent needs at least two intents with at least one utterance each. The built-in welcome and fallback intents already meet this, so you can train a new virtual agent straight away. If the minimum is not met, a notice on the page tells you so. Training can take a while for large virtual agents. A notification arrives when it finishes. ### When to train again Train again after any of these: - adding, editing or deleting utterances - creating, renaming or deleting intents - deleting a group that contains intents - adding intents from a template - an FAQ import Changes to entities, the confidence threshold or an intent's action do not need training. ### The Train button | State | What you see | | --- | --- | | **Up to date** | **Train** is enabled with no tooltip. | | **Untrained changes** | **Train** turns yellow with a pulsing icon. Tooltip: "Virtual agent has updates which have not been trained yet." | | **Training** | A spinner and "Training in Progress". | | **Failed** | "An error occurred while training." Click **Train** to try again. | **Train** is also disabled while a batch test runs, on the published version, and while the message "AI modules are not ready for training yet." is shown. In that last case, wait for the AI modules to become ready and try again. --- ## Testing one utterance Once the virtual agent has been trained, click **Test**, type an utterance and press Enter. ![The Test window for "What's the weather like in Istanbul today?"](https://cdn.document360.io/9bca2910-6a3b-4224-9470-43f91f9a6d57/Images/Documentation/ai-agents-training-and-testing-test.png?sv=2026-02-06&spr=https&st=2026-12-02T05%3A26%3A20Z&se=2026-12-02T06%3A26%3A20Z&sr=b&sp=r&sig=Y%2FomXlLagj0zBHg%2BoY8X9JN%2FPDYt7X%2FAt%2Fs5UEAGLGQ%3D) **1. Test box:** Type the utterance to test and press Enter. **2. Test utterance and Corrected utterance:** What you typed, and the normalised text the virtual agent actually classified. **3. Name and Confidence:** The top five intents, highest first, each with its confidence from 0 to 1 to three decimals. Here `weather` scores 1.000. A test changes nothing in the virtual agent. --- ## Testing a list of utterances The batch test checks many utterances against the intents you expect. It is on the caret next to **Test**: 1. **Download test template**: a CSV file with the columns **Utterance** and **Expected Intent**, plus columns for the results. 2. Fill in one row per utterance. For example: | Utterance | Expected Intent | | --- | --- | | **Is it sunny in Ankara?** | weather | | **Good morning** | welcome | | **Can I book a flight?** | fallback | 3. **Upload test list**: select the file. 4. **Download test results**: the same file with each row's result. | Match Status | Meaning | | --- | --- | | **Correct Match** | The top intent is the expected one. | | **Mismatch** | Another intent won. | | **Multiple Match** | Several intents scored almost equally. | | **Fallback** | No intent scored above the confidence threshold. | **Test Accuracy** is the share of rows with Correct Match. --- ## The confidence threshold Each virtual agent has a Confidence Threshold. To change it, go to **Project Settings > Virtual Agents** and select the virtual agent. ![Virtual agent settings with Confidence Threshold and prebuilt intent template cards](https://cdn.document360.io/9bca2910-6a3b-4224-9470-43f91f9a6d57/Images/Documentation/ai-agents-virtual-agent-settings.png?sv=2026-02-06&spr=https&st=2026-12-02T05%3A26%3A20Z&se=2026-12-02T06%3A26%3A20Z&sr=b&sp=r&sig=aypK7LN8%2BlPsxPRn6Owv%2FLY0%2FL5pzQEr8NIbGLiJYR4%3D) **1. Confidence Threshold:** Default: 0.5 (range 0-1). Click **Save** to apply a new value. **2. Template cards:** The prebuilt intent templates for the virtual agent's language. See [Importing Intents](https://docs.sestek.com/docs/en/ai-agents-importing-intents). In a conversation, a top score at or below the threshold counts as no match, and the fallback intent's action runs. Raising the threshold means fewer wrong matches and more fallbacks. Lowering it means the opposite. To choose a value, run the same batch test at different thresholds. Compare the Mismatch rows, which are wrong answers, with the Fallback rows, which are requests the virtual agent declined. Pick the value that gives the balance you want. --- ## Publishing Live conversations use the published version of the project, so publish after training. A project cannot be published while a Virtual Agent node uses a virtual agent that was never trained. > **⚠️ Warning:** If you publish while **Train** is yellow, the virtual agent that goes live is the one you last trained, without your newer changes. Train first, then publish. > **📝 Note:** After publishing, the virtual agents in the new draft show as Not Trained. Train them again before you test in the draft.