Query Your Oracle Autonomous Database With Natural Language
Written by Nikos Vaggalis   
Monday, 22 April 2024

Select AI is a new feature of the Oracle Autonomous Database that transforms your mother language to SQL. This is a big boon for non-developers in extracting value out of their data silos.

It was expected that at some point someone would use generative AI to compile English to SQL. SQL, although easy to grasp, has been the barrier to management's direct interaction with the data silos of the organization. Therefore general purpose tools like Vanna SQL sprung up that combine LLM with SQL to make the wealth of information stored in your personal or enterprise database approachable to anyone, as easy as chatting with ChatGPT.

It's only logical that dedicated to a product solutions would spring up. We've examined such tool in "Couchbase's Coding Assistant Goes GA" where Capella iQ, the AI coding assistant for developers that makes interacting with Couchbase using natural language possible, went from private beta to being generally available. Capella iQ speeds up a variety of common tasks to accelerate the development cycle in natural language, including creating SQL queries to interact with data.

Here's yet another solution, this time for querying data in Oracle Autonomous Database, Oracle's cloud-based technology designed to automate many of the routine tasks required to manage Oracle databases. Called Select AI, it enables you to query your data using natural language. The important thing here is that, in contrast to third party solutions, Select AI understands your schema and generates SQL that is specific to your database, not some generic solution. It just needs the context in the form of the user’s specific tables and columns.

To produce such a runnable query, we need to anchor to a specific schema and this is where Select AI comes in. By setting up a user profile, you can by default use the local schema but you can also optionally specify the schema(s) and the table(s) you want to be considered when generating queries. In cases where these objects use esoteric names, metadata can be added to help provide a business context to tables and columns.

selectaiarchitecture

Let’s look at a few examples to understand how it works. Let's ask "How many customers in San Francisco are married?"

Using the keyword “AI”, we run the SQL command :

SELECT AI how many customers in San Francisco are married

Another one would be :

SELECT AI find the top 3 baby boomer big spenders

In cases like the second query, a database alone cannot answer such question because this information is in no way incorporated into the database. Combing the query with an LLM, can.

To “find the top 3 baby boomer big spenders” requires an understanding of what a “baby boomer” is, or more importantly, what date-of-birth years apply, and that finding the top 3 big spenders requires ordering by amount sold. The LLM draws on its broader understanding of these concepts to correctly generate an applicable query.

Select AI is not tied to a specific LLM, it is designed to be pluggable, allowing you to choose the LLM that is best for your business. Today, Select AI supports both Cohere and OpenAI models, but it’s highly likely that the list will grow over time to support models that are specific to business domains.

Select AI is invokable by any application that invokes SQL and has an AI provider account. This means using a token by say OpenAI or AzureAI etc and enabling the DBMS_CLOUD_AI package in the Autonomous Database. It's this package that enables the use of LLMs for generating SQL from natural language prompts. The package provides access to user specified LLMs along with knowledge of the user’s accessible database metadata.

The potential in Select AI and similar gen AI tools lies in slashing the cost of using complex BI and Analytical suites in licensing, supporting and maintaining, since it lets anyone to gain insights about the business without the need to understand where and how the data is stored.

 oraclelogo

More Information

Introducing Select AI - Natural Language to SQL Generation on Autonomous Database

Related Articles

Query Your Database In Natural Language With Vanna

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Amazon Updates Bedrock With Custom Model Support
07/05/2024

Amazon has updated Bedrock, its tool for building with generative AI on AWS. The update adds support for importing custom models and evaluating models, as well as support for using Meta Llama 3 models [ ... ]



One State's Quest For Digital Sovereignty
03/05/2024

The news is that the German State is moving 30,000 PCs to LibreOffice. Why is this of significance?


More News

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Monday, 22 April 2024 )