Configuring the OCI Vector Provider in APEX

Configuring the OCI Vector Provider in APEX

In this blog, I configure the OCI Vector Provider in APEX and then test it out in SQL Workshop.

Alternative you can install ONNX on Autonomous DB quite easily by following this guide. If you want it on Premise then you first need to install DBMS_CLOUD and then follow this guide.

Prerequisites

  1. Create OCI Credentials in APEX using this guide

  2. 23ai DB Optional/Recommended if you are storing vectors.

Instructions

  1. In APEX click App Builder > Workspace Utilities > Vector Provider > Create

  2. Complete the screen as follows

  3. The Compartment ID should be your Tenancy ID which you can get from this Guide

  4. Select the Region as per your Tenancy Region. Note: In my case, I choose eu-frankfurt-1

  5. Click Save

Testing

Use SQL Workshop > SQL Commands

  1. In SQL Commands use this to test

     DECLARE
         l_vector vector;
     BEGIN
         l_vector := apex_ai.get_vector_embeddings(
             p_value             => 'What is Oracle APEX',
             p_service_static_id => 'OCI_VECTOR' );
         dbms_output.put_line (TO_CHAR(l_vector));
     END;
    
  2. It should look like this

ENJOY!

What's the picture? A mass of tree roots near Hookstone Trails. Visit Yorkshire!