Vector Data Type

Vector Data Type

This feature provides a built-in VECTOR data type that enables vector similarity searches within the database. 

With a built-in VECTOR data type, you can run AI-powered vector similarity searches within the database instead of having to move business data to a separate vector database. Avoiding data movement reduces complexity, improves security, and enables searches on current data. You also can run far more powerful searches with Oracle AI Vector Search by combining sophisticated business data searches with AI vector similarity search using simple, intuitive SQL and the full power of the converged database - JSON, Graph, Text, Spatial, Relational and Vector - all within a single query.

View Documentation

AI Vector Search: SQL Execution

AI Vector Search SQL Execution adds SQL execution support for vector indexes built on vector columns inside the database. In addition, it provides support for SQL Functions related to the vector type and allow for row level restriction capabilities in SQL queries for partitions.

This feature allows you to more easily build with the vector data type, enabling the rapid development of AI-driven applications.

View Documentation

Sparse Vectors

Sparse Vectors are vectors that typically have large number of dimensions, but only a few dimensions have non-zero values. These vectors are often produced by sparse encoding models such as SPLADE and BM25. Conceptually, each dimension in a sparse vector represents a keyword from a specific vocabulary. For a given document, the non-zero dimension values in the vector correspond to the keywords (and their variations) that appear in that document.

Sparse vectors, such as those generated by models like SPLADE and BM25, often outperform dense vectors from models such as BERT, in terms of keyword sensitivity and effectiveness in out-of-domain searches. This superior performance is especially valuable in applications where precise keyword matching is crucial, like in legal or academic research. Additionally, sparse vectors are often used for Hybrid Vector Search, where they can be used alongside dense vectors to combine semantic searches and keyword searches, and provide more relevant search results.

View Documentation

AI Vector Search: Arithmetic and Aggregate Operations

Just as you can add (+), subtract (-), or multiply (*) dates, timestamps, intervals, and numbers, you can now apply these arithmetic operators to vectors. The arithmetic operation is performed at each dimensional element of the vectors. It's also possible to calculate the SUM or AVG of a set of vectors.

Arithmetic operations on vectors allow AI systems to manipulate and combine abstract concepts, which enhances their ability to understand and process language or data in more sophisticated ways.

View Documentation

AI Vector Search: Optimizer

This functionality adds support to the Optimizer to use indexes built on the new Vector data type rather than doing full table scans.

The support for vector indexes being used by the Optimizer allows for efficient computation of vector queries enabling developers to build the next generation of AI-powered solutions. 

View Documentation

AI Vector Search: PL/SQL

This functionality adds a new vector type to the PL/SQL type system, along with a set of vector operations useful for performing similarity searches on sets of vectors.

Support for the new vector data type in PL/SQL opens up new possibilities for  developers to build robust and efficient AI-driven applications.

View Documentation

BINARY Vector Dimension Format

BINARY is a new dimension format that can be used with the VECTOR data type. Each dimension of a BINARY vector can be represented with a single bit (0 or 1). A BINARY vector itself is represented as a packed UINT8 array, for example, a single UINT8 value represents 8 dimensions of the BINARY vector. BINARY vectors can be generated using embedding models provided by Cohere (for example, embed v3), Hugging Face Sentence Transformers, and so on.

BINARY vectors offer two key benefits compared to FLOAT32 vectors:

  1. The storage footprint of BINARY vectors is 32X lesser, and
  2. Distance computations on BINARY vectors can be up to 40X faster, which accelerates Vector Search

BINARY vectors can provided reduced accuracy compared to FLOAT32 vectors. But, evaluations on various datasets have shown that they can still achieve 90% or higher accuracy of FLOAT32 vectors.

View Documentation

Client Support for SPARSE Vectors

Sparse vectors are now supported by JDBC and OPD.NET client drivers.

Sparse vectors are vectors that typically have a large number of dimensions, but only a few of those dimensions have non-zero values. Because sparse vectors only store non-zero values, their use can improve efficiency and save storage space. ODP.NET and JDBC now supports sparse vector types enabling efficient interaction with sparse vector data through these client drivers. 
 

View Documentation

JDBC Support for Vector Data Type

This feature adds the necessary components to the JDBC drivers to support the AI Vector Search data type including SQLType, DatabaseMetaData, ResultSetMetaData and ParameterMetaData, VectorMetaData, Java to SQL Conversions with PreparedStatement and CallableStatement, SQL to Java Conversions with CallableStatement, SQL to Java Conversions with CallableStatment and ResultSet, and VECTOR Datum class.

JDBC Support for the Vector data type enables developers to build robust, scalable, and high-performance Java applications with Artificial Intelligence focus. 

View Documentation

Oracle Call Interface Support for Vector Type

