Autonomous Database speaks “human”

September 19, 2023 | 4 minute read
Marty Gubar
Director Product Management
Text Size 100%:

Autonomous Database now speaks “human.” Select AI is a new Autonomous Database capability that is included with the service and allows you to use natural language (English, Spanish, French, Portuguese, etc.) to query data. You no longer need to understand where and how your data is stored to gain insights about your business. 

Just ask Autonomous Database a question like you would ask a coworker. Autonomous Database then manages the entire query process to produce your answer. Historically, responding to natural language questions has not been easy. We may not realize it, but we infer a lot from human language. Take this question about the popularity of movies:

Infer from language

There’s a lot to unpack in this seemingly simple question:

  • What’s a stream? Is it water flowing into an ocean? Not likely given the context of the question ;). 
  • “For each”: provide a summary for each individual movie? Not the total across all movies?
  • It’s not mentioned anywhere, but Tom Hanks is an actor. You probably want movies starring Tom Hanks. Or, movies produced by Tom Hanks? Or both?
  • We all have a natural understanding of time - so, “this month” refers to September. And, asking this question next month will return streams for October. But, what if you run this same query again in October? Which month do you expect?

Large language models (LLMs), such as those offered by OpenAI or Cohere, are remarkable at inferring intent and generating code from natural language prompts. Select AI uses LLMs to generate Oracle SQL from your natural language. The question about streamed movies produced the following result:

Select-AI Result

The result is exactly what you would expect. It required fairly complex SQL - joining multiple tables, applying time functions, summaries and conditions. And, the user was shielded from all this complexity. Of course, LLMs are not perfect (nor are the questions being asked;) )! Therefore, it is very important to verify results. Here, the LLM correctly assumed I was interested in movies starring Tom Hanks. But, I would need to rephrase the question if I were interested in Tom Hanks as both an actor and producer.

Select AI makes it easy to extend and build new natural language apps

A major design requirement for Select AI was to make it easy for developers to extend and build new natural language apps. Select AI achieved this by extending SQL. This may sound counterintuitive; isn’t SQL complicated? Not necessarily!

With Select AI, you use a standard SELECT statement followed by AI and your natural language question:

Run a Select AI query


This is not your parent's SQL! The only construct that is a holdover from classic SQL is the SELECT keyword. And, the only reason SELECT is included is because that is what SQL compilers expect. You then process the result as you would any other SQL result set. The query above was run in SQL Developer - a SQL-based tool that has zero understanding of natural language. Yet, its users can now ask natural language question! The same is true of your apps; if your app knows how to process a query, it can easily be extended to support natural language.

Easy to configure your data for natural language queries 

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 (see documentation), but it’s highly likely that the list will grow over time to support models that are specific to business domains.

In addition to selecting the LLM to use for language processing, you also specify the database objects that can be targets for SQL generation. In cases where these objects use esoteric names, we’ve made it easy to add metadata to help provide a business context to tables and columns. This will make the LLM more accurate when generating SQL.

Enough of the talk, let’s see a couple of demos!

Here is a demo of Select AI in action. You can check out our LiveLab “xyz” that steps you thru the development of these demonstrations.

The first part of the Select AI demo is called Ask Oracle. It’s built with APEX, Oracle’s premier, low code development environment. The demo is using a business scenario called Oracle MovieStream - a fictitious online movie streaming. You can ask all sorts of questions about movies, the customers that are watching them and more. Honestly, it’s pretty self-explanatory!

What’s going on behind the scenes? Check out the second part of the demo to find out. It shows more details about how to ask questions using SQL in SQL:



The progress made with generative AI models has been extraordinary. You can actually “speak human” to Autonomous Database to get your business questions answered. It makes life simpler for your business users and development teams, helps improve productivity in your organization and enhances data-driven decisions.

Want to learn more?

Marty Gubar

Director Product Management

I'm a product manager on the Autonomous Database development team.

Previous Post

Autonomous Tuesday at CloudWorld

Keith Laker | 5 min read

Next Post

Autonomous Wednesday at CloudWorld

Keith Laker | 6 min read
Everything you need to know about data warehousing with the world's leading cloud solution provider