Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions content/en/docs/marketplace/genai/mendix-cloud-genai/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ no_list: false

## Introduction

In order to help developers integrate GenAI capabilities into custom applications, Mendix Cloud provides GenAI Resource Packs. These packs offer access to Large Language Models (for text generation and text embeddings) and knowledge bases, enabling seamless implementation of common GenAI patterns in a low-code environment. They simplify the process of leveraging GenAI technologies for Mendix customers and partners by abstracting complex provisioning processes and reducing configuration to just a few clicks within the platform experience. Feel free to contact [genai-resource-packs@mendix.com](mailto:genai-resource-packs@mendix.com) to learn more.
Mendix Cloud provides GenAI Resource Packs to help developers integrate GenAI capabilities into custom applications. These packs offer access to large language models (for text generation and text embeddings) and knowledge bases, enabling seamless implementation of common GenAI patterns in a low-code environment. They simplify the process of leveraging GenAI technologies for Mendix customers and partners by abstracting complex provisioning processes and reducing configuration to just a few clicks. To learn more, contact [genai-resource-packs@mendix.com](mailto:genai-resource-packs@mendix.com).
Comment thread
dbreseman marked this conversation as resolved.

## Resources Overview

There are three different types of resources:
There are three types of resources:

* Compute – Text Generation: generates human-like text based on given inputs, essential for applications requiring natural language generation.
* Compute – Text Generation: Generates human-like text based on given inputs, essential for applications requiring natural language generation.

* Knowledge Base: A knowledge base can be used to upload your data which then can be used by a text generation resource.
* Knowledge Base: Stores your data for use by a text generation resource.

* Compute – Embeddings Generation: converts text into vector representations. An embeddings resource is required to uploading data to your Knowledge Base.
* Compute – Embeddings Generation: Converts text into vector representations. An embeddings resource is required to upload data to your knowledge base.

## Getting started
## Getting Started

