In addition to Oracle’s default Large Language Model (LLM), Oracle Analytics allows you to connect external LLMs such as OpenAI’s GPT-4 Turbo model, using API keys. To integrate OpenAI’s advanced language models as an AI Assistant in Oracle Analytics Cloud, you need to generate an API key from the OpenAI platform and register the model as an LLM within Oracle Analytics Cloud.
This article describes how to enable and integrate OpenAI with Oracle Analytics, including step-by-step instructions on how to generate API keys through the OpenAI platform.
What You’ll Learn
- How to create a secure OpenAI account and API key
- How to register and validate the API key in Oracle Analytics Cloud
- How to assign OpenAI LLMs to power the AI Assistant in Oracle Analytics Cloud
- Important guidelines for third-party LLM configuration, API usage, and data privacy
Overview
When integrated with OpenAI, the Oracle Analytics AI Assistant can:
- Understand natural language questions
- Leverage external knowledge beyond your dataset
- Dynamically generate relevant visualizations in the Assistant panel
About Third-Party LLM Configuration
Instead of using Oracle’s default large language model (LLM) in Oracle Analytics Cloud, you can connect to the third-party LLM – GPT-4 Turbo (OpenAI).
Currently, Oracle Analytics Cloud supports two LLMs:
- Oracle Default — Focuses solely on insights based on your dataset.
- GPT-4 Turbo (OpenAI) — Enables access to broader public-domain knowledge for more complex interactions.
Oracle’s default LLM provides feedback based strictly on your data, ensuring controlled and localized insights. However, by integrating a third-party LLM, such as OpenAI’s GPT-4 Turbo, users can tap into a wider knowledge base — making Oracle Analytics more conversational and context-aware.
Oracle Analytics marks information sourced from a third-party LLM with a dictionary icon, while insights derived from your internal data are tagged with an Oracle logo. This makes it easy to determine the origin of the AI-generated responses.
API keys are unique identifiers used by third-party LLMs to identify users. Oracle recommends that you rotate API keys on a regular basis to maintain security. After rotating your API key, you must update the LLM with the new API key. See Best Practices for API Key Safety.
If you use Oracle Analytics Cloud Enterprise Edition, you can enable additional custom encryption of your API key. See About Encryption in Oracle Analytics Cloud.
Note: If you configure your Oracle Analytics AI Assistant to use an OpenAI LLM, every request made by the Assistant to the OpenAI service counts toward your OpenAI usage limit. This is regardless of the outcome, or the content rendered. Each interaction consumes tokens, which are tracked by OpenAI to ensure efficient use within service limits.
What Information is Sent to the Third-Party LLM?
Whenever you make a request to your Oracle Analytics AI Assistant, some information is shared with your configured third-party LLM. The information shared is the schema definition of the dataset or subject area and the content of your query. No actual data from the dataset is sent to the LLM.
You can selectively enable specific columns in the dataset or subject area to send their information to the LLM if you choose.
Step 1: Create an OpenAI Account and Project
You can use only paid OpenAI accounts in Oracle Analytics. You can’t use trial or free OpenAI accounts.Projects allow teams to collaborate, manage shared API usage, and generate API keys with clarity on usage.
Note: It’s a best practice to review the Limits and Billing sections in the OpenAI platform to stay informed about your usage, cost, and quota limits. This helps prevent unexpected charges and ensures your API key remains valid.
a. Visit https://platform.openai.com and sign up or log in.
b. From the left sidebar, go to Projects and click + Create to create a new project.
c. Name your project. For example, Oracle Analytics.
After creation, your project’s name and ID appears in the Projects list.
🔄 Step 2: Generate a Secret API Key
a. Go to the API Keys page under the project.
b. Click Create new secret key.
c. Provide a name for the key. For example, Analytics-API.
d. Select the correct project. For example, Oracle Analytics.
e. Click Create secret key.
Important: Copy and save the API key. You won’t be able to see it again.
You can generate multiple keys per project, and revoke or rotate them regularly for security.
🌐 Step 3: Register Your LLM in Oracle Analytics Cloud
a. In Oracle Analytics Cloud, navigate to the Console, and click Generative AI.
b. In the Registered Gen AI Services section, click + Register the Gen AI Service to use in Oracle Analytics AI Assistant Features.
c. Provide the following values:
- Name: Enter a friendly name. For example, GPT4Prod.
- LLM Service: Select OpenAI.
- Model: Select gpt-4-turbo.
- API Key: Paste the key you copied previously.
d. Click Validate.
- If the key is valid and billing is enabled, you receive the message, “API Key has been validated”.
e. Click Add to register the model.
🔹 Step 4: Assign Your LLM to the Assistant Feature
a. Scroll down to Oracle Analytics AI Assistant Features.
b. Under Assistant, select your registered model from the drop-down menu.
c. Click Update.
d. Wait for the status to change to Active.
Your Oracle Analytics AI Assistant can now use the external LLM (OpenAI gpt-4-turbo model) as its language model provider.
⚠️ Troubleshooting: Validation Failures
Here are some reasons why API key validation might fail when you register the LLM in Oracle Analytics Cloud:
- The API key you provided is incorrect or expired.
- You exceeded your OpenAI usage quota.
- Your OpenAI account ran out of credits.
🔍 Where to Check
- Billing: https://platform.openai.com/account/billing/overview
- Usage: https://platform.openai.com/account/usage
- Subscription & credits: https://platform.openai.com/account
🤝 Final Thoughts
Integrating OpenAI with Oracle Analytics unlocks rich, natural language experiences for your users. With just a few steps, you can:
- Create and manage OpenAI API keys securely.
- Stay aware of usage and billing settings in OpenAI.
- Register LLMs directly in Oracle Analytics Cloud and validate them.
- Enable powerful, contextual AI-driven insights in Oracle Analytics Cloud.
⚠️ Caution: Use of third-party AI like OpenAI is governed by their own terms and is considered a Third-party Service under your Oracle agreement. Oracle provides access “as-is” and disclaims any liability.
Want to see it live? Watch the YouTube demo and feel free to join us to learn more in the Oracle Analytics Community.
