Machine Learning Module
Classify free-text input into one of your own intents, trained from example phrases you provide.
The Machine Learning Module adds a single Task, MLNetTask, that reads a text variable from the Session, decides which of your intents it matches best, and writes the winning intent label to an output variable. You define the intents and example phrases directly in the Task configuration — the platform trains and stores the model for you automatically when you deploy. There is nothing to install or configure outside the Process.
What you can build
- Bot intent router — chat or voice: collect the user's message, classify it with MLNetTask, then branch with a SwitchTask to
booking,cancel,complaint, and so on. - Lightweight ticket classifier — categorise inbound emails or form submissions into a fixed taxonomy before routing.
- Voice menu without keypad tones — let the caller say "I want to book", classify the speech-to-text result, branch on the intent.
- Triage gate — route only
supportandsalesintents into an expensive AI Task; let everything else fall through to a cheap reply. - Spam / off-topic guard — train an
off_topicintent on bad examples and branch on it before calling paid APIs.
Quick start
No external accounts, storage, or settings are needed — trained models are stored automatically in your Workspace.
- Add the Machine Learning Module to your Process from the Marketplace.
- Drop a Task onto the canvas in the Process Editor and convert it to MLNetTask using the replace menu.
- Set Input Variable and Output Variable. For example, Input Variable
{userText}(a variable written by an earlier Input Task) and Output VariablepredictedIntent. - Add intents. Each intent is a label (for example
booking) plus a list of example phrases. Aim for 5–10 varied phrases per intent — paraphrases, not keyword repeats. You can bulk-load phrases from a CSV file with the Import CSV button (two columns,intent,phrase). - Wire a SwitchTask after the MLNetTask that branches on
{predictedIntent}— and always include a default branch to catch "Not recognized". - Deploy. The model is trained automatically during the deployment; the deploy log shows a confirmation row with the number of intents and phrases used.
- Run. Start a Session, send a message, and check that the output variable lands on the right intent label.
How it works
The model is trained automatically when you deploy the Process, and re-trained only when the training phrases change — redeploying without touching the intents reuses the existing model. At runtime, the Task reads the input text from the Session, classifies it, and writes the best-matching intent label to the output variable. Every prediction also comes with a confidence score between 0 and 1: when the best score is below the Score Threshold you set, the output is the special value __not_recognized__ ("Not recognized"), so you can route a fallback branch instead of acting on a bad guess.
Configuration
This Module does not require Environment configuration. Models are trained and stored automatically when you deploy.
Limits
These limits are fixed on the platform and cannot be changed from the Task or Environment configuration. Training limits surface as error rows in the deploy log; runtime limits surface as Session errors.
- A single Task can train at most 50 intents, with at most 500 example phrases per intent and 5,000 phrases in total.
- Each example phrase can be at most 500 characters long.
- Input text longer than 4,000 characters is rejected at prediction time.
- Training stops after 2 minutes; if your intent set is too large to train in that time, the deployment fails.
- A single prediction stops after 2 seconds.
Tasks
MLNetTask (Generic)
Classifies a free-text variable against your labelled intents and writes the predicted intent label to an output variable. Works on all Channels.
Properties
| Property | Type | Required | Example | Description |
|---|---|---|---|---|
| Input Variable | string | Yes | {userText} | Name of the Session variable that holds the text to classify, written as {variableName}. |
| Output Variable | string | Yes | predictedIntent | Variable name (no braces) that receives the predicted intent label. Set to "Not recognized" (__not_recognized__) when the prediction score is below the threshold. Later Tasks read it as {predictedIntent}. |
| Score Output Variable | number | No | predictedIntentScore | Optional variable name (no braces) that receives the top prediction's score (0–1). Default: empty — the score is then stored under the output variable name plus _score (for example {predictedIntent_score}). |
| Score Threshold | number (0–1) | No | 0.5 | Minimum prediction score for the predicted intent to be reported. Predictions below this score are reported as "Not recognized". Default: 0.5. |
| Training Iterations | choice | No | 40 | Number of training passes used when the model is (re)trained at deploy time. Pick from 10 / 25 / 40 / 100 / 250 / 500 / 1000. Higher values usually improve accuracy with diminishing returns; raise for larger or noisier intent sets. Default: 40. |
| Intents | list | Yes | booking → "I want to book", "schedule a call", … | Training set: each intent has an Intent Label and a list of Example Phrases. The model is retrained at deploy time when this list changes. Use Import CSV to bulk-load (intent,phrase columns). |
Behavior
- The Task reads the text from the variable named in Input Variable.
- It classifies the text against the model trained from your Intents at deploy time.
- It writes the best-matching intent label to Output Variable, and the confidence score (0–1) to Score Output Variable (or to
{output}_scorewhen that field is empty). - If the best score is below Score Threshold, the output is
__not_recognized__("Not recognized") instead of an intent label.
Example
A chat intent router:
- An Input Task stores the user's message in
{userText}. - MLNetTask is configured with Input Variable
{userText}, Output VariablepredictedIntent, Score Threshold0.7, and three intents:booking("I want to book", "schedule a call", "set up an appointment", "can I get a slot tomorrow", "book me in"),cancel("cancel my booking", "I can't make it", "please call it off", "drop my appointment", "cancel it"),complaint("this is unacceptable", "I want to file a complaint", "the service was terrible", "I'm unhappy with my order", "this went wrong"). - The user types "can I move my appointment to Friday?" — the Task writes
bookingto{predictedIntent}and the score (for example0.84) to{predictedIntent_score}. - A SwitchTask on
{predictedIntent}routesbookingto the booking branch,cancelto the cancellation branch,complaintto a hand-off — and its default branch replies "Sorry, I didn't catch that" whenever the output is "Not recognized".
Always wire a default branch after the classifier. "Not recognized" is a normal output, not an error — a Session whose message matches nothing must still have somewhere to go.
Common recipes
Route chat messages by intent
Collect the user's message, classify it, and branch the conversation on the predicted intent — using the Standard Module's InputTask, SwitchTask, and OutputTask.
- InputTask (Standard Module) — asks "How can I help you?" and stores the reply in
userText. - MLNetTask — Input Variable
{userText}, Output VariablepredictedIntent, Score Threshold0.5, with two intents:booking("I want to book", "schedule a call", "set up an appointment", "book me in", "can I get a slot tomorrow") andcancel("cancel my booking", "I can't make it", "drop my appointment", "please call it off", "cancel it"). - SwitchTask (Standard Module) — branches on
{predictedIntent}. Label the outgoing Sequence Flowsbookingandcancel, plus a default branch that catches "Not recognized". - OutputTask (Standard Module), one per branch —
bookingconfirms the booking path,cancelconfirms the cancellation, and the default branch repliesSorry, I didn't catch that — could you rephrase?and loops back to the InputTask.
Training tips
- 5–10 varied examples per intent minimum. Below that, accuracy collapses on borderline phrases.
- Vary phrasing, not just keywords. "I want to book", "schedule a call", "set up an appointment" — paraphrase, don't reword.
- Keep intents balanced. If one intent has 100 phrases and another has 5, the model leans toward the big one. The deploy log warns you when an intent has fewer than 3 unique phrases or when the training set is heavily skewed — the deployment still succeeds, but accuracy suffers.
- Duplicates are ignored. Identical intent + phrase pairs are collapsed before training (the deploy log tells you when this happens); pasting the same CSV twice does not improve the model.
- Set the threshold by measurement, not guesswork. Start at
0.5, watch the scores on real traffic, and raise it until the false-positive rate is acceptable. - Raise Training Iterations only when accuracy plateaus. Higher values lengthen deployment; gains are usually small past
100.
Troubleshooting
The Session fails with "no trained model found"
The Process was never deployed after the MLNetTask was added (or the deployment failed). Open the Process, click Deploy, and check the deploy log for the training confirmation row.
The deploy log says training was skipped because there are fewer than 2 example phrases
The classifier needs at least two phrases to learn from. Add more example phrases to your intents and deploy again.
Every message comes back "Not recognized"
Your Score Threshold is probably too high for the size of your training set, or the intents have too few varied phrases. Lower the threshold (try 0.4–0.5) or add more paraphrased examples per intent, then redeploy.
The input text is rejected as too long
Very long inputs (thousands of characters) are rejected to keep predictions fast. Trim or summarise the text in an earlier Task before classifying it.
Error codes
| Code | Name | Description |
|---|---|---|
| 3005 | TaskInvalidData | The Output Variable is missing or malformed. See full details |
| 4001 | ModuleException | The prediction failed unexpectedly. See full details |
| 4008 | ModuleMissingConfiguration | No trained model exists yet — deploy the Process. See full details |
| 4009 | ModuleInputEmpty | The Input Variable field is empty or missing its {braces}. See full details |
| 4010 | ModuleInputNotInSession | The input variable was never written by an earlier Task. See full details |
| 4011 | ModuleInvalidInput | The input variable exists but is empty, or the text is too long. See full details |