1. Learn about GenAI Resource Packs and how to acquire them in the [Mendix Cloud GenAI Resource Packs](/appstore/modules/genai/mx-cloud-genai/resource-packs/) document.
2. Once you have access to GenAI resources, log in to the [Mendix Cloud GenAI portal](https://genai.home.mendix.com/) to generate access keys for your resources. This portal provides an overview of all the resources you have access to and you can also request new GenAI Resources there. For more information, see [Navigate through the Mendix Cloud GenAI Portal](/appstore/modules/genai/mx-cloud-genai/Navigate-MxGenAI/).
3. Use a starter app containing the [Mendix Cloud GenAI Connector](https://marketplace.mendix.com/link/component/239449) (for example, the [BlankGenAI starter app](https://marketplace.mendix.com/link/component/227934)) or implement the connector in the Mendix application according to its documentation. Once you have imported access key in its configuration overview, you are connected to Mendix Cloud GenAI and can access available resources within your application.
2. Once you have access to GenAI resources, log in to the [Mendix Cloud GenAI portal](https://genai.home.mendix.com/) to generate access keys for your resources. This portal provides an overview of all resources you have access to and enables you to request new GenAI resources. For more information, see [Navigate through the Mendix Cloud GenAI Portal](/appstore/modules/genai/mx-cloud-genai/Navigate-MxGenAI/).
3. Use a starter app containing the [Mendix Cloud GenAI Connector](https://marketplace.mendix.com/link/component/239449) (for example, the [BlankGenAI starter app](https://marketplace.mendix.com/link/component/227934)) or implement the connector in your Mendix app. For more information on configuration and usage, see [Mendix Cloud GenAI Connector](/appstore/modules/genai/mx-cloud-genai/MxGenAI-connector/). Once you have imported an access key in the configuration overview, you are connected to Mendix Cloud GenAI and can access available resources within your application.

## Relevant Sources
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ aliases:

## Introduction

The [Mendix Cloud GenAI connector](https://marketplace.mendix.com/link/component/239449) lets you utilize [Mendix Cloud GenAI Resource Packs](/appstore/modules/genai/mx-cloud-genai/resource-packs/) directly within your Mendix application. It allows you to integrate generative AI by dragging and dropping common operations from its toolbox.
The [Mendix Cloud GenAI connector](https://marketplace.mendix.com/link/component/239449) lets you use [Mendix Cloud GenAI Resource Packs](/appstore/modules/genai/mx-cloud-genai/resource-packs/) directly within your Mendix application. It allows you to integrate generative AI by dragging and dropping common operations from its toolbox.

### Features

Expand All @@ -20,7 +20,7 @@ Typical use cases for generative AI are described in more detail in the [Typical

### Prerequisites

To use this connector, you need configuration keys to authenticate to the Mendix Cloud GenAI services. You can generate keys in the [Mendix Cloud GenAI Portal](https://genai.home.mendix.com) or ask someone with access to either generate them for you or add you to their team so you can generate keys yourself.
To use this connector, you need configuration keys to authenticate to the Mendix Cloud GenAI services. You can generate keys in the [Mendix Cloud GenAI Portal](https://genai.home.mendix.com) or ask someone with access to either generate them for you or add you to their team so that you can generate keys yourself.

{{% alert color="info" %}}

Expand All @@ -36,7 +36,7 @@ The Mendix Cloud GenAI Connector module generates embeddings internally when int

## Installation

Add the [dependencies](#dependencies) listed above from the Marketplace. To import this module into your app, follow the instructions in the [Use Marketplace Content](/appstore/use-content/).
Add the [dependencies](#dependencies) listed above from the Marketplace. To import this module into your app, follow the instructions in [Use Marketplace Content](/appstore/use-content/).

## Configuration {#configuration}

Expand Down Expand Up @@ -180,13 +180,13 @@ Using metadata, even more fine-grained filtering becomes feasible. Each ticket m

Instead of relying solely on similarity-based searches of ticket descriptions, users can then filter for specific tickets, such as 'Bug' tickets with the status set to 'Solved'. You can add [MetaData](/appstore/modules/genai/genai-for-mx/commons/#chunkcollection-add-knowledgebasechunk) with the respective key to each chunk during insertion.

#### How to get data into a knowledge base
#### How to Get Data Into a Knowledge Base

If you are looking for a step-by-step guide on how to get your application data into a collection inside of a Mendix Cloud Knowledge Base Resource, refer to [Grounding Your Large Language Model in Data – Mendix Cloud GenAI](/appstore/modules/genai/how-to/howto-groundllm/). Note that the Mendix Portal also provides options for importing data into your knowledge base, such as file uploads. For more information, see [Navigate through the Mendix Cloud GenAI Portal](/appstore/modules/genai/mx-cloud-genai/Navigate-MxGenAI/). This documentation focuses solely on adding data from inside a Mendix application and using the connector.
If you are looking for a step-by-step guide on how to get your application data into a collection inside a Mendix Cloud Knowledge Base Resource, refer to [Grounding Your Large Language Model in Data – Mendix Cloud GenAI](/appstore/modules/genai/how-to/howto-groundllm/). Note that the Mendix Portal also provides options for importing data into your knowledge base, such as file uploads. For more information, see [Navigate through the Mendix Cloud GenAI Portal](/appstore/modules/genai/mx-cloud-genai/Navigate-MxGenAI/). This documentation focuses solely on adding data from inside a Mendix application and using the connector.

### Knowledge Base Operations

To implement knowledge base logic into your Mendix application, you can use the actions in the **USE_ME** > **Knowledge Base** folder or under the **GenAI Knowledge Base (Content)** or **Mendix Cloud Knowledge Base** categories in the **Toolbox**. These actions require a specialized [DeployedKnowledgeBase](/appstore/modules/genai/genai-for-mx/commons/#deployed-knowledge-base) of type `Collection` that determines the model and endpoint to use. Additionally, the collection name must be passed when creating the object and it must be associated with a `Configuration` object. Please note that for Mendix Cloud GenAI a knowledge base resource may contain several collections (tables).
To implement knowledge base logic into your Mendix application, you can use the actions in the **USE_ME** > **Knowledge Base** folder or under the **GenAI Knowledge Base (Content)** or **Mendix Cloud Knowledge Base** categories in the **Toolbox**. These actions require a specialized [DeployedKnowledgeBase](/appstore/modules/genai/genai-for-mx/commons/#deployed-knowledge-base) of type `Collection` that determines the model and endpoint to use. Additionally, the collection name must be passed when creating the object, and it must be associated with a `Configuration` object. Note that for Mendix Cloud GenAI, a knowledge base resource may contain several collections (tables).

Dealing with knowledge bases involves two main stages:

Expand All @@ -209,7 +209,7 @@ To add data to the knowledge base, you need discrete pieces of information and c

Dividing data into chunks is crucial for model accuracy, as it helps optimize the relevance of the content. The best chunking strategy is to keep a balance between reducing noise by keeping chunks small and retaining enough content within a chunk to get relevant results. Creating overlapping chunks can help preserve more context while maintaining a fixed chunk size. It is recommended to experiment with different chunking strategies to decide the best strategy for your data. In general, if chunks are logical and meaningful to humans, they will also make sense to the model. A chunk size of approximately 1500 characters with overlapping chunks has been proven to be effective for longer texts in the past.

Since embeddings operations have a maximum character limit of 2048 characters per chunk, you must ensure that your chunks do not exceed this limit before submitting them for embedding. Chunks exceeding this limit will cause the embedding operation to fail, so validate your input data accordingly.
Because embeddings operations have a maximum character limit of 2048 characters per chunk, you must ensure that your chunks do not exceed this limit before submitting them for embedding. Chunks exceeding this limit will cause the embedding operation to fail, so validate your input data accordingly.

The chunk collection can then be stored in the knowledge base using one of the following operations:

Expand All @@ -218,28 +218,28 @@ The chunk collection can then be stored in the knowledge base using one of the f
Use the following toolbox actions inside the **Mendix Cloud Knowledge Base** toolbox category to populate knowledge data into a collection:

1. `Embed & Insert` embeds a list of chunks (passed via a [ChunkCollection](/appstore/modules/genai/genai-for-mx/commons/#chunkcollection)) and inserts them into the knowledge base.
2. `Embed & repopulate KB` is similar to the `Embed & Insert`, but deletes all existing chunks from the knowledge base before inserting the new chunks.
3. `Embed & Replace` replaces existing chunks in the knowledge base that match the associated Mendix object which was passed via [Add KnowledgeBaseChunk to ChunkCollection](/appstore/modules/genai/genai-for-mx/commons/#chunkcollection-add-knowledgebasechunk) action at the insertion stage.
2. `Embed & Repopulate KB` is similar to `Embed & Insert`, but deletes all existing chunks from the knowledge base before inserting the new chunks.
3. `Embed & Replace` replaces existing chunks in the knowledge base that match the associated Mendix object that was passed via the [Add KnowledgeBaseChunk to ChunkCollection](/appstore/modules/genai/genai-for-mx/commons/#chunkcollection-add-knowledgebasechunk) action at the insertion stage.

Additionally, use the following toolbox actions to delete chunks:

* `Delete for Object` deletes all chunks (and related metadata) from the collection that was associated with a passed Mendix object at the insertion stage.
* `Delete for List` is similar to the `Delete for Object`, but a list of Mendix objects is passed instead.
* `Delete for List` is similar to `Delete for Object`, but a list of Mendix objects is passed instead.

When data in your Mendix app that is relevant to the knowledge base changes, it is usually necessary to keep the knowledge base chunks in sync. Whenever a Mendix Object changes, the affected chunks must be updated. Depending on your use case, the `Embed & Replace` and `Delete for Objects` can be conveniently used in event handler microflows.
When data in your Mendix app that is relevant to the knowledge base changes, it is usually necessary to keep the knowledge base chunks in sync. Whenever a Mendix object changes, the affected chunks must be updated. Depending on your use case, `Embed & Replace` and `Delete for Objects` can be used in event handler microflows.

##### Knowledge Base Retrieval{#knowledge-base-retrieval}

The following toolbox actions can be used to retrieve knowledge data from a collection (and associate it with your Mendix data):

1. `Retrieve` retrieves knowledge base chunks from the knowledge base. You can use pagination via the `Offset` and `MaxNumberOfResults` parameters or apply filtering via a `MetadataCollection` or `MxObject`.
2. `Retrieve & Associate` is similar to the `Retrieve` but associates the returned chunks with a Mendix object if they were linked at the insertion stage.
2. `Retrieve & Associate` is similar to `Retrieve` but associates the returned chunks with a Mendix object if they were linked at the insertion stage.

{{% alert color="info" %}}You must define your entity specialized from `KnowledgeBaseChunk`, which is associated with the entity that was used to pass a MendixObject during the [insertion stage](#knowledge-base-insertion).
{{% /alert %}}

3. `Embed & Retrieve Nearest Neighbors` retrieves a list of type [KnowledgeBaseChunk](/appstore/modules/genai/genai-for-mx/commons/#knowledgebasechunk-entity) from the knowledge base that are most similar to a given `Content` by calculating the cosine similarity of its vectors.
4. `Embed & Retrieve Nearest Neighbors & Associate` combines the above actions `Retrieve & Associate` and `Embed & Retrieve Nearest Neighbors`.
4. `Embed & Retrieve Nearest Neighbors & Associate` combines the above actions, `Retrieve & Associate` and `Embed & Retrieve Nearest Neighbors`.

### Embedding Operations

Expand Down Expand Up @@ -333,7 +333,7 @@ To do this, follow the steps below:

### Attribute or Reference Required Error Message After Upgrade

If you encounter an error stating that an attribute or a reference is required after an upgrade, first upgrade all modules by right-clicking the error, then upgrade Data Widgets.
If you encounter an error stating that an attribute or reference is required after an upgrade, first upgrade all modules by right-clicking the error, then upgrade Data Widgets.

### Conflicted Lib Error After Module Import

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
---
title: "Connectors to External Platforms"
url: /appstore/modules/genai/reference-guide/external-connectors/
linktitle: "Connectors to External Platforms"
title: "Connectors"
url: /appstore/modules/genai/reference-guide/connectors/
weight: 30
description: "Provides information on connectors that enable seamless integration between Mendix applications and external platforms."
description: "Provides information on connectors that enable seamless integration between Mendix applications and GenAI platforms and services."
no_list: false
aliases:
- /appstore/modules/genai/reference-guide/external-connectors/
---

## Introduction
## Introduction

The Mendix platform provides seamless integration with various external platforms through specialized connectors. These connectors enable you to extend the functionality of your applications by leveraging external services and data sources. This section introduces the connectors available for [Snowflake Cortex](/appstore/modules/genai/snowflake-cortex/), [OpenAI](/appstore/modules/genai/openai/), [Amazon Bedrock](/appstore/modules/genai/bedrock/), and [PGVector Knowledge Base](/appstore/modules/genai/pgvector/), providing a high-level overview of their capabilities.
The Mendix platform provides seamless integration with various platforms through specialized connectors. These connectors enable you to extend the functionality of your applications by leveraging external services and data sources.

This section contains documentation for GenAI connectors, including the [Mendix Cloud GenAI Connector](/appstore/modules/genai/mx-cloud-genai/MxGenAI-connector/) and connectors to external platforms such as Amazon Bedrock and OpenAI.

## Connectors
Loading