GeneXusAI Overview

Official Content
This documentation is valid for:

GeneXusAI is an installable module that aims to simplify the integration of Artificial Intelligence (AI) most common capabilities in GeneXus.

Content

What do I (as a developer) have to do to include these tasks?

You have to install GeneXusAI module from the Manage Module References dialog on the Knowledge Manager option (located in the toolbar of GeneXus IDE). Once you installed it, you must configure your desired provider and set the appropriate properties for each task (credentials, deployment information, optional parameters, etc.).

Which providers are supported?

Supported providers are:

For detailed information, refer to the backlog in GeneXusAI: Release notes article.

Which AI tasks are available?

GeneXusAI is structured as follows. Each submodule has specific procedures, domains, and structured data types that allow you to integrate your desired task.

GeneXusAI
├── Configuration
├── Audio
│   ├── SpeechToText
│   └── TextToSpeech
├── Image
│   ├── Classify    ├── DetectFaces   ├── DetectObjects
│   ├── DetectScene   └── OCR
├── Text
│   ├── DetectLanguage
│   ├── ExtractEntitites
│   ├── KeyPhrases
│   ├── SentimentAnalysis
│   └── Translate
└── Video
    ├── Analyze
    └── Process

The availability of a service depends on the provider you chose (summarized in the following table), as well as its pricing, accuracy, and performance. Some empirical tests for these last two features are described on the documentation for each task. Pricing must be consulted in the provider web site.

GeneXus AI Cloud-based
providers
On-device
providers
Module Task Alibaba Amazon Baidu Google IBM Microsoft SAP Tencent MLKit CoreML
Audio SpeechToText
TextToSpeech
Image Classify
└ Custom models
DetectFaces
DetectObjects
DetectScene
OCR
Text DetectLanguage
ExtractEntitites
KeyPhrases
SentimentAnalysis
Translate
Video Analyze
Process

Reference:
+ : Available
+ –: Not provided
+ : Work in progress

What if I want to use another service that is not provided?

GeneXusAI offers the most common set of functionalities available on most of the providers. Specific services, for a particular provider, must be developed by hand.

For cloud-based providers, you can consume the ReST service by using HttpClient data type, or using the OpenAPI import tool when the provider exposes a Swagger descriptor (either in YAML or JSON), or even by creating an External Object that wraps the provider's library. This last alternative is the one you must use for device-inference providers, which must be implemented by the Extension Library concept.

What do I have to do to set a specific provider?

You must fully set the &provider input parameter before calling any procedure (the AI task) with the required properties for the provider you've chosen.

For example, if you want to use DetectFaces procedure with Microsoft Azure Cognitive Services, you should write something like this:

// Instanciate the provider. In this case, Microsoft.
&provider = new() 
&provider.Name = "my-microsoft-face-recognition-instance-1"
&provider.Type = ProviderType.Microsoft

// Add the required properties. In this case, the API-Key provided by Microsoft.
&providerProperty = new()
&providerProperty.key   = PropertyKey.Key
&providerProperty.Value = !"{your_microsoft_visual_recognition_key}"
&provider.Properties.Add(&providerProperty)

// Call to GeneXusAI's procedure and get the result.
&regions = GeneXusAI.Image.DetectFaces(&image, &provider, &messages)
where:
&provider : Provider, GeneXusAI.Configuration
&providerProperty : Provider.Property, GeneXusAI.Configuration


You can reuse the &provider definition for multiple services when they share the credentials. If you add duplicated properties, GeneXusAI will always consider the last one you added.

Note: Each procedure (or AI task) of GeneXusAI will have specific requirements, especially in terms of service authentication credentials (read HowTo: Get credentials from a cloud provider for GeneXusAI). Detailed information can be found on the procedure's documentation you want to use.

Can I build a custom model in GenexusAI?

Yes. Refer to HowTo: Build a custom model for GeneXusAI.

Why should I use GenexusAI?

First of all, GeneXusAI encapsulates the complexity of learning specific solutions. You just only need to call a GeneXus's procedure with the required parameters, and that's all.

Maintenance is not a problem. You don't have to worry about being outdated. You just should update GeneXusAI module when you want or when it is needed.

In the other hand, imagine you already have developed a system that integrates AI in your solution, but some time later you realize that the service does not satisfy your requirements (e.g. in terms of cost, performance, etc.). If you were not using GeneXusAI, you should redesign your system (rewrite API-calls, create new structures or modify preexisting one, etc.). When you use GeneXusAI the only thing you do is to redefine your &provider input parameter with a new setting for the provider you chose.

Finally, GeneXusAI allows you to use multiple providers by defining multiple &provider instances for each provider you want to use. Then, for example, you can use DetectFaces procedure with Microsoft, Classify procedure with IBM and Translate procedure with Google. In this way, you can find the best balance between cost, performance, and accuracy; both for your users, your system and your business.

Scope

Platforms Web(.NET,.NETCore,Java), SmartDevices(Android,iOS)

Availability

GeneXus Artificial Intelligence is available as of GeneXus 16.

Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.