Skip to main content

04.6.1.1 AI Text Extractor

Node Description

AI Text Extractor - an action type node used to generate a question to AI based on the provided text and receive a response.

Node Configuration

To configure the AI Text Extractor node, you need to fill in the mandatory fields:

  • Input Text;
  • Entities to Extract.

Input Text

This field is used to enter the text that needs to be analyzed.

tip

In the Input Text field, you can enter text, variables from other nodes, or parameters from responses of other nodes.

Entities to Extract

This field is used to generate a question to the AI and predefine response parameters.

To fill in the Entities to Extract field, you can use the following template:

{
"description": "number of animals mentioned in text", //question to AI
"type": "integer", //format of the attribute with the answer to the question
"var_name": "num_of_animals" //name of the attribute with the answer to the question
}

You can extract up to 12 custom request objects from the text. Each entity is described by a JSON with 3-4 key-value pairs:

  • Description/description - a string up to 150 characters long for forming the question.
  • Type/type - a string for entering the format of the attribute containing the answer. Available formats are integer, string, float, boolean, array.
  • Name/var_name - a string up to 50 characters long for entering the name of the attribute containing the answer. The string should start with a letter, followed by letters, numbers, or underscores.
  • Valid Values/valid_values - an array to define possible values of the attribute. Mentioning up to 20 values is available. Each value can contain 50 characters.

Example of Node Usage

To obtain an answer to a question based on a given text, you need to create a scenario with the following nodes:

  1. Trigger on Webhook to initiate the scenario and provide it with JSON containing the question and response parameters:
[
{
"description": "Number of fruits in text",
"type": "integer",
"var_name": "Answer"
}
]
  1. AI Text Extractor to generate an answer to the question and input text, for example, Three apples and four oranges were collected in the garden;
  1. Webhook response to receive the answer to the question based on the provided text.

The result of executing the scenario is the answer to the question: