---
title: "Configuring AI Extraction Rule"
slug: "configuring-ai-extraction-rule"
updated: 2026-05-27T07:29:32Z
published: 2026-05-27T07:29:32Z
canonical: "documentation.encodify.com/configuring-ai-extraction-rule"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.encodify.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuring AI Extraction Rule

## Guide to Configuring and Using the Multimodal AI Extraction Rule

This guide provides an overview of configuring and using the Multimodal AI Extraction rule. This functionality allows the system to send text data and media files from specific modules to an AI service and record the extracted data values back into the system.

### 1. Rule Configuration

The configuration is divided into five primary configuration steps.

#### Step 1: Basic Info & Conditions

This section defines the rule's identity and the specific trigger criteria.

| Field | Description |
| --- | --- |
| **Name** | Enter a unique name for the rule (e.g., "Product Description Extraction "). |
| **Description** | (Optional) Briefly explain the purpose of this AI extraction. |
| **Active Toggle** | Ensure this is switched On for the rule to run. |
| **Type** | Select Multimodal AI Data Extraction from the dropdown. |
| **Sort Order** | Determines the priority if multiple rules are triggered simultaneously. |
| **Module** | Select the primary module (e.g., Products) that will trigger the extraction. |
| **IF Condition** | Set the criteria that must be met for the rule to be executed. |

#### Step 2: Actions (Main Item Fields)

Identify which specific field data from the main item should be sent to the AI.

- **Analysed Module:** This defaults to the module selected in the **Conditions** section.
- **Analyse Data in Fields:** Click **Add Field** to specify the field data you want the AI to evaluate and extract from. It is also possible to select **File** fields and define if the original file or its rendition should be sent for extraction.

![Interface for calling AI with product title and description fields highlighted.](https://cdn.document360.io/3a63e0a8-1221-4570-aaa1-d43f9b95a612/Images/Documentation/Form with fields to analyze.png)

Form with fields to analyse

#### Step 3: Linked Modules Fields

You can enrich the AI request with linked item data and files.

- **Linked Module:** Select the linked module. Note that only modules with module links to the main module can be selected. Direct links from main module to linked modules are not supported.
- **Link Field:** Identify the field that connects the two modules.
- **Filter by Field/Values:** (Optional) Narrow down which linked items are sent (e.g., only items where Status is "Available" or "Ready").
- **Analyse Data in Fields:** Select the field(s) to send.
- **Media Holder:** For file fields, specify if the original file or rendition is sent for assessment.

![Configuration settings for linked modules, including content and product status filters.](https://cdn.document360.io/3a63e0a8-1221-4570-aaa1-d43f9b95a612/Images/Documentation/Linked Module.png)

Adding fields from the Linked Module(s)

#### Step 4: AI Prompt

This is the instruction sent to the AI.

- **Prompt for AI:** Use the rich text editor to provide clear, concise instructions. Prompt field supports markdown.

**Example:** "Analyse the provided product title, product description and the attached product images. Write an improved description based on the product title, description and images in fluent professional English. Target name: must include product name, length 20-40 characters.Target summary: must include product description, length 50-100 characters." (**Pay attention**: in order to avoid “the Conversational” drift, disambiguation it is recommended to explicitly add target fields and short instructions for them)
- **Grounding:******When enabled, the AI may use external search results to supplement the extraction.

![Instruction text area for AI call with formatting options visible above the text box.](https://cdn.document360.io/3a63e0a8-1221-4570-aaa1-d43f9b95a612/Images/Documentation/Prompt.png)

Instruction text input area for AI prompt creation in a document editor.

#### Step 5: Save the Result

Define how the AI's response should be stored.

- **Storage Method:** Choose between **Save in Current Item** or **Create Inline Item**.

AI’s output field mapping is the same regardless of which save method is selected. Saving to a separate module will require the module and the linked field specified.

- **Target Field(s):** fields to store extracted data. Usually a text, numeric or date field.
- **Validate Target Fields:**When enabled, the item is validated before saving the extracted values to target fields. If validation fails, the save is skipped, and the status is set to “Failed”.
- **Status Code & Error Message:** Vital for troubleshooting failed calls.

Specify the status field and values to track the extraction rule progress

- **Status Field Mapping:** Map the statuses to your main module's field options so you can track progress (e.g., Map "*In Progress*," "*Success*" and "*Failed*").

![Form fields for data extraction with options for status and error messages.](https://cdn.document360.io/3a63e0a8-1221-4570-aaa1-d43f9b95a612/Images/Documentation/ Save extracted data.png)

Form fields for extraction results and status updates.

### 2. Rule Execution (Triggering)

This rule does not have a subtype or event that triggers it. Instead, it is governed by the following logic:

- **Action Trigger:** Execution is triggered by a Create or Update action on main item within the selected main module.
- **Status Gatekeeper:** The rule will only run if the mapped **Status** field value does not equal the options mapped as "In Progress," "Failed," or "Completed." This prevents infinite loops.
- **Filter Match:** The item must meet the specific criteria defined in the Conditions section (if any).

Once triggered, the item status will shift to "In Progress" until the AI service returns the data to the mapped result fields. Successful extractions will set main item’s status to the option mapped as “Completed Successfully“.

![Product information for freeze-dried mangoes, including price and extraction status details.](https://cdn.document360.io/3a63e0a8-1221-4570-aaa1-d43f9b95a612/Images/Documentation/Main_and_Inline with extracted_data.png)

Example of the main item with the linked extracted result and successfully completed status.

### 3. Recommendations and Limitations

#### General AI Caution

AI can make mistakes. It is recommended to add Help Text to the result fields (e.g., "This field is populated by AI; please verify for accuracy").

#### Technical Limitations & Risks

- **Consistency:** The same payload may return slightly different results across multiple calls.
- **Data Volume:** Large volumes of data (e.g., a single file >100MB or more than 30 separate files) can significantly degrade the quality of the AI's output.
- **Race Conditions**: If the "Copy referenced items" feature is enabled for the main module, the AI rule might trigger before all linked items have finished being created as a result of a copy of the main item.
- **Stuck Status**: If an item remains "In Progress" for an extended period, check the webapp logs. If the system fails to update the item with the final response, it may stay in that status until it is manually reset.
- **File Integrity:**
  - Files with special characters (%0D, %0A) in the name that cannot be downloaded via UI cannot be analysed.
  - Encrypted or password-protected PDFs will cause an evaluation failure.
  - Files with incorrect or double extensions (e.g., .pdf.exe) may fail.
