About Document AI #
The Document AI module brings AI-powered document processing into M-Files. It enables you to automatically classify documents, extract information from their content, and use the results to update metadata, create M-Files objects, or save extracted output as files.
Document AI supports Microsoft Foundry and Azure Document Intelligence, allowing you to choose between flexible AI models and prebuilt document processing models depending on your requirements.
Processing can be triggered automatically through M-Files events and workflows or initiated on demand. Using configurable rules, you can control which documents are processed, which information is extracted, and how the results are used in M-Files.
Key Features #
- Automated metadata extraction: Extract information such as document numbers, dates, amounts, names, and other fields, and map the results directly to M-Files properties.
- Document classification: Automatically classify documents based on their content using Microsoft Foundry models or trained Azure Document Intelligence classifiers. Map the results to M-Files classes or properties.
- Automatic object creation: Create new M-Files objects from extracted information, including multiple objects from repeating data such as invoice line items. Configure duplicate detection to avoid creating matching objects.
- Smart lookup and property mapping: Match extracted values to existing M-Files objects or value list items using exact or fuzzy matching. Configure lookup filters, handle missing values, and control how existing metadata is updated.
- File output: Save AI processing results as files in M-Files, including full service responses in JSON format and supported model outputs.
- Flexible document processing: Process entire documents or specific pages, with OCR support for scanned documents and images.
- Trigger-based execution: Run Document AI processing automatically based on M-Files events, such as object creation and workflow state changes, or initiate processing on demand.
- Flexible AI model selection: Use deployed Microsoft Foundry models or Azure Document Intelligence prebuilt models, depending on the document type and processing requirements.
- Interactive service: Use the M-Files Intelligent Metadata Layer service to trigger Document AI analysis directly from the M-Files user interface.
Services #
Document AI follows a bring-your-own-model approach, where access to external AI services is provided in license by either the customer or Unitfly.
Currently supported services are:
Microsoft Foundry #
Microsoft Foundry provides access to deployed AI models for flexible, prompt-based document processing.
It supports:
- Metadata extraction: Extract specific information from documents using configurable query fields and model instructions, including nested fields and arrays.
- Document classification: Classify documents using representative examples of each document class, without training a separate custom classifier.
- Object creation: Create M-Files objects from extracted values, including individual objects for elements in an extracted array.
- Custom model instructions: Define additional context, extraction requirements, and output constraints to guide model behavior.
Microsoft Foundry is suitable for documents with varied formats or extraction requirements that are not covered by predefined models. Model usage and costs depend on the deployed model and its consumption model.
For configuration details, see Microsoft Foundry AI Action.
Azure Document Intelligence #
Azure Document Intelligence provides document processing models for extracting text, document structure, and predefined information from common document types.
It supports:
- Prebuilt extraction models: Process documents using prebuilt-read, prebuilt-layout, prebuilt-invoice, prebuilt-receipt, and prebuilt-contract.
- Structured metadata extraction: Extract predefined fields such as invoice numbers, dates, amounts, supplier information, and contract details.
- Document classification: Classify documents using trained custom classifiers and map the results to M-Files classes or properties.
- Object creation: Create M-Files objects from extracted data, including related records such as invoice items, payment details, contract parties, and jurisdictions.
Azure Document Intelligence is suitable for structured and repetitive document processing scenarios, particularly when supported prebuilt models can extract the required information.
For configuration details, see Azure Document Intelligence AI Action.
Accessing Document AI #
After you have successfully installed the application, you should configure Document AI. Enabled services are listed out in module dashboard.
NOTE: Before applying a renewed license or new version of the application, make sure that you restart your vault after.
- Open M-Files Admin.
- In the left-side tree view, expand the desired connection to M-Files Server.
- In the left-side tree view, expand the Document Vaults node.
- Still in the left-side tree view, expand the vault where you installed the connector and select Configurations.
- Expand Other Applications.
- Expand Extension Kit.
- Click on Document AI.
Initial Configuration Steps #
To begin configuring a rule, you need to define four fundamental fields to establish the rule’s essentials. Below, you will find a detailed description of each of these fields:
Name #
This required field designates the unique name for the rule. It should be clear and descriptive, aiding users in understanding the purpose or function of the rule. For example:
- Incoming Invoice – Extraction: A descriptive name for the rule that entails copying an end date from a contract to a related deal.
Description #
This field allows users to briefly describe the rule’s purpose and include any relevant information. Although optional, providing a description is highly recommended to enhance clarity. For example:
- When Incoming Invoice is Created, extract relevant metadata: This description elaborates on the trigger, trigger source, target, and action associated with the rule Incoming Invoice – Extraction.
Enabled #
Specifies whether the rule is active or inactive, providing users with control over its activation status. By default, all rules are enabled for execution. To halt or prevent the rule from executing, you can disable it.
- Yes (default): The rule is enabled and will execute.
- No: The rule is disabled and will not execute.
Configuration mode #
Specifies the mode in which the rule is configured. Depending on the complexity of the rule, users choose one of the options:
- Simple (default): Simple rule configuration options are displayed.
- Advanced: Advanced rule configuration options are displayed, showing additional functionalities. Refer to the advanced rule configuration guide for detailed instructions.