Oracle Call Interface (OCI) now supports Vector data type. Applications that use OCI can now take advantage of the new Vector data type in the Oracle AI Database.

This feature ensures that you can leverage the full capabilities of the Oracle AI Database through OCI-based applications to create the next generation of AI-powered solutions.

View Documentation

PL/SQL BINARY Vector Support

PL/SQL supports BINARY as a new dimension format for the vector type, in line with SQL.

BINARY vectors are frequently used to represent whether some entity, such as a textual document, does or does not include certain features, list words, or terms. The advantages of the BINARY format are two-fold. The storage footprint of vectors can be reduced 32X compared to the default FLOAT32 vectors and distance computations on BINARY vectors are up to 40X faster.

Support for BINARY vectors means that PL/SQL is able to handle a binary vector in the same way that it supports a vector of any other dimension format.

View Documentation

Set COMPATIBLE to 23.6.0 to Enable New AI Vector Search Features in 26ai

The new AI Vector Search features are available in Oracle AI Database 26ai, Release Update 23.6 or later, provided the COMPATIBLE parameter is set to 23.6.

Regarding the COMPATIBLE parameter:

  1. New customers installing Oracle AI Database 26ai, Release Update 23.6 directly:
    • A fresh installation of Release Update 23.6 and using db create comes with the COMPATIBLE parameter set to 23.6.0 by default.
    • Post installation, you will be unable to downgrade COMPATIBLE parameter to a lower value later.
  2. Customers on Oracle AI Database 26ai, Release Update 23.4 and 23.5:
    • Before patching, the COMPATIBLE parameter can be 23.0.0 or 23.4.0 or 23.5.0.
    • When you patch to Release Update 23.6, to access the new AI Vector Search features, you must manually set the COMPATIBLE parameter to 23.6.0.
    • Note: In Release Update 23.6. updating the COMPATIBLE parameter requires downtime. It is not automatically done as part of patching. You must choose to update the database COMPATIBLE setting.
  3. Customers on Oracle Database 19c or 21c:
    • When you upgrade the database to Oracle AI Database 26ai, the COMPATIBLE parameter remains as previously set in the source database.
    • If you want to use the new AI Vector Search features, you must manually set the COMPATIBLE parameter to 23.6.0.
    • Note: The minimum COMPATIBLE setting permitted for upgrading to 26ai is 19.0.0. In other words, you cannot upgrade directly from Oracle Database 12c or 18c to Oracle AI Database 26ai.

View Documentation

Sharding Support for AI Vector Search

With Globally Distributed Database support for Vector Search, tables containing vectors are automatically distributed and replicated across a pool of Oracle databases that share no hardware. Similarity searches are automatically parallelized across shards or directed to a specific shard if the sharding key is provided.

Globally Distributed Database AI Vector Search offers several benefits, including greater scalability by allowing vectors to be distributed across multiple machines, improved performance by parallelizing vector searches across shards, and improved data resilience because if one shard goes down, the other shards can continue to operate. It also allows vector search to be deployed as part of a distributed database, where a single logical database is distributed over multiple geographies.

View Documentation

Sparse Vector Support in PL/SQL

Sparse vectors are now supported in PL/SQL.

Sparse vectors are vectors that typically have a large number of dimensions, but only a few of those dimensions have non-zero values. Because sparse vectors only store non-zero values, their use can improve efficiency and save storage space. Native support in PL/SQL allows sparse vectors to be created and used directly from within PL/SQL.

View Documentation

Support of Vector Data Type in JSON Type (OSON)

This functionality extends the standard JSON scalar types, to include the new Vector data type. It is fully supported by all Oracle JSON constructs, and a vector scalar JSON value is convertible to/from a JSON array of numbers.

Embedding vector values in JSON-type data is important for interoperability between SQL values and JSON values. For example, a table with a VECTOR column can be exposed in JSON data without a loss of data-type information allowing developers to create the next generation of AI applications.

View Documentation

User-Defined Vector Distance Functions

AI vector search supports custom, user-defined distance metrics. Proprietary and/or domain-specific distance metrics can be used in addition to the standard built-in distance metrics.

Vector search operations are often based on standard distance metrics such as Euclidean, Cosine, and Dot Product. However, there are situations where domain-specific or proprietary metrics may be required. User-defined vector distance functions allow users to create their own custom metrics using JavaScript functions.

View Documentation

Vector Data Type Support in External Tables

Vector data stored outside the database (on a file system or cloud object store) can be easily accessed to perform similarity searches using external tables.

Vector embeddings created outside the database can be loaded quickly and easily using an external table and standard SQL. It is also possible to run similarity searches on vector embeddings stored outside the database and seamlessly combine those searches with data that is stored inside the database.

View Documentation