Natural language queries to Oracle Autonomous Database? Yes—with Select AI

Oracle's innovative Select AI uses natural language processing to make it easy and intuitive to interact with your Autonomous Database, no SQL needed.

John Foley | June 06, 2024

For businesspeople, the thought of querying a database with the same language we use to talk to one another has long been a pipe dream. In reality, extracting information from a database involved an interim step—using structured query language, or SQL. The problem: Most of us don’t know how to write a SQL command. So, instead, we turn to IT and get in line, just like back when we’d hand a deck of punch cards to the white-coated mainframe gurus and wait a day to get results.

That’s not a knock against SQL, which is so widely used by data scientists and database programmers that it’s sometimes referred to as the lingua franca of databases. But let’s face it, for non-data scientists, using SQL isn’t nearly as easy as asking generative AI a question.

Now, however, database access can be just that effortless.

An innovative new capability in Oracle Autonomous Database, called Select AI, offers a powerful way to query databases using natural language. Select AI does this by working in conjunction with popular large language models (LLMs), including those within Oracle Cloud Infrastructure (OCI) Generative AI, which today comprises the Cohere and Llama-2 models.

Select AI uses these LLMs to translate a natural language question into a SQL query that the database understands. The breakthrough is that, because LLMs have been trained to infer user intent, they can often interpret a casual or colloquial query and return the answer or content you’re looking for. As we’ve seen, LLMs aren’t always 100% accurate, but they’re improving with each update.

Select AI, introduced in September 2023, brings this intuitive user experience to Oracle Autonomous Database. In fact, it’s able to scour your entire data estate, including other data sources, object stores, and data lakes, to find the answer to a query.

Now, Select AI has a new capability that “remembers” the questions each individual has asked. It makes that chat history available to the LLM so the model can use previous context in responding to follow-up questions. This means that people can pose a series of iterative questions—once again, in natural language—to dig deeper for insights.

Oracle refers to this game-changing capability as a database conversation. “I’m literally having a conversation with my data,” an Oracle product manager told me during a demo of Select AI.

What’s most remarkable is that non-experts can do it, too.

Database queries with voice commands

Select AI’s big advantage is ease of use and implementation. It’s multilingual, responding to questions in the languages used by global businesses. And you can generate queries using voice commands, much like the way we use virtual assistants on mobile devices to get information. In other words, you can access data in Oracle Autonomous Database using natural language commands from an iPhone app or other device and get verbal responses, too.

Select AI works with any SQL application, including Oracle Fusion and other software-as-a-service apps. You don’t need to know or specify where relevant data is stored to get answers or insights.

 Select AI can be a boon to business users, transforming database queries from a specialized skill to a data-at-everyone’s-fingertips capability.

Here’s how it works: The standard way to compose a SQL query is with a “select” statement. Select AI, a variant of this programming technique, uses the LLM to convert natural language into SQL. The resulting SQL statement then goes to the Oracle Autonomous Database for data retrieval, assuming the user has the appropriate credentials to access that data.

To put this into broader context, Select AI works within the data layer of the emerging AI technology stack. Oracle is rapidly delivering AI capabilities up and down the tech stack—from cloud infrastructure to data, AI services, and apps.

Select AI can help tap into LLMs as well as the OCI Generative AI service, which includes models from Meta and Cohere that are hosted on OCI. In this way, Oracle customers can augment popular LLMs with their own data to create models tailored to their business that have strong data governance and security . Custom models trained on a customer's data can only be used by that customer.

This customized, blended approach is where the real value and differentiation can happen in AI deployment for many organizations.

“With ChatGPT, everyone sees how AI can use data from the internet,” says George Lumpkin, Oracle VP of product management. “But what really matters is your data.”

Another Oracle technology that makes it possible to augment LLMs with business data is AI Vector Search, a new capability in Oracle Database 23ai. AI Vector Search enables similarity queries on text, documents, images, and other unstructured data represented as vectors.

For more, see my article, “5 advantages of using an integrated vector database for AI development.”

Chat interface and productivity tool

Select AI can be a boon to business users, transforming database queries from a specialized skill to a data-at-everyone’s-fingertips capability.

It can also be a fast and efficient way for developers to build AI-enabled applications, even if they aren’t SQL-savvy. Select AI can bridge that gap for coders and non-technical users alike. I think of it this way: Select AI is a chat interface for business users and a productivity tool for developers. In both cases, the revolutionary power of generative AI—its ability to infer meaning and converse in natural language—is a quantum leap ahead for database access.

As someone who has been covering database and data warehouse technologies since the 1990s, I’m excited by Select AI’s ability to open the database to more users. I’ve long believed that the full potential of business intelligence will be realized only when data access is faster, easier, and more intuitive—without the technical hurdles.

Oracle is moving ahead quickly. Select AI is already generally available in Oracle Autonomous Database—it’s built in and ready to use. Other database vendors are sure to follow. After all, the benefits of using generative AI for access are too obvious to ignore.

Ease and elegance of implementation will count for a lot as CIOs and CTOs decide how to proceed with AI development. Oracle Autonomous Database is widely recognized as the industry’s first and only self-healing, self-securing, self-managing database. Now it’s intuitive and conversational, too.

View more Oracle Connect articles