Skip to main content

AI Prompt Node

Flow node

What it does​

The AI Prompt node sends a prompt, filled in with each row's values, to an AI model and adds the model's answer to the row. It classifies rows: the answer is a category and, when the model gives one, a confidence. Rows leave on out, or on Review when the answer needs separate handling.

The node is in the AI group of the component browser.

When to use​

  • Rows hold free text, such as support tickets, product descriptions or emails, and each needs a label.
  • No rule decides the label reliably.
  • You want a separate path for rows the model is unsure about.

Each row is one model call and counts toward the account's AI usage. Filter rows first so the model only sees the rows a rule cannot decide. Usage is shown under Manage Account > Billing & Usage.

Configure​

Select the node and press Configure in the side panel to open Configure AI Prompt. Save keeps the dialog open, Done saves and closes it, and Cancel discards the changes since the last save. A message confirms each save.

  • Prompt mode: Classify. The other modes are listed and cannot be selected.
  • Prompt template: the prompt sent for each row. {{column}} inserts the row's value, for example Classify the sentiment of: {{message}}.

Model and review

  • Model override: leave empty to use the default model.
  • Review category: a result that matches this category, ignoring case and surrounding spaces, goes to Review. When the model call fails, the row also goes to Review with this category.
  • Confidence threshold: a number above 0 and up to 1. A result below it goes to Review. A result with no confidence is not affected.

Ports​

PortDirectionKindNotes
inindataRows to classify.
outoutdataRows with the model's answer.
Review, id fallbackoutdataRows to handle separately. The ai_fallback_reason column says why.
erroroutcontrolRows the node could not classify, with the reason.

Output columns​

Columns added to each row

ColumnMeaning
categoryThe model's answer.
confidenceThe model's confidence from 0 to 1, or empty when it gave none.
ai_provider, ai_modelWhich model answered.
ai_input_tokens, ai_output_tokensToken counts for the call.
ai_fallback_reasonOn Review only: category_match, low_confidence, provider_error or entitlement_denied.

Where each row goes

ResultPort
A category that is not the review category, at or above the thresholdout
The review categoryReview, reason category_match
Below the confidence thresholdReview, reason low_confidence
The model call failed and a review category is setReview, reason provider_error
The account has used its AI credits for the monthReview, reason entitlement_denied
The model call failed and no review category is seterror
The prompt is empty for the rowerror
The model's answer could not be readerror. The call still counts toward usage.

Connect Review. Rows on an unconnected port go no further.

Examples​

Route support tickets.

Prompt Categorise this ticket as billing, technical or sales: {{body}}, review category unknown, confidence threshold 0.7. A Router sends each category to its own queue. Rows the model is unsure about go to a Notification for the team to review.

Review only borderline expenses. Source > AI Prompt (classify as auto or manual) > Router > manual rows to a Human Approval node.

Troubleshooting​

SymptomCauseWhat to do
Rows reach error with prompt_emptyThe template is empty, or every column it uses is empty on that row.Check the template and the column names.
Rows reach Review with entitlement_deniedThe account has used its AI credits for the month.Check AI credits under Manage Account > Billing & Usage. Credits reset at the start of the next billing period.
Many rows reach Review with low_confidenceThe threshold is high, or the categories overlap.Lower the threshold, or name the categories more clearly in the prompt.
Rows reach error with invalid_jsonThe model's answer was not in the expected form.Ask for one of the listed categories in the prompt.
Rows stop at the nodeReview is not connected.Connect it.