Skip to main content

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 support and sales intents into an expensive AI Task; let everything else fall through to a cheap reply.
  • Spam / off-topic guard — train an off_topic intent 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.

  1. Add the Machine Learning Module to your Process from the Marketplace.
  2. Drop a Task onto the canvas in the Process Editor and convert it to MLNetTask using the replace menu.
  3. Set Input Variable and Output Variable. For example, Input Variable {userText} (a variable written by an earlier Input Task) and Output Variable predictedIntent.
  4. 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).
  5. Wire a SwitchTask after the MLNetTask that branches on {predictedIntent} — and always include a default branch to catch "Not recognized".
  6. Deploy. The model is trained automatically during the deployment; the deploy log shows a confirmation row with the number of intents and phrases used.
  7. 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

PropertyTypeRequiredExampleDescription
Input VariablestringYes{userText}Name of the Session variable that holds the text to classify, written as {variableName}.
Output VariablestringYespredictedIntentVariable 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 VariablenumberNopredictedIntentScoreOptional 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 Thresholdnumber (0–1)No0.5Minimum prediction score for the predicted intent to be reported. Predictions below this score are reported as "Not recognized". Default: 0.5.
Training IterationschoiceNo40Number 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.
IntentslistYesbooking → "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

  1. The Task reads the text from the variable named in Input Variable.
  2. It classifies the text against the model trained from your Intents at deploy time.
  3. It writes the best-matching intent label to Output Variable, and the confidence score (0–1) to Score Output Variable (or to {output}_score when that field is empty).
  4. 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:

  1. An Input Task stores the user's message in {userText}.
  2. MLNetTask is configured with Input Variable {userText}, Output Variable predictedIntent, Score Threshold 0.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").
  3. The user types "can I move my appointment to Friday?" — the Task writes booking to {predictedIntent} and the score (for example 0.84) to {predictedIntent_score}.
  4. A SwitchTask on {predictedIntent} routes booking to the booking branch, cancel to the cancellation branch, complaint to a hand-off — and its default branch replies "Sorry, I didn't catch that" whenever the output is "Not recognized".
warning

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.

  1. InputTask (Standard Module) — asks "How can I help you?" and stores the reply in userText.
  2. MLNetTask — Input Variable {userText}, Output Variable predictedIntent, Score Threshold 0.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") and cancel ("cancel my booking", "I can't make it", "drop my appointment", "please call it off", "cancel it").
  3. SwitchTask (Standard Module) — branches on {predictedIntent}. Label the outgoing Sequence Flows booking and cancel, plus a default branch that catches "Not recognized".
  4. OutputTask (Standard Module), one per branchbooking confirms the booking path, cancel confirms the cancellation, and the default branch replies Sorry, I didn't catch that — could you rephrase? and loops back to the InputTask.

Training tips

  1. 5–10 varied examples per intent minimum. Below that, accuracy collapses on borderline phrases.
  2. Vary phrasing, not just keywords. "I want to book", "schedule a call", "set up an appointment" — paraphrase, don't reword.
  3. 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.
  4. 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.
  5. 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.
  6. 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.40.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

CodeNameDescription
3005TaskInvalidDataThe Output Variable is missing or malformed. See full details
4001ModuleExceptionThe prediction failed unexpectedly. See full details
4008ModuleMissingConfigurationNo trained model exists yet — deploy the Process. See full details
4009ModuleInputEmptyThe Input Variable field is empty or missing its {braces}. See full details
4010ModuleInputNotInSessionThe input variable was never written by an earlier Task. See full details
4011ModuleInvalidInputThe input variable exists but is empty, or the text is too long. See full details