Categories
APEX GenAI

First Look at APEX 24.1 AI Assistant

Oracle APEX 24.1 introduced the ability to use an AI Assistant. This can help with tasks from generating applications to providing an AI “Digital Assistant” for user interaction. In this article I show how to set up the AI Assistant and a couple of examples of it in use. Note that I chose to use an Autonomous Oracle 19c instance here as not everyone is yet migrating to 23ai. Let’s see how it goes.

Firstly head to Workspace Utilities.

Here we find a new option Generative AI where we can configure the Gen AI services that APEX can use.

There is a dropdown of available AI providers, currently Oracle Gen AI, Cohere and Open AI. I will select Open AI. It is a pretty simple process, you really just need your API key and select the model you wish to use. I have set the Static ID to “MarksOpenAI” as I will reference this in the declarative set up later on. I have also flipped the switch Use by App Builder as this makes the model available to the GenAI app builder.

Once complete we see the overview of the setup.

Now when I goto the APEX App Builder, I get a new option Create App Using Generative AI.

Now I can create an application just by just using narrative. Ask and it will be built? Let’s see. Here I give it a simple instruction, deliberately avoiding mentioning anything “technical” and that is enough for the AI to look at my schema and determine that I have a table that would fit the ask and I get a nice summary of what will be developed. I can add additional requests here as the context is kept, e.g. add a faceted search, but let’s just keep it simple.

I can change things myself of course – and here I decide to tweak the theme to Redwood.

That is it. We’re ready to go.

The application runs and does what I asked of it.

Let’s take advantage of some other AI features and add an AI Assistant to answer my queries. To do this, I simply add a new button in the designer called “Ask Mark” and give it nice little chatbot icon.

A really cool feature of APEX 24.1 is a host of new “AI” icons.

Let’s add a Dynamic Action to the button to call the AI Assistant. Fortunately there is a new Action called “Open AI Assistant” to help us here.

We can keep it simple, and just set the Gen AI service we want to use (MarksOpenAI) and put in a friendly welcome message. I am going to display this as a dialog but we could do it inline and even return the results to a page item.

Let’s run the app. We see the new hot Ask Mark button with the AI Assistant icon next to it.

Pressing the button invokes the Gen AI layout we requested and it’s waiting for our prompt which will be then sent to the specified Open AI service.

Let’s ask it some questions about guitars as this is a guitar app.

I’d agree with those … and i’ll be playing a Les Paul Custom at a music festival this weekend.

We’ve seen that adding in AI to APEX applications becomes quite an easy process from 24.1 onwards and it’s going to be so interesting to see how AI integration evolves and how it gets used by developers and users alike.