GenAI#
Product.GenAI.AskAI
Product.GenAI.ViewSummary
Resource.GenAI.AskAI
Resource.GenAI.ViewSummary
Overview#
GenAI provides generative AI capabilities inside the MES. It allows you to ask questions about the content of entity documents and attachments or quickly generate summaries.
GenAI is currently available for Products and Resources.
Preconditions#
-
The Generative AI Infrastructure must be deployed and configured in your MES environment.
Info
To deploy the Generative AI Infrastructure, follow the steps in the Installation guide.
-
A valid email address must be configured for your user.
- The Attachment Types that can be processed by the LLM are configured.
Configuration#
Add an Email Address#
- Go to Administration > Security > Users.
- Select the user you want to grant access to GenAI.
- Verify that the Email Address field is defined.
Enable Generative AI for Attachments#
To allow GenAI to process specific attachment types:
- Go to Administration > Tables > Generic Tables.
- Open the AttachmentType Generic Table.
- Enable the column Enable Generative AI for each Entity Type and Attachment Type you want GenAI to use.
Using the GenAI Features#
GenAI can be accessed directly from entity pages. Two buttons are available:
- Ask AI – this button allows you to ask questions about the content of documents and attachments.
- View Summary – this button allows you to generate a summary of a selected document or attachment, with the option to ask follow-up questions.
You can open the GenAI panel in three different ways:
-
From the entity toolbar, by selecting Ask AI.
-
From the View Documents window, using the drop-down menu (Ask AI or View Summary).
-
From the Attachments section:
- If you select one document, both Ask AI and View Summary are available on the toolbar.
- If you select multiple documents, only Ask AI is available.
- If you open a single document, the drop-down menu provides both Ask AI and View Summary.
LLM Prompts#
When you open the GenAI panel, a context prompt is sent to the LLM. This context contains:
- The entity ID and type.
- The IDs of selected documents and/or attachments.
- The instructions required to generate the correct answer.
- An optional initial prompt, if configured.
This context can be customized by:
- Entity type
- Button location (Entity, Documents, and Attachments)
- Button type (Ask AI and View Summary)
To customize the LLM prompt:
- Go to Administration > Tables > Smart Tables.
- Open the GenerativeAIPrompt Smart Table.
-
Create or edit an entry and define the following fields as required:
- Entity Type – optionally, specify the entity where the customization applies.
- Prompt Id – choose the unique identifier for the prompt configuration.
- Agent Id – optionally, identify of the agent to be used.
- MCP Server Ids – optionally, choose the MCP servers unique identifier for the configuration.
Info
If multiple MCP Server Ids are defined, the system automatically selects the appropriate one. A fresh MES installation includes the following MCP Server Ids:
mes,cubes, andcdm.- Model – optionally, set the LLM model to be used.
- Temperature – optionally, set the randomness of the LLM output (lower values produce more deterministic answers).
- Prompt Prefix – define the context text sent to the LLM before the user input.
- First Prompt – optionally, define the initial instruction or question automatically added when the panel opens.
Warning
The prompt prefix and the first prompt are included in the URL and cannot exceed 2000 characters each.




