Skip to content

Inworld Decisions

Inworld Decisions makes decisions with the decision models Inworld offers, all with a single credential. It works like Laya, Jev and OpenAI Decisions: it answers a question you define and always returns one of the answers you planned for, with how sure it is of each one. Each possible answer is an output of the node, and the text carries on only through the chosen one.

It can decide about a text, about images (a photo, a scanned document, a screenshot) or both. The text and the images are sent to Inworld, and each decision is charged to your Inworld account with the same credential you use for its voice or text models. Each decision takes less than half a second.

When to use it

  • Decide which team an email or a ticket goes to: billing, support or sales.
  • Know whether a customer threatens to cancel, or how much urgency or anger they show.
  • Tag messages with every category that applies.
  • Know whether the photo a customer sends shows a damaged product, or what kind of document a scan is.
  • When you already work with Inworld and would rather not sign up for another service.

Configuration

FieldWhat it does
Credential (required)The Inworld API credential. Pick one in Select a credential or create one with Create new credential, with the Base64 key of your Inworld account. More in Credentials.
ModelThe model that decides. The list shows the decision models your Inworld account allows and loads when you pick the credential; the refresh button asks for it again. Some read text only. Default: perplexity/pplx-decider-v1.2.
TextThe text to decide about. Connect it from another component or write it. Required unless you connect images. In Batch Mode, switch to Mapped and drag the item field that holds the text.
ImagesThe images to decide about, alone or with the text. For photos sent through the chat, connect the Binary output of Chat Input; it also takes files and data holding the image. If a message arrives without a photo, the decision is made on the text alone. Takes PNG, JPEG and WEBP; other formats are converted. Some models take up to 8 images per decision.
DecisionThe kind of decision: Pick one (choose one answer), Pick several (every one that applies), Yes or no, or Scale (a level on a scale). Default: Pick one. The node’s fields and outputs change with your choice.
Question (required)What to decide, in plain words and in the language of the texts. For example: “Which team should handle this message?”.
Answers (required with Pick one and Pick several)One row per answer: its name and when to choose it. The description is what the model compares the text and images with. You need at least two answers and at most 50.
Levels (required with Scale)The levels of the scale, lowest first; for example low, medium, high. Between 2 and 10 levels, no repeated names.

Advanced options

FieldWhat it does
Minimum confidenceA value between 0 and 1. If the answer is less sure than this, the text does not leave through that answer but through an extra Unsure output, for a person to review. With 0 (the default) it is off.

Batch processing

With the Batch Mode switch on, the component runs once for each item of the list you connect to Batch Input and returns all the results together in a list. Parallel Executions sets how many items are processed at once (1 to 5). Skip if Empty Batch Input skips the component if the list arrives empty, and Skip Branch if Empty Output stops the following components if the result is empty. More in Key concepts.

The question and the answers are the same for every item, and each item leaves through its own answer.

Use as an agent’s tool

You can connect this component to the Tools input of an agent. In the Tool tab, Tool Name and Tool Description are the name and explanation the agent uses to recognise the tool and decide when to use it: write a clear description of what it does.

If you leave them empty, they are built from your question and its answers. The agent writes the text to decide about itself and receives the whole decision. While the node is connected as a tool, the per-answer outputs are hidden.

Result

The outputs are the same as in Laya, Jev and OpenAI Decisions:

  • One output per answer (Pick one), per answer plus None of them (Pick several), Yes and No (Yes or no) or one per level (Scale). If you set a value in Minimum confidence, Unsure appears too. Only the chosen output carries the text (with Pick several, every one that applies).
  • Decision: the text and its decision as data: the question, the kind of decision, the chosen answer (answer), how sure it is (confidence), the probability of each answer (probabilities) and whether it fell below the minimum confidence (unsure).
  • Decision Model: the node itself, to connect to the Barge-in Decision connector of a Voice Agent, which asks it its own question about a caller speaking while the agent talks. Connected this way, the node hides its text, question, answers and per-answer outputs, which are not used.

Example

A software company receives its customers’ emails in one mailbox and wants each one to reach the right team. With Inworld Decisions:

  1. Connect the email body to Text and pick the Inworld API credential.
  2. Leave Decision on Pick one and write in Question: “Which team should handle this message?”.
  3. In Answers add billing (invoices, charges, refunds), support (errors, outages, the app does not work) and sales (prices, upgrading the plan, signing up).
  4. Connect each output to its team. If you also set Minimum confidence to 0.7, unclear emails leave through Unsure for a person to route.

Good practices

  • Describe each answer well and write them in the language of the texts.
  • Add an answer for what does not fit, such as other, so an unexpected message is not forced into a wrong answer.
  • One decision per node. For two questions about the same input, use two nodes.
  • For images, pick a model that reads them. If the chosen model reads text only, the component stops with an error that says so.
  • Laya: NappAI’s own decision model, with no credential and without sending the text out.
  • Jev: the same kind of decision with TypeSafe AI’s service.
  • OpenAI Decisions: the same kind of decision with your OpenAI account.