From 953d12f34174938bb151ae96efa74eee424dc229 Mon Sep 17 00:00:00 2001 From: Minal Agashe Date: Thu, 14 Aug 2025 12:14:04 +0530 Subject: [PATCH 01/24] Added oracle-db connector information. --- .../oracledb-connector.md | 267 ++++++++++++++++++ 1 file changed, 267 insertions(+) create mode 100644 semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracledb-connector.md diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracledb-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracledb-connector.md new file mode 100644 index 00000000..42d877dd --- /dev/null +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracledb-connector.md @@ -0,0 +1,267 @@ +# Using the Oracle Database Vector Store connector (Preview) + +::: zone pivot="programming-language-csharp" + +> [!WARNING] +> The Oracle Database Vector Store functionality is in preview, and improvements that require breaking changes may still occur in limited circumstances before release. + +::: zone-end +::: zone pivot="programming-language-python" + +> [!WARNING] +> The Semantic Kernel Vector Store functionality is in preview, and improvements that require breaking changes may still occur in limited circumstances before release. + +::: zone-end +::: zone pivot="programming-language-java" + +> [!WARNING] +> The Semantic Kernel Vector Store functionality is in preview, and improvements that require breaking changes may still occur in limited circumstances before release. + +::: zone-end + +## Overview + +The Oracle Database Vector Store Connector can be used to access and manage data in Oracle Database. The connector has the following characteristics. + +::: zone pivot="programming-language-csharp" + +| Feature Area | Support | +| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Collection maps to | Oracle database table | +| Supported key property types | | +| Supported data property types | | +| Supported vector property types | | +| Supported index types | | +| Supported distance functions | | +| Supported filter clauses | | +| Supports multiple vectors in a record | Yes | +| IsIndexed supported? | Yes | +| IsFullTextSearchable supported? | No | +| StorageName supported? | Yes | +| HybridSearch supported? | No | +| Restricted at least one vector | Yes | +| Allow multiple primary keys | No | + +Vector data searches require Oracle Database 23ai. All other Oracle connector features are available using Oracle Database 19c or higher. + +::: zone-end +::: zone pivot="programming-language-python" +More information coming soon. +::: zone-end +::: zone pivot="programming-language-java" + +More information coming soon. + +::: zone-end + +::: zone pivot="programming-language-csharp" + +## Getting started + +Add the Oracle Database Vector Store connector NuGet package to your project. + +```dotnetcli +dotnet add package Oracle.VectorData --prerelease +``` + +You can add the vector store to the `IServiceCollection` dependency injection container using extension methods provided by Semantic Kernel. In this case, an instance of the `Oracle.VectorData.OracleVectorStore` class also gets registered with the container. + +```csharp +using Microsoft.SemanticKernel; +using Oracle.VectorData; +using Microsoft.Extensions.DependencyInjection; + +// Using Kernel Builder. +var builder = Kernel.CreateBuilder(); +builder.Services.AddOracleVectorStore(""); +``` + +```csharp +using Microsoft.AspNetCore.Builder; +using Oracle.VectorData; +using Microsoft.Extensions.DependencyInjection; + +// Using IServiceCollection with ASP.NET Core. +var builder = WebApplication.CreateBuilder(args); +builder.Services.AddOracleVectorStore(""); +``` + +Extension methods that take no parameters are also available. These require an instance of the `Oracle.ManagedDataAccess.Client.OracleDataSource` class to be separately registered with the dependency injection container. + +```csharp +using Microsoft.SemanticKernel; +using Oracle.VectorData; +using Microsoft.Extensions.DependencyInjection; +using Oracle.ManagedDataAccess.Client; + +// Using Kernel Builder. +var kernelBuilder = Kernel.CreateBuilder(); +builder.Services.AddSingleton(sp => +{ + OracleDataSourceBuilder dataSourceBuilder = new(""); + return dataSourceBuilder.Build(); +}); + +builder.Services.AddOracleVectorStore(); +``` + +```csharp +using Microsoft.AspNetCore.Builder; +using Oracle.VectorData; +using Microsoft.Extensions.DependencyInjection; +using Oracle.ManagedDataAccess.Client; + +// Using IServiceCollection with ASP.NET Core. +var builder = WebApplication.CreateBuilder(args); +builder.Services.AddSingleton(sp => +{ + OracleDataSourceBuilder dataSourceBuilder = new(""); + return dataSourceBuilder.Build(); +}); + +builder.Services.AddOracleVectorStore(); +``` + +You can construct an Oracle Database Vector Store instance directly with a custom data source or with a connection string. + +```csharp +using Oracle.VectorData; +using Oracle.ManagedDataAccess.Client; + +OracleDataSourceBuilder dataSourceBuilder = new(""); +var dataSource = dataSourceBuilder.Build(); + +var connection = new OracleVectorStore(dataSource); +``` + +```csharp +using Oracle.VectorData; + +var connection = new OracleVectorStore(""); +``` + +It is possible to construct a direct reference to a named collection with a custom data source or with a connection string. + +```csharp +using Oracle.VectorData; +using Oracle.ManagedDataAccess.Client; + +OracleDataSourceBuilder dataSourceBuilder = new(""); +var dataSource = dataSourceBuilder.Build(); + +var collection = new OracleCollection(dataSource, "skhotels"); +``` + +```csharp +using Oracle.VectorData; + +var collection = new OracleCollection(""); +``` + +::: zone-end + +::: zone pivot="programming-language-python" + +## Getting started + +More information coming soon. +::: zone-end +::: zone pivot="programming-language-java" + +## Getting started + +More information coming soon. +::: zone-end +::: zone pivot="programming-language-csharp" + +## Data mapping + +The Oracle Database Vector Store connector provides a default mapper when mapping data from the data model to storage. This mapper does a direct conversion of the data model properties list to the Oracle database columns to convert to the storage schema. + +The Oracle Database Vector Store connector allows the application to provide a custom mapper in combination with a `VectorStoreCollectionDefinition`. In this case, the `VectorStoreCollectionDefinition` can differ from the supplied data model. The `VectorStoreCollectionDefinition` is used to define the database schema, while the data model is used to interact with the vector store. A custom mapper is required in this case to map from the data model to the custom database schema defined by the `VectorStoreCollectionDefinition`. + +The following table shows the default primary key data type mapping between Oracle database and C#: + +| C# Data Type | Database Type | +| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| short/int16 | NUMBER(5) | +| int/int32 | NUMBER(10) | +| long/int64 | NUMBER(19) | +| string | NVARCHAR2(2000) | +| Guid | RAW(16) | + +The following table shows the default data property type mapping, including nullable types: + +| C# Data Type | Database Type | +| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| bool | BOOLEAN for Oracle Database 23ai and higher
NUMBER(1) for earlier versions | +| byte | NUMBER(3) | +| short/int16 | NUMBER(5) | +| int/int32 | NUMBER(10) | +| decimal | NUMBER(18,2) | +| long/int64 | NUMBER(19) | +| float | BINARY_FLOAT | +| double | BINARY_DOUBLE | +| DateTime | TIMESTAMP(7) | +| DateTimeOffset | TIMESTAMP(7) WITH TIME ZONE | +| TimeSpan | INTERVAL DAY(8) TO SECOND(7) | +| char | NVARCHAR2(1) | +| char[] | NVARCHAR2(2000) | +| byte[] | RAW(2000) | +| string | NVARCHAR2(2000) | +| Guid | RAW(16) | + +Starting with Oracle Database 23ai, database vectors can be mapped to .NET. data types. Multiple vector columns are supported. The following table shows the default vector property type mapping, including nullable types: + +| C# Data Type | Database Type | +| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +|
  • ReadOnlyMemory\
  • Embedding\
  • BinaryEmbedding
  • Embedding\
  • byte[]
  • System.Byte[]
  • BitArray
| VECTOR(dimensions, BINARY) | +|
  • ReadOnlyMemory\
  • ReadOnlyMemory\
  • Embedding\
  • Embedding\
  • short[]
  • System.Int16[]
| VECTOR(dimensions, INT8) | +|
  • ReadOnlyMemory\
  • ReadOnlyMemory\
  • Embedding\
  • Embedding\
  • double[]
  • System.Double[]
| VECTOR(dimensions, FLOAT64) | +|
  • ReadOnlyMemory\
  • ReadOnlyMemory\
  • Embedding\
  • Embedding\
  • float[]
  • System.Float[]
| VECTOR(dimensions, FLOAT32) | + +### Property name override + +For data properties and vector properties, you can override names to use in storage that are different from the data model property names. The property name override occurs when setting the `StorageName` option either in the data model properties or record definition. + +Here is a data model with `StorageName` set code sample and how that will be represented in an Oracle SQL command. + +```csharp +using Microsoft.Extensions.VectorData; + +public class Hotel +{ + [VectorStoreKey] + public long HotelId { get; set; } + + [VectorStoreData(StorageName = "hotel_name")] + public string? HotelName { get; set; } + + [VectorStoreData(StorageName = "hotel_description")] + public string? Description { get; set; } + + [VectorStoreVector(Dimensions: 384, DistanceFunction = DistanceFunction.CosineDistance)] + public ReadOnlyMemory? DescriptionEmbedding { get; set; } +} +``` + +```SQL +CREATE TABLE "MYSCHEMA"."Hotels" + ("HotelId" NUMBER(10), + "hotel_name" NVARCHAR2(2000), + "hotel_description" NVARCHAR2(2000), + "DescriptionEmbedding" VECTOR(384, FLOAT32), + PRIMARY KEY ( "HotelId" ) +); +``` + +## Learn More +Refer to the following Oracle Database Vector Store connector resources to learn more: +- [Documentation: Oracle Database Vector Store Connector Classes for Semantic Kernel (.NET) APIs](https://docs-uat.us.oracle.com/en/database/oracle/oracle-database/23/odpnt/oracle-database-vector-store-provider-classes-microsoft-vector-stores-and-semantic-kernel1.html) +Contains information on Oracle Database Vector Store connector classes for adding data, retrieving data, and performing vector search in the Oracle vector database. +- Sample Code: Oracle Database Vector Store Connector for Semantic Kernel (.NET) + - Coming soon +- [Documentation: Oracle Data Provider for .NET](https://docs-uat.us.oracle.com/en/database/oracle/oracle-database/23/odpnt/intro.html) +Contains information on Oracle Data Provider for .NET (ODP.NET), the ADO.NET data provider for Oracle Database Vector Store connector. + +::: zone-end From f4d981982b8bd76c2b743f1f366509eca5cbaf62 Mon Sep 17 00:00:00 2001 From: Minal Agashe Date: Thu, 14 Aug 2025 12:32:22 +0530 Subject: [PATCH 02/24] Added oracledb-connector information. --- .../vector-store-connectors/out-of-the-box-connectors/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md index 77ecf733..82430680 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md @@ -47,6 +47,7 @@ Semantic Kernel provides a number of out-of-the-box Vector Store integrations ma | Milvus | Planned | | | | [MongoDB](./mongodb-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | | [Neon Serverless Postgres](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/neon1722366567200.neon_serverless_postgres_azure_prod) |Use [Postgres Connector](./postgres-connector.md)| ✅ | Microsoft Semantic Kernel Project | +[OracleDB](./oracledb-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | [Pinecone](./pinecone-connector.md) | ✅ | ❌ | Microsoft Semantic Kernel Project | | [Postgres](./postgres-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | | [Qdrant](./qdrant-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | From e5eb9149f47a40a53e7b069766ffeebda52d8267 Mon Sep 17 00:00:00 2001 From: Minal Agashe Date: Thu, 14 Aug 2025 14:35:43 +0530 Subject: [PATCH 03/24] Updated oracledb-connector for the correct documentation links --- .../out-of-the-box-connectors/oracledb-connector.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracledb-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracledb-connector.md index 42d877dd..946b336e 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracledb-connector.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracledb-connector.md @@ -257,11 +257,11 @@ CREATE TABLE "MYSCHEMA"."Hotels" ## Learn More Refer to the following Oracle Database Vector Store connector resources to learn more: -- [Documentation: Oracle Database Vector Store Connector Classes for Semantic Kernel (.NET) APIs](https://docs-uat.us.oracle.com/en/database/oracle/oracle-database/23/odpnt/oracle-database-vector-store-provider-classes-microsoft-vector-stores-and-semantic-kernel1.html) +- [Documentation: Oracle Database Vector Store Connector Classes for Semantic Kernel (.NET) APIs](https://docs.oracle.com/en/database/oracle/oracle-database/23/odpnt/oracle-database-vector-store-connector-semantic-kernel-classes.html) Contains information on Oracle Database Vector Store connector classes for adding data, retrieving data, and performing vector search in the Oracle vector database. - Sample Code: Oracle Database Vector Store Connector for Semantic Kernel (.NET) - Coming soon -- [Documentation: Oracle Data Provider for .NET](https://docs-uat.us.oracle.com/en/database/oracle/oracle-database/23/odpnt/intro.html) +- [Documentation: Oracle Data Provider for .NET](https://docs.oracle.com/en/database/oracle/oracle-database/23/odpnt/intro.html) Contains information on Oracle Data Provider for .NET (ODP.NET), the ADO.NET data provider for Oracle Database Vector Store connector. ::: zone-end From f1e93b3c056692f1f0eb5e39af23251f58674b3f Mon Sep 17 00:00:00 2001 From: Minal Agashe Date: Sun, 17 Aug 2025 21:18:28 +0530 Subject: [PATCH 04/24] Updated oracle-connector with metadata information. --- .../{oracledb-connector.md => oracle-connector.md} | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) rename semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/{oracledb-connector.md => oracle-connector.md} (97%) diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracledb-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md similarity index 97% rename from semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracledb-connector.md rename to semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md index 946b336e..2c3be6ba 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracledb-connector.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md @@ -1,3 +1,13 @@ +--- +title: Using the Semantic Kernel Oracle Database Vector Store connector (Preview) +description: Contains information on how to use a Semantic Kernel Vector store connector to access and manipulate data in Oracle Database. +zone_pivot_groups: programming-languages +author: minal-agashe-oracle +ms.topic: conceptual +ms.author: +ms.date: 08/14/2025 +ms.service: semantic-kernel +--- # Using the Oracle Database Vector Store connector (Preview) ::: zone pivot="programming-language-csharp" @@ -39,7 +49,7 @@ The Oracle Database Vector Store Connector can be used to access and manage data | IsFullTextSearchable supported? | No | | StorageName supported? | Yes | | HybridSearch supported? | No | -| Restricted at least one vector | Yes | +| Restricted at least one vector | No | | Allow multiple primary keys | No | Vector data searches require Oracle Database 23ai. All other Oracle connector features are available using Oracle Database 19c or higher. From f53fd6ada98ed676b3f064be9882c75bf3bce2fd Mon Sep 17 00:00:00 2001 From: Minal Agashe Date: Sun, 17 Aug 2025 21:24:26 +0530 Subject: [PATCH 05/24] Updated file with the link to changed oracle-connector file. --- .../vector-store-connectors/out-of-the-box-connectors/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md index 82430680..da63d825 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md @@ -47,7 +47,7 @@ Semantic Kernel provides a number of out-of-the-box Vector Store integrations ma | Milvus | Planned | | | | [MongoDB](./mongodb-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | | [Neon Serverless Postgres](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/neon1722366567200.neon_serverless_postgres_azure_prod) |Use [Postgres Connector](./postgres-connector.md)| ✅ | Microsoft Semantic Kernel Project | -[OracleDB](./oracledb-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project +[OracleDB](./oracle-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | [Pinecone](./pinecone-connector.md) | ✅ | ❌ | Microsoft Semantic Kernel Project | | [Postgres](./postgres-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | | [Qdrant](./qdrant-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | From 474b117cb0a1a179d13e4c71901bb5e84ad9d960 Mon Sep 17 00:00:00 2001 From: Minal Agashe Date: Mon, 18 Aug 2025 11:35:04 +0530 Subject: [PATCH 06/24] Modied index.md file to remove C# oracle connector entry. --- .../vector-store-connectors/out-of-the-box-connectors/index.md | 1 - 1 file changed, 1 deletion(-) diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md index da63d825..77ecf733 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md @@ -47,7 +47,6 @@ Semantic Kernel provides a number of out-of-the-box Vector Store integrations ma | Milvus | Planned | | | | [MongoDB](./mongodb-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | | [Neon Serverless Postgres](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/neon1722366567200.neon_serverless_postgres_azure_prod) |Use [Postgres Connector](./postgres-connector.md)| ✅ | Microsoft Semantic Kernel Project | -[OracleDB](./oracle-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | [Pinecone](./pinecone-connector.md) | ✅ | ❌ | Microsoft Semantic Kernel Project | | [Postgres](./postgres-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | | [Qdrant](./qdrant-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | From f7afe13a595ab8ff78bc7e81cb42f08bb874191f Mon Sep 17 00:00:00 2001 From: Minal Agashe Date: Mon, 18 Aug 2025 14:32:30 +0530 Subject: [PATCH 07/24] Updated TOC.yml for oracle database connector entry. --- .../vector-store-connectors/out-of-the-box-connectors/TOC.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/TOC.yml b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/TOC.yml index 4822cb9d..4b6bde0f 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/TOC.yml +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/TOC.yml @@ -20,6 +20,8 @@ href: jdbc-connector.md - name: MongoDB connector href: mongodb-connector.md +- name: Oracle Database connector + href: oracle-connector.md - name: Pinecone connector href: pinecone-connector.md - name: Postgres connector From f625c1d687cec0d661d63ca735009349ab1894c2 Mon Sep 17 00:00:00 2001 From: Minal Agashe Date: Wed, 20 Aug 2025 11:23:29 +0530 Subject: [PATCH 08/24] Updated oracle-connector .md file for ms author. --- .../out-of-the-box-connectors/oracle-connector.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md index 2c3be6ba..b3b218aa 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md @@ -4,7 +4,7 @@ description: Contains information on how to use a Semantic Kernel Vector store c zone_pivot_groups: programming-languages author: minal-agashe-oracle ms.topic: conceptual -ms.author: +ms.author: westey ms.date: 08/14/2025 ms.service: semantic-kernel --- From b236df21180f6e3d0d246bb7c24a61b02871ac3e Mon Sep 17 00:00:00 2001 From: Minal Agashe Date: Wed, 20 Aug 2025 11:49:20 +0530 Subject: [PATCH 09/24] Updated oracle-connector.md for adding an important highlight. --- .../out-of-the-box-connectors/oracle-connector.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md index b3b218aa..c06423c9 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md @@ -52,7 +52,8 @@ The Oracle Database Vector Store Connector can be used to access and manage data | Restricted at least one vector | No | | Allow multiple primary keys | No | -Vector data searches require Oracle Database 23ai. All other Oracle connector features are available using Oracle Database 19c or higher. +> [!IMPORTANT] +> Vector data searches require Oracle Database 23ai. All other Oracle connector features are available using Oracle Database 19c or higher. ::: zone-end ::: zone pivot="programming-language-python" From e61bb767fa3c387ec08efe41b7c2fd6693884dc8 Mon Sep 17 00:00:00 2001 From: Minal Agashe Date: Thu, 21 Aug 2025 11:55:33 +0530 Subject: [PATCH 10/24] Updated these two files based on the reviewer feedback. --- .../out-of-the-box-connectors/index.md | 3 +++ .../out-of-the-box-connectors/oracle-connector.md | 9 ++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md index 77ecf733..237416f9 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md @@ -47,6 +47,7 @@ Semantic Kernel provides a number of out-of-the-box Vector Store integrations ma | Milvus | Planned | | | | [MongoDB](./mongodb-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | | [Neon Serverless Postgres](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/neon1722366567200.neon_serverless_postgres_azure_prod) |Use [Postgres Connector](./postgres-connector.md)| ✅ | Microsoft Semantic Kernel Project | +| [Oracle](./oracle-connector.md) | ✅ | ✅ | Oracle | | [Pinecone](./pinecone-connector.md) | ✅ | ❌ | Microsoft Semantic Kernel Project | | [Postgres](./postgres-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | | [Qdrant](./qdrant-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | @@ -70,6 +71,7 @@ Semantic Kernel provides a number of out-of-the-box Vector Store integrations ma | [In-Memory](./inmemory-connector.md) | ✅ | N/A | Microsoft Semantic Kernel Project | | [MongoDB](./mongodb-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | | [Neon Serverless Postgres](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/neon1722366567200.neon_serverless_postgres_azure_prod) |Use [Postgres Connector](./postgres-connector.md)| ✅ | Microsoft Semantic Kernel Project | +| [Oracle](./oracle-connector.md) | Planned | | Oracle | | [Pinecone](./pinecone-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | | [Postgres](./postgres-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | | [Qdrant](./qdrant-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | @@ -87,6 +89,7 @@ Semantic Kernel provides a number of out-of-the-box Vector Store integrations ma | HSQLDB | Use [JDBC](./jdbc-connector.md) | ✅ | Microsoft Semantic Kernel Project | | [JDBC](./jdbc-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | | MySQL | Use [JDBC](./jdbc-connector.md) | ✅ | Microsoft Semantic Kernel Project | +| [Oracle](./oracle-connector.md) | ✅ | ✅ | Oracle | | Postgres | Use [JDBC](./jdbc-connector.md) | | Microsoft Semantic Kernel Project | | [Redis](./redis-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | | SQLite | Use [JDBC](./jdbc-connector.md) | ✅ | Microsoft Semantic Kernel Project | diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md index c06423c9..19007bd8 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md @@ -43,14 +43,13 @@ The Oracle Database Vector Store Connector can be used to access and manage data | Supported vector property types |
  • ReadOnlyMemory\
  • Embedding\
  • float[]
  • ReadOnlyMemory\
  • Embedding\
  • double[]
  • ReadOnlyMemory\
  • Embedding\
  • short[]
  • ReadOnlyMemory\
  • Embedding\
  • byte[]
  • BitArray
  • BinaryEmbedding
| | Supported index types |
  • Flat (default)
  • HNSW
  • IVF
| | Supported distance functions |
  • CosineDistance
    • FLOAT32, FLOAT64, and INT8 vector default
  • CosineSimilarity
  • DotProductSimilarity
  • NegativeDotProductSimilarity
  • EuclideanDistance
  • EuclideanSquaredDistance
  • HammingDistance
    • BINARY vector default
  • ManhattanDistance
  • JaccardSimilarity
| -| Supported filter clauses |
  • ==
  • !=
  • <
  • <=
  • >
  • >=
  • List.Contains()
    • Only when checking for the model property is in the list
| -| Supports multiple vectors in a record | Yes | +| Supported filter clauses |
  • ==
  • !=
  • <
  • <=
  • >
  • >=
  • List.Contains()
    • Only when checking if the model property is in the list
| +| Supports zero, one, or multiple vectors in a record | Yes | | IsIndexed supported? | Yes | | IsFullTextSearchable supported? | No | | StorageName supported? | Yes | | HybridSearch supported? | No | -| Restricted at least one vector | No | -| Allow multiple primary keys | No | + > [!IMPORTANT] > Vector data searches require Oracle Database 23ai. All other Oracle connector features are available using Oracle Database 19c or higher. @@ -166,7 +165,7 @@ var collection = new OracleCollection(dataSource, "skhotels"); ```csharp using Oracle.VectorData; -var collection = new OracleCollection(""); +var collection = new OracleCollection("", "skhotels"); ``` ::: zone-end From 0bd30e5711448d7b4fe2b81cb01bf3358e17d9d4 Mon Sep 17 00:00:00 2001 From: Minal Agashe Date: Fri, 22 Aug 2025 11:56:08 +0530 Subject: [PATCH 11/24] Updated oracle-connector.md file for modifying custom mapping content. --- .../out-of-the-box-connectors/oracle-connector.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md index 19007bd8..8069d23f 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md @@ -188,7 +188,7 @@ More information coming soon. The Oracle Database Vector Store connector provides a default mapper when mapping data from the data model to storage. This mapper does a direct conversion of the data model properties list to the Oracle database columns to convert to the storage schema. -The Oracle Database Vector Store connector allows the application to provide a custom mapper in combination with a `VectorStoreCollectionDefinition`. In this case, the `VectorStoreCollectionDefinition` can differ from the supplied data model. The `VectorStoreCollectionDefinition` is used to define the database schema, while the data model is used to interact with the vector store. A custom mapper is required in this case to map from the data model to the custom database schema defined by the `VectorStoreCollectionDefinition`. +The Oracle Database Vector Store connector supports data model annotations and record definitions.Using annotations, the information can be provided to the data model for creating indexes and database column mapping. Using [record definitions](https://learn.microsoft.com/en-us/semantic-kernel/concepts/vector-store-connectors/schema-with-record-definition?pivots=programming-language-csharp), the information can be defined and supplied separately from the data model. The following table shows the default primary key data type mapping between Oracle database and C#: From 2a0ba776c6db4f9a112546203a497dfe85767082 Mon Sep 17 00:00:00 2001 From: Minal Agashe Date: Fri, 22 Aug 2025 12:10:59 +0530 Subject: [PATCH 12/24] As per the MS git validation warning added relative path of record definition in the oracle-connector md file. --- .../out-of-the-box-connectors/oracle-connector.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md index 8069d23f..7d940808 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md @@ -188,7 +188,7 @@ More information coming soon. The Oracle Database Vector Store connector provides a default mapper when mapping data from the data model to storage. This mapper does a direct conversion of the data model properties list to the Oracle database columns to convert to the storage schema. -The Oracle Database Vector Store connector supports data model annotations and record definitions.Using annotations, the information can be provided to the data model for creating indexes and database column mapping. Using [record definitions](https://learn.microsoft.com/en-us/semantic-kernel/concepts/vector-store-connectors/schema-with-record-definition?pivots=programming-language-csharp), the information can be defined and supplied separately from the data model. +The Oracle Database Vector Store connector supports data model annotations and record definitions.Using annotations, the information can be provided to the data model for creating indexes and database column mapping. Using [record definitions](../schema-with-record-definition.md), the information can be defined and supplied separately from the data model. The following table shows the default primary key data type mapping between Oracle database and C#: From f289898c3f47f39886f4d7022bf018a3185846a0 Mon Sep 17 00:00:00 2001 From: Minal Agashe Date: Fri, 5 Sep 2025 11:54:02 +0530 Subject: [PATCH 13/24] Updated oracle-connector file for Oracle Java connector information. --- .../oracle-connector.md | 138 +++++++++++++++++- 1 file changed, 132 insertions(+), 6 deletions(-) diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md index 7d940808..3e249dcd 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md @@ -50,7 +50,6 @@ The Oracle Database Vector Store Connector can be used to access and manage data | StorageName supported? | Yes | | HybridSearch supported? | No | - > [!IMPORTANT] > Vector data searches require Oracle Database 23ai. All other Oracle connector features are available using Oracle Database 19c or higher. @@ -60,7 +59,20 @@ More information coming soon. ::: zone-end ::: zone pivot="programming-language-java" -More information coming soon. +| Feature Area | Support | +| ------------- |:-------------:| +|Supported filter clauses|
  • AnyTagEqualTo
  • EqualTo
| +|Collection maps to|SQL database table| +|Supported key property types|
  • short/Short
  • int/Integer
  • long/Long
  • String
  • UUID
| +|Supported data property types|
  • byte/Byte
  • short/Short
  • int/Integer
  • long/Long
  • float/Float
  • double/Double
  • decimal/Decimal
  • DateTime
  • OffsetDataTime
  • Timestamp
  • String
  • UUID
  • List
| +|Supported vector property types|
  • String
  • Collection
  • List
  • Float[]
  • float[]
| +|Supported index types|
  • HNSW
  • IVF
| +|Supported distance functions|
  • DOT_PRODUCT
  • COSINE_SIMILARITY
  • COSINE_DISTANCE
  • EUCLIDEAN_DISTANCE
| +|Supports multiple vectors in a record|Yes| +|IsIndexed support?|Yes| +|IsFullTextSearchable supported?| No| +|StoragePropertyName supported?|No, use `@JsonProperty` instead| +|HybridSearch supported?|No| ::: zone-end @@ -180,13 +192,77 @@ More information coming soon. ## Getting started -More information coming soon. +Set up Oracle Database Vector Store connector. + +```java +// Copyright (c) Microsoft. All rights reserved. +package com.microsoft.semantickernel.samples.syntaxexamples.memory; + +import com.microsoft.semantickernel.data.jdbc.JDBCVectorStore; +import com.microsoft.semantickernel.data.jdbc.JDBCVectorStoreOptions; +import com.microsoft.semantickernel.data.jdbc.JDBCVectorStoreRecordCollection; +import com.microsoft.semantickernel.data.jdbc.JDBCVectorStoreRecordCollectionOptions; +import com.microsoft.semantickernel.data.jdbc.oracle.OracleVectorStoreQueryProvider; +import com.microsoft.semantickernel.data.vectorstorage.VectorStoreRecordCollection; +import com.microsoft.semantickernel.samples.documentationexamples.data.index.Hotel; +import java.sql.SQLException; +import java.util.Collections; +import oracle.jdbc.datasource.impl.OracleDataSource; + +public class VectorStoreWithOracle { + + public static void main(String[] args) throws SQLException { + System.out.println("=============================================================="); + System.out.println("============== Oracle Vector Store Example ==================="); + System.out.println("=============================================================="); + + // Configure the data source + OracleDataSource dataSource = new OracleDataSource(); + dataSource.setURL("jdbc:oracle:thin:@localhost:1521/FREEPDB1"); + dataSource.setUser("scott"); + dataSource.setPassword("tiger"); + + // Build a query provider + OracleVectorStoreQueryProvider queryProvider = OracleVectorStoreQueryProvider.builder() + .withDataSource(dataSource) + .build(); + + // Build a vector store + JDBCVectorStore vectorStore = JDBCVectorStore.builder() + .withDataSource(dataSource) + .withOptions(JDBCVectorStoreOptions.builder() + .withQueryProvider(queryProvider) + .build()) + .build(); + + // Get a collection from the vector store + VectorStoreRecordCollection collection = vectorStore.getCollection( + "skhotels", + JDBCVectorStoreRecordCollectionOptions.builder() + .withRecordClass(Hotel.class) + .build()); + + // Create the collection if it doesn't exist yet. + collection.createCollectionAsync().block(); + + collection.upsertAsync(new Hotel("1", + "HotelOne", + "Desc for HotelOne", + Collections.emptyList(), Collections.emptyList()), + null) + .block(); + + } + +} +``` + ::: zone-end ::: zone pivot="programming-language-csharp" ## Data mapping -The Oracle Database Vector Store connector provides a default mapper when mapping data from the data model to storage. This mapper does a direct conversion of the data model properties list to the Oracle database columns to convert to the storage schema. +The Oracle Database Vector Store connector provides a default mapper when mapping data from the data model to storage. This mapper does a direct conversion of the data model properties list to the Oracle database columns to convert to the storage schema. The Oracle Database Vector Store connector supports data model annotations and record definitions.Using annotations, the information can be provided to the data model for creating indexes and database column mapping. Using [record definitions](../schema-with-record-definition.md), the information can be defined and supplied separately from the data model. @@ -266,12 +342,62 @@ CREATE TABLE "MYSCHEMA"."Hotels" ``` ## Learn More + Refer to the following Oracle Database Vector Store connector resources to learn more: + - [Documentation: Oracle Database Vector Store Connector Classes for Semantic Kernel (.NET) APIs](https://docs.oracle.com/en/database/oracle/oracle-database/23/odpnt/oracle-database-vector-store-connector-semantic-kernel-classes.html) Contains information on Oracle Database Vector Store connector classes for adding data, retrieving data, and performing vector search in the Oracle vector database. -- Sample Code: Oracle Database Vector Store Connector for Semantic Kernel (.NET) - - Coming soon +- Sample Code: Oracle Database Vector Store Connector for Semantic Kernel (.NET) + - Coming soon - [Documentation: Oracle Data Provider for .NET](https://docs.oracle.com/en/database/oracle/oracle-database/23/odpnt/intro.html) Contains information on Oracle Data Provider for .NET (ODP.NET), the ADO.NET data provider for Oracle Database Vector Store connector. ::: zone-end +::: zone pivot="programming-language-java" + +## Data mapping + +The Oracle Database Vector Store connector provides a default mapper when mapping data from the data model to storage. This mapper does a direct conversion of the data model properties list to the Oracle database columns to convert to the storage schema. + +The Oracle Database Vector Store connector supports data model annotations and record definitions.Using annotations, the information can be provided to the data model for creating indexes and database column mapping. Using [record definitions](../schema-with-record-definition.md), the information can be defined and supplied separately from the data model. + +The following table shows the default primary key data type mapping between Oracle database and Java, along with the corresponding methods to retrieve data from a `ResultSet`: + +| Java Type | Database Type | ResultSet Getter Method | +| ------------- |:-------------:| -----:| +| byte/Byte | NUMBER(3) | `resultSet.getByte(name)`| +| short/Short | NUMBER(5) |`resultSet.getShort(name)`| +|int/Integer | NUMBER(10) |`resultSet.getInt(name)`| +|long/Long |NUMBER(19) |`resultSet.getLong(name)`| +|String |NVARCHAR2(2000)|`resultSet.getString(name)`| +|UUID |RAW(16) | `resultSet.getObject(name, java_type)`| + +The following table shows the default data property type mapping along with the corresponding methods to retrieve data from a `ResultSet`: + +| Java Type | Database Type | ResultSet Getter Method | +| ------------- |:-------------:| -----:| +| boolean | BOOLEAN | `resultSet.getByte(name)`| +|byte/Byte |NUMBER(3)|`resultSet.getByte(name)`| +|byte[] |RAW(2000)|`resultSet.getBytes(name)`| +|short/Short |NUMBER(5)|`resultSet.getShort(name)`| +|int/Integer |NUMBER(10)|`resultSet.getInt(name)`| +|long/Long |NUMBER(19)|`resultSet.getLong(name)`| +|float/Float |BINARY_FLOAT|`resultSet.getFloat(name)`| +|double/Double|BINARY_DOUBLE|`resultSet.getDouble(name)`| +|BigDecimal |NUMBER(18,2)|`resultSet.getBigDecimal(name)`| +|OffsetDateTime|TIMESTAMP(7) WITH TIME ZONE|`resultSet.getTIMESTAMPTZ(name).offsetDateTimeValue()`| +|String |CLOB/NVARCHAR2(%s)|`resultSet.getString(name)`| +|UUID |RAW(16) |`resultSet.getObject(name, java_type)`| +|List |JSON |`resultSet.getObject(name, java_type)` Using `ojdbc-extensions-jackson-oson`| + + Starting with Oracle Database 23ai, database vectors can be mapped to Java data types. Multiple vector columns are supported. The following table shows the default vector property type mapping: + +| Java Type | Database Type +| ------------- |:-------------:| +| String | VECTOR(%d, FLOAT32) | +|Collection|VECTOR(%d, FLOAT32) | +|List |VECTOR(%d, FLOAT32) | +|Float[] |VECTOR(%d, FLOAT32) | +|float[] |VECTOR(%d, FLOAT32) | + +::: zone-end From c71512c171d5c64c43d163092da350abcb89f361 Mon Sep 17 00:00:00 2001 From: Minal Agashe Date: Fri, 5 Sep 2025 12:58:24 +0530 Subject: [PATCH 14/24] Updated oracle connector page for Java connector information. --- .../out-of-the-box-connectors/oracle-connector.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md index 3e249dcd..ca6f3efe 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md @@ -51,7 +51,7 @@ The Oracle Database Vector Store Connector can be used to access and manage data | HybridSearch supported? | No | > [!IMPORTANT] -> Vector data searches require Oracle Database 23ai. All other Oracle connector features are available using Oracle Database 19c or higher. +> Vector data searches require Oracle Database 23ai or higher. All other Oracle connector features are available using Oracle Database 19c or higher. ::: zone-end ::: zone pivot="programming-language-python" @@ -344,6 +344,8 @@ CREATE TABLE "MYSCHEMA"."Hotels" ## Learn More Refer to the following Oracle Database Vector Store connector resources to learn more: +- [Introducing the Oracle Database Vector Store Connector for Semantic Kernel](https://medium.com/oracledevs/announcing-the-oracle-database-vector-store-connector-for-semantic-kernel-adb83e806d4e) +Describes key connector features, classes, and guides the reader through a sample AI vector search application using the connector. - [Documentation: Oracle Database Vector Store Connector Classes for Semantic Kernel (.NET) APIs](https://docs.oracle.com/en/database/oracle/oracle-database/23/odpnt/oracle-database-vector-store-connector-semantic-kernel-classes.html) Contains information on Oracle Database Vector Store connector classes for adding data, retrieving data, and performing vector search in the Oracle vector database. From e6dfb0fe53f506d8c812f9b105cf01bdea3deb2c Mon Sep 17 00:00:00 2001 From: Minal Agashe Date: Fri, 5 Sep 2025 13:10:20 +0530 Subject: [PATCH 15/24] Fixed typo --- .../out-of-the-box-connectors/oracle-connector.md | 1 + 1 file changed, 1 insertion(+) diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md index ca6f3efe..c77f6f2f 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md @@ -344,6 +344,7 @@ CREATE TABLE "MYSCHEMA"."Hotels" ## Learn More Refer to the following Oracle Database Vector Store connector resources to learn more: + - [Introducing the Oracle Database Vector Store Connector for Semantic Kernel](https://medium.com/oracledevs/announcing-the-oracle-database-vector-store-connector-for-semantic-kernel-adb83e806d4e) Describes key connector features, classes, and guides the reader through a sample AI vector search application using the connector. From 5fc0b97c63366658c95ea813bf5063e68a07b84a Mon Sep 17 00:00:00 2001 From: Minal Agashe Date: Fri, 5 Sep 2025 13:23:50 +0530 Subject: [PATCH 16/24] updated oracle connector page to fix the validation errors. --- .../oracle-connector.md | 29 ------------------- 1 file changed, 29 deletions(-) diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md index e5143841..c77f6f2f 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md @@ -50,14 +50,8 @@ The Oracle Database Vector Store Connector can be used to access and manage data | StorageName supported? | Yes | | HybridSearch supported? | No | -<<<<<<< HEAD > [!IMPORTANT] > Vector data searches require Oracle Database 23ai or higher. All other Oracle connector features are available using Oracle Database 19c or higher. -======= - -> [!IMPORTANT] -> Vector data searches require Oracle Database 23ai. All other Oracle connector features are available using Oracle Database 19c or higher. ->>>>>>> upstream/main ::: zone-end ::: zone pivot="programming-language-python" @@ -65,7 +59,6 @@ More information coming soon. ::: zone-end ::: zone pivot="programming-language-java" -<<<<<<< HEAD | Feature Area | Support | | ------------- |:-------------:| |Supported filter clauses|
  • AnyTagEqualTo
  • EqualTo
| @@ -80,9 +73,6 @@ More information coming soon. |IsFullTextSearchable supported?| No| |StoragePropertyName supported?|No, use `@JsonProperty` instead| |HybridSearch supported?|No| -======= -More information coming soon. ->>>>>>> upstream/main ::: zone-end @@ -202,7 +192,6 @@ More information coming soon. ## Getting started -<<<<<<< HEAD Set up Oracle Database Vector Store connector. ```java @@ -268,19 +257,12 @@ public class VectorStoreWithOracle { } ``` -======= -More information coming soon. ->>>>>>> upstream/main ::: zone-end ::: zone pivot="programming-language-csharp" ## Data mapping -<<<<<<< HEAD The Oracle Database Vector Store connector provides a default mapper when mapping data from the data model to storage. This mapper does a direct conversion of the data model properties list to the Oracle database columns to convert to the storage schema. -======= -The Oracle Database Vector Store connector provides a default mapper when mapping data from the data model to storage. This mapper does a direct conversion of the data model properties list to the Oracle database columns to convert to the storage schema. ->>>>>>> upstream/main The Oracle Database Vector Store connector supports data model annotations and record definitions.Using annotations, the information can be provided to the data model for creating indexes and database column mapping. Using [record definitions](../schema-with-record-definition.md), the information can be defined and supplied separately from the data model. @@ -360,7 +342,6 @@ CREATE TABLE "MYSCHEMA"."Hotels" ``` ## Learn More -<<<<<<< HEAD Refer to the following Oracle Database Vector Store connector resources to learn more: @@ -371,18 +352,10 @@ Describes key connector features, classes, and guides the reader through a sampl Contains information on Oracle Database Vector Store connector classes for adding data, retrieving data, and performing vector search in the Oracle vector database. - Sample Code: Oracle Database Vector Store Connector for Semantic Kernel (.NET) - Coming soon -======= -Refer to the following Oracle Database Vector Store connector resources to learn more: -- [Documentation: Oracle Database Vector Store Connector Classes for Semantic Kernel (.NET) APIs](https://docs.oracle.com/en/database/oracle/oracle-database/23/odpnt/oracle-database-vector-store-connector-semantic-kernel-classes.html) -Contains information on Oracle Database Vector Store connector classes for adding data, retrieving data, and performing vector search in the Oracle vector database. -- Sample Code: Oracle Database Vector Store Connector for Semantic Kernel (.NET) - - Coming soon ->>>>>>> upstream/main - [Documentation: Oracle Data Provider for .NET](https://docs.oracle.com/en/database/oracle/oracle-database/23/odpnt/intro.html) Contains information on Oracle Data Provider for .NET (ODP.NET), the ADO.NET data provider for Oracle Database Vector Store connector. ::: zone-end -<<<<<<< HEAD ::: zone pivot="programming-language-java" ## Data mapping @@ -431,5 +404,3 @@ The following table shows the default data property type mapping along with the |float[] |VECTOR(%d, FLOAT32) | ::: zone-end -======= ->>>>>>> upstream/main From 14a379bc00ce0232cd3857dff10b81ec91bfc07b Mon Sep 17 00:00:00 2001 From: Minal Agashe Date: Fri, 5 Sep 2025 14:21:44 +0530 Subject: [PATCH 17/24] Fixed validation errors in oracle connector page. --- .../out-of-the-box-connectors/oracle-connector.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md index c77f6f2f..968ffa3e 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md @@ -64,8 +64,8 @@ More information coming soon. |Supported filter clauses|
  • AnyTagEqualTo
  • EqualTo
| |Collection maps to|SQL database table| |Supported key property types|
  • short/Short
  • int/Integer
  • long/Long
  • String
  • UUID
| -|Supported data property types|
  • byte/Byte
  • short/Short
  • int/Integer
  • long/Long
  • float/Float
  • double/Double
  • decimal/Decimal
  • DateTime
  • OffsetDataTime
  • Timestamp
  • String
  • UUID
  • List
| -|Supported vector property types|
  • String
  • Collection
  • List
  • Float[]
  • float[]
| +|Supported data property types|
  • byte/Byte
  • short/Short
  • int/Integer
  • long/Long
  • float/Float
  • double/Double
  • decimal/Decimal
  • DateTime
  • OffsetDataTime
  • Timestamp
  • String
  • UUID
  • List(of all above types)
| +|Supported vector property types|
  • String
  • Collection``
  • List``
  • Float[]
  • float[]
| |Supported index types|
  • HNSW
  • IVF
| |Supported distance functions|
  • DOT_PRODUCT
  • COSINE_SIMILARITY
  • COSINE_DISTANCE
  • EUCLIDEAN_DISTANCE
| |Supports multiple vectors in a record|Yes| @@ -391,15 +391,15 @@ The following table shows the default data property type mapping along with the |OffsetDateTime|TIMESTAMP(7) WITH TIME ZONE|`resultSet.getTIMESTAMPTZ(name).offsetDateTimeValue()`| |String |CLOB/NVARCHAR2(%s)|`resultSet.getString(name)`| |UUID |RAW(16) |`resultSet.getObject(name, java_type)`| -|List |JSON |`resultSet.getObject(name, java_type)` Using `ojdbc-extensions-jackson-oson`| +|List`` |JSON |`resultSet.getObject(name, java_type)` Using `ojdbc-extensions-jackson-oson`| Starting with Oracle Database 23ai, database vectors can be mapped to Java data types. Multiple vector columns are supported. The following table shows the default vector property type mapping: | Java Type | Database Type | ------------- |:-------------:| | String | VECTOR(%d, FLOAT32) | -|Collection|VECTOR(%d, FLOAT32) | -|List |VECTOR(%d, FLOAT32) | +|Collection``|VECTOR(%d, FLOAT32) | +|List`` |VECTOR(%d, FLOAT32) | |Float[] |VECTOR(%d, FLOAT32) | |float[] |VECTOR(%d, FLOAT32) | From 7a2b8aace61fa6e4a87cc51e1ed2bb9560a52db3 Mon Sep 17 00:00:00 2001 From: Minal-Agashe-Oracle Date: Fri, 5 Sep 2025 15:44:40 +0530 Subject: [PATCH 18/24] Update oracle-connector.md --- .../out-of-the-box-connectors/oracle-connector.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md index 968ffa3e..b5512b30 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md @@ -64,7 +64,7 @@ More information coming soon. |Supported filter clauses|
  • AnyTagEqualTo
  • EqualTo
| |Collection maps to|SQL database table| |Supported key property types|
  • short/Short
  • int/Integer
  • long/Long
  • String
  • UUID
| -|Supported data property types|
  • byte/Byte
  • short/Short
  • int/Integer
  • long/Long
  • float/Float
  • double/Double
  • decimal/Decimal
  • DateTime
  • OffsetDataTime
  • Timestamp
  • String
  • UUID
  • List(of all above types)
| +|Supported data property types|
  • byte/Byte
  • short/Short
  • int/Integer
  • long/Long
  • float/Float
  • double/Double
  • decimal/Decimal
  • DateTime
  • OffsetDataTime
  • Timestamp
  • String
  • UUID
  • List``
| |Supported vector property types|
  • String
  • Collection``
  • List``
  • Float[]
  • float[]
| |Supported index types|
  • HNSW
  • IVF
| |Supported distance functions|
  • DOT_PRODUCT
  • COSINE_SIMILARITY
  • COSINE_DISTANCE
  • EUCLIDEAN_DISTANCE
| From 02488fd2f396227399e95da8a4905df699bf076c Mon Sep 17 00:00:00 2001 From: Alex Keh Date: Fri, 5 Sep 2025 08:01:32 -0700 Subject: [PATCH 19/24] Update .NET info in oracle-connector.md --- .../out-of-the-box-connectors/oracle-connector.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md index b5512b30..765420f1 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md @@ -347,11 +347,8 @@ Refer to the following Oracle Database Vector Store connector resources to learn - [Introducing the Oracle Database Vector Store Connector for Semantic Kernel](https://medium.com/oracledevs/announcing-the-oracle-database-vector-store-connector-for-semantic-kernel-adb83e806d4e) Describes key connector features, classes, and guides the reader through a sample AI vector search application using the connector. - -- [Documentation: Oracle Database Vector Store Connector Classes for Semantic Kernel (.NET) APIs](https://docs.oracle.com/en/database/oracle/oracle-database/23/odpnt/oracle-database-vector-store-connector-semantic-kernel-classes.html) +- [Documentation: Oracle Database Vector Store Connector Classes for Semantic Kernel (.NET) APIs](https://docs.oracle.com/en/database/oracle/oracle-database/23/odpnt/VSConnector4SKClasses.html) Contains information on Oracle Database Vector Store connector classes for adding data, retrieving data, and performing vector search in the Oracle vector database. -- Sample Code: Oracle Database Vector Store Connector for Semantic Kernel (.NET) - - Coming soon - [Documentation: Oracle Data Provider for .NET](https://docs.oracle.com/en/database/oracle/oracle-database/23/odpnt/intro.html) Contains information on Oracle Data Provider for .NET (ODP.NET), the ADO.NET data provider for Oracle Database Vector Store connector. From 5e270525dcfb727250279f78feb7518e4400b279 Mon Sep 17 00:00:00 2001 From: Minal Agashe Date: Thu, 11 Sep 2025 19:46:35 +0530 Subject: [PATCH 20/24] Update oracle-connector.md for formatting Java support table. --- .../out-of-the-box-connectors/oracle-connector.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md index 765420f1..034fa1bd 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md @@ -60,7 +60,7 @@ More information coming soon. ::: zone pivot="programming-language-java" | Feature Area | Support | -| ------------- |:-------------:| +| ------------- |-------------| |Supported filter clauses|
  • AnyTagEqualTo
  • EqualTo
| |Collection maps to|SQL database table| |Supported key property types|
  • short/Short
  • int/Integer
  • long/Long
  • String
  • UUID
| From e8d7f42943b3d1bade1643b8b520b1b026caeb9e Mon Sep 17 00:00:00 2001 From: Minal Agashe Date: Fri, 12 Sep 2025 15:43:52 +0530 Subject: [PATCH 21/24] Updated oracle connector page for additinal information on using Jaccard similarity in C# connector. Also, updated the table formatting for Java connector. --- .../out-of-the-box-connectors/oracle-connector.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md index 034fa1bd..70667272 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md @@ -42,7 +42,7 @@ The Oracle Database Vector Store Connector can be used to access and manage data | Supported data property types |
  • bool
  • byte
  • short
  • int
  • decimal
  • long
  • float
  • double
  • DateTime
  • DateTimeOffset
  • TimeSpan
  • char
  • char[]
  • byte[]
  • String
  • Guid
  • *and nullable type of the above types*
| | Supported vector property types |
  • ReadOnlyMemory\
  • Embedding\
  • float[]
  • ReadOnlyMemory\
  • Embedding\
  • double[]
  • ReadOnlyMemory\
  • Embedding\
  • short[]
  • ReadOnlyMemory\
  • Embedding\
  • byte[]
  • BitArray
  • BinaryEmbedding
| | Supported index types |
  • Flat (default)
  • HNSW
  • IVF
| -| Supported distance functions |
  • CosineDistance
    • FLOAT32, FLOAT64, and INT8 vector default
  • CosineSimilarity
  • DotProductSimilarity
  • NegativeDotProductSimilarity
  • EuclideanDistance
  • EuclideanSquaredDistance
  • HammingDistance
    • BINARY vector default
  • ManhattanDistance
  • JaccardSimilarity
| +| Supported distance functions |
  • CosineDistance
    • FLOAT32, FLOAT64, and INT8 vector default
  • CosineSimilarity
  • DotProductSimilarity
  • NegativeDotProductSimilarity
  • EuclideanDistance
  • EuclideanSquaredDistance
  • HammingDistance
    • BINARY vector default
  • ManhattanDistance
  • JaccardSimilarity
    To use Jaccard similarity, set the DistanceFunction string to `JACCARD` or `JACCARDSIMILARITY` (for example, DistanceFunction = `JACCARDSIMILARITY`). This value is case sensitive. Jaccard similarity requires BINARY numeric format vectors.
| | Supported filter clauses |
  • ==
  • !=
  • <
  • <=
  • >
  • >=
  • List.Contains()
    • Only when checking if the model property is in the list
| | Supports zero, one, or multiple vectors in a record | Yes | | IsIndexed supported? | Yes | @@ -266,7 +266,7 @@ The Oracle Database Vector Store connector provides a default mapper when mappin The Oracle Database Vector Store connector supports data model annotations and record definitions.Using annotations, the information can be provided to the data model for creating indexes and database column mapping. Using [record definitions](../schema-with-record-definition.md), the information can be defined and supplied separately from the data model. -The following table shows the default primary key data type mapping between Oracle database and C#: +The following table shows the default primary key data type mapping between Oracle Database and C#: | C# Data Type | Database Type | | ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -361,10 +361,10 @@ The Oracle Database Vector Store connector provides a default mapper when mappin The Oracle Database Vector Store connector supports data model annotations and record definitions.Using annotations, the information can be provided to the data model for creating indexes and database column mapping. Using [record definitions](../schema-with-record-definition.md), the information can be defined and supplied separately from the data model. -The following table shows the default primary key data type mapping between Oracle database and Java, along with the corresponding methods to retrieve data from a `ResultSet`: +The following table shows the default primary key data type mapping between Oracle Database and Java, along with the corresponding methods to retrieve data from a `ResultSet`: | Java Type | Database Type | ResultSet Getter Method | -| ------------- |:-------------:| -----:| +| ------------- |-------------| -----| | byte/Byte | NUMBER(3) | `resultSet.getByte(name)`| | short/Short | NUMBER(5) |`resultSet.getShort(name)`| |int/Integer | NUMBER(10) |`resultSet.getInt(name)`| @@ -375,7 +375,7 @@ The following table shows the default primary key data type mapping between Orac The following table shows the default data property type mapping along with the corresponding methods to retrieve data from a `ResultSet`: | Java Type | Database Type | ResultSet Getter Method | -| ------------- |:-------------:| -----:| +| ------------- |-------------| -----| | boolean | BOOLEAN | `resultSet.getByte(name)`| |byte/Byte |NUMBER(3)|`resultSet.getByte(name)`| |byte[] |RAW(2000)|`resultSet.getBytes(name)`| @@ -392,8 +392,8 @@ The following table shows the default data property type mapping along with the Starting with Oracle Database 23ai, database vectors can be mapped to Java data types. Multiple vector columns are supported. The following table shows the default vector property type mapping: -| Java Type | Database Type -| ------------- |:-------------:| +| Java Type | Database Type| +| ------------- |-------------| | String | VECTOR(%d, FLOAT32) | |Collection``|VECTOR(%d, FLOAT32) | |List`` |VECTOR(%d, FLOAT32) | From 9631732314e1b1ed90904f531810b9ce9f4a8f9a Mon Sep 17 00:00:00 2001 From: Alex Keh Date: Fri, 12 Sep 2025 09:06:16 -0700 Subject: [PATCH 22/24] Change single quotes to double quotes Changed single quotes to double quotes to ensure correct C# syntax is used, --- .../out-of-the-box-connectors/oracle-connector.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md index 70667272..fef76af3 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md @@ -42,7 +42,7 @@ The Oracle Database Vector Store Connector can be used to access and manage data | Supported data property types |
  • bool
  • byte
  • short
  • int
  • decimal
  • long
  • float
  • double
  • DateTime
  • DateTimeOffset
  • TimeSpan
  • char
  • char[]
  • byte[]
  • String
  • Guid
  • *and nullable type of the above types*
| | Supported vector property types |
  • ReadOnlyMemory\
  • Embedding\
  • float[]
  • ReadOnlyMemory\
  • Embedding\
  • double[]
  • ReadOnlyMemory\
  • Embedding\
  • short[]
  • ReadOnlyMemory\
  • Embedding\
  • byte[]
  • BitArray
  • BinaryEmbedding
| | Supported index types |
  • Flat (default)
  • HNSW
  • IVF
| -| Supported distance functions |
  • CosineDistance
    • FLOAT32, FLOAT64, and INT8 vector default
  • CosineSimilarity
  • DotProductSimilarity
  • NegativeDotProductSimilarity
  • EuclideanDistance
  • EuclideanSquaredDistance
  • HammingDistance
    • BINARY vector default
  • ManhattanDistance
  • JaccardSimilarity
    To use Jaccard similarity, set the DistanceFunction string to `JACCARD` or `JACCARDSIMILARITY` (for example, DistanceFunction = `JACCARDSIMILARITY`). This value is case sensitive. Jaccard similarity requires BINARY numeric format vectors.
| +| Supported distance functions |
  • CosineDistance
    • FLOAT32, FLOAT64, and INT8 vector default
  • CosineSimilarity
  • DotProductSimilarity
  • NegativeDotProductSimilarity
  • EuclideanDistance
  • EuclideanSquaredDistance
  • HammingDistance
    • BINARY vector default
  • ManhattanDistance
  • JaccardSimilarity
    To use Jaccard similarity, set the DistanceFunction string to "JACCARD" or "JACCARDSIMILARITY" (for example, DistanceFunction = "JACCARDSIMILARITY"). This value is case sensitive. Jaccard similarity requires BINARY numeric format vectors.
| | Supported filter clauses |
  • ==
  • !=
  • <
  • <=
  • >
  • >=
  • List.Contains()
    • Only when checking if the model property is in the list
| | Supports zero, one, or multiple vectors in a record | Yes | | IsIndexed supported? | Yes | From 33ddabf70fc44e793553549ebd79a3e74cd9c2c1 Mon Sep 17 00:00:00 2001 From: Priyanka Nair Date: Thu, 27 Nov 2025 16:13:42 +0530 Subject: [PATCH 23/24] Updated Oracledb Connector for Python --- .../out-of-the-box-connectors/index.md | 2 +- .../oracle-connector.md | 165 +++++++++++++++--- 2 files changed, 137 insertions(+), 30 deletions(-) diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md index 237416f9..9b292d2a 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md @@ -71,7 +71,7 @@ Semantic Kernel provides a number of out-of-the-box Vector Store integrations ma | [In-Memory](./inmemory-connector.md) | ✅ | N/A | Microsoft Semantic Kernel Project | | [MongoDB](./mongodb-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | | [Neon Serverless Postgres](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/neon1722366567200.neon_serverless_postgres_azure_prod) |Use [Postgres Connector](./postgres-connector.md)| ✅ | Microsoft Semantic Kernel Project | -| [Oracle](./oracle-connector.md) | Planned | | Oracle | +| [Oracle](./oracle-connector.md) | ✅ | ✅ | Oracle | | [Pinecone](./pinecone-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | | [Postgres](./postgres-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | | [Qdrant](./qdrant-connector.md) | ✅ | ✅ | Microsoft Semantic Kernel Project | diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md index fef76af3..67f32dae 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md @@ -55,7 +55,25 @@ The Oracle Database Vector Store Connector can be used to access and manage data ::: zone-end ::: zone pivot="programming-language-python" -More information coming soon. + + Feature Area | Support | +|---------------|----------| +| Collection maps to | An Oracle Database table | +| Supported key property types |
  • str
  • int
  • uuid.UUID
| +| Supported data property types |
  • str
  • int
  • long
  • float
  • bool
  • decimal
  • byte
  • bytes
  • uuid.UUID
  • datetime.date
  • datetime.datetime
  • datetime.timedelta
  • list[str]
  • dict[str, Any]
  • list[dict[str, Any]]
| +| Supported vector property types |
  • list[float]
  • numpy array
| +| Supported index types |
  • HNSW
  • IVF
| +| Supported distance functions |
  • COSINE_DISTANCE
  • EUCLIDEAN_DISTANCE
  • EUCLIDEAN_SQUARED_DISTANCE
  • DOT_PROD
  • HAMMING
  • MANHATTAN
  • DEFAULT
| +| Supported filter clauses | Python lambdas with comparisons, boolean operators, string methods (startswith, endswith), between, and datetime, translated to SQL with bind variables | +| IsIndexed supported? | Yes | +| IsFullTextSearchable supported? | No | +| StoragePropertyName supported? | Yes | +| HybridSearch supported? | No | + +> [!IMPORTANT] +> Vector data searches require Oracle Database 23ai or later. All other Oracle connector features are available using Oracle Database 19c or later. +> Also, python-oracledb 3.3 or later is required. + ::: zone-end ::: zone pivot="programming-language-java" @@ -92,7 +110,7 @@ You can add the vector store to the `IServiceCollection` dependency injection co using Microsoft.SemanticKernel; using Oracle.VectorData; using Microsoft.Extensions.DependencyInjection; - + // Using Kernel Builder. var builder = Kernel.CreateBuilder(); builder.Services.AddOracleVectorStore(""); @@ -102,7 +120,7 @@ builder.Services.AddOracleVectorStore(""); using Microsoft.AspNetCore.Builder; using Oracle.VectorData; using Microsoft.Extensions.DependencyInjection; - + // Using IServiceCollection with ASP.NET Core. var builder = WebApplication.CreateBuilder(args); builder.Services.AddOracleVectorStore(""); @@ -115,15 +133,15 @@ using Microsoft.SemanticKernel; using Oracle.VectorData; using Microsoft.Extensions.DependencyInjection; using Oracle.ManagedDataAccess.Client; - + // Using Kernel Builder. var kernelBuilder = Kernel.CreateBuilder(); builder.Services.AddSingleton(sp => { - OracleDataSourceBuilder dataSourceBuilder = new(""); + OracleDataSourceBuilder dataSourceBuilder = new(""); return dataSourceBuilder.Build(); }); - + builder.Services.AddOracleVectorStore(); ``` @@ -132,15 +150,15 @@ using Microsoft.AspNetCore.Builder; using Oracle.VectorData; using Microsoft.Extensions.DependencyInjection; using Oracle.ManagedDataAccess.Client; - + // Using IServiceCollection with ASP.NET Core. var builder = WebApplication.CreateBuilder(args); builder.Services.AddSingleton(sp => { - OracleDataSourceBuilder dataSourceBuilder = new(""); + OracleDataSourceBuilder dataSourceBuilder = new(""); return dataSourceBuilder.Build(); }); - + builder.Services.AddOracleVectorStore(); ``` @@ -149,16 +167,16 @@ You can construct an Oracle Database Vector Store instance directly with a custo ```csharp using Oracle.VectorData; using Oracle.ManagedDataAccess.Client; - + OracleDataSourceBuilder dataSourceBuilder = new(""); var dataSource = dataSourceBuilder.Build(); - + var connection = new OracleVectorStore(dataSource); ``` ```csharp using Oracle.VectorData; - + var connection = new OracleVectorStore(""); ``` @@ -167,16 +185,16 @@ It is possible to construct a direct reference to a named collection with a cust ```csharp using Oracle.VectorData; using Oracle.ManagedDataAccess.Client; - + OracleDataSourceBuilder dataSourceBuilder = new(""); var dataSource = dataSourceBuilder.Build(); - + var collection = new OracleCollection(dataSource, "skhotels"); ``` ```csharp using Oracle.VectorData; - + var collection = new OracleCollection("", "skhotels"); ``` @@ -186,7 +204,50 @@ var collection = new OracleCollection("", "skh ## Getting started -More information coming soon. +Install python-oracledb: + +```cli +pip install python-oracledb +``` + +Install semantic kernel: + +```cli +pip install semantic-kernel +``` + +Import the OracleSettings, OracleStore, and OracleCollection classes. + +```python +from semantic_kernel.connectors.oracle import OracleSettings, OracleStore, OracleCollection +``` + +The OracleSettings class holds the configuration required to create an asynchronous connection to Oracle Database. The OracleStore class is used to store and retrieve data, while the OracleCollection class manages and searches records within a collection. Use these classes to set up the Oracle Vector Store. + +```python +# Read the environment settings +oracle_settings = OracleSettings() + +# Create a connection pool +pool = await oracle_settings.create_connection_pool( + wallet_location=, + wallet_password=) + +# Create an Oracle Vector Store +store = OracleStore( + connection_pool=pool, +) + +# Get a collection +collection = await store.get_collection( + record_type=HotelSample, + collection_name=Hotel, + embedding_generator=text_embedding) + +# Create a collection if it does not exist +await collection.ensure_collection_exists() +``` + ::: zone-end ::: zone pivot="programming-language-java" @@ -314,18 +375,18 @@ Here is a data model with `StorageName` set code sample and how that will be rep ```csharp using Microsoft.Extensions.VectorData; - + public class Hotel { [VectorStoreKey] public long HotelId { get; set; } - + [VectorStoreData(StorageName = "hotel_name")] public string? HotelName { get; set; } - + [VectorStoreData(StorageName = "hotel_description")] public string? Description { get; set; } - + [VectorStoreVector(Dimensions: 384, DistanceFunction = DistanceFunction.CosineDistance)] public ReadOnlyMemory? DescriptionEmbedding { get; set; } } @@ -345,13 +406,59 @@ CREATE TABLE "MYSCHEMA"."Hotels" Refer to the following Oracle Database Vector Store connector resources to learn more: -- [Introducing the Oracle Database Vector Store Connector for Semantic Kernel](https://medium.com/oracledevs/announcing-the-oracle-database-vector-store-connector-for-semantic-kernel-adb83e806d4e) +- [Introducing the Oracle Database Vector Store Connector for Semantic Kernel](https://medium.com/oracledevs/announcing-the-oracle-database-vector-store-connector-for-semantic-kernel-adb83e806d4e) Describes key connector features, classes, and guides the reader through a sample AI vector search application using the connector. -- [Documentation: Oracle Database Vector Store Connector Classes for Semantic Kernel (.NET) APIs](https://docs.oracle.com/en/database/oracle/oracle-database/23/odpnt/VSConnector4SKClasses.html) -Contains information on Oracle Database Vector Store connector classes for adding data, retrieving data, and performing vector search in the Oracle vector database. -- [Documentation: Oracle Data Provider for .NET](https://docs.oracle.com/en/database/oracle/oracle-database/23/odpnt/intro.html) +- [Documentation: Oracle Database Vector Store Connector Classes for Semantic Kernel (.NET) APIs](https://docs.oracle.com/en/database/oracle/oracle-database/23/odpnt/VSConnector4SKClasses.html) +Contains information on Oracle Database Vector Store connector classes for adding data, retrieving data, and performing vector search in the Oracle vector database. +- [Documentation: Oracle Data Provider for .NET](https://docs.oracle.com/en/database/oracle/oracle-database/23/odpnt/intro.html) Contains information on Oracle Data Provider for .NET (ODP.NET), the ADO.NET data provider for Oracle Database Vector Store connector. +::: zone-end +::: zone pivot="programming-language-python" + +## Data Mapping + +The Oracle Database Vector Store connector provides a default mapper when mapping from the data model to storage. This mapper does a direct conversion of the list of properties on the data model to the Oracle Database columns to convert to the storage schema. + +The Oracle Database Vector Store connector supports data model annotations and record definitions. Using annotations, the information can be provided to the data model for creating indexes and database column mapping. Using [record definitions](../schema-with-record-definition.md), the information can be defined and supplied separately from the data model. + +The following table shows the default primary key data type mapping between Oracle Database and Python: + +| Python Type | Oracle SQL Type | +|---------------------------|-----------------| +| str | VARCHAR(n), Using str(n) in the type option sets the Oracle VARCHAR length to n. If n is not specified, the default length is 4000. | +| int | NUMBER(10) | +| byte | NUMBER(3) | +| long | NUMBER(19) | +| decimal | NUMBER | +| float | BINARY_FLOAT | +| double | BINARY_DOUBLE | +| bool | BOOLEAN | +| UUID | RAW(16) | +| date | DATE | +| datetime.datetime | TIMESTAMP | +| datetime.timedelta | INTERVAL DAY TO SECOND | +| clob | CLOB, can be specified explicitly, not a native Python type | +| blob | BLOB, can be specified explicitly, not a native Python type | +| list[str], dict[str, Any] | JSON | +| list[dict[str, Any]] | JSON | +| bytes | RAW(2000) | + +Starting with Oracle Database 23ai, database vectors can be mapped to Python data types. Multiple vector columns are supported. The following table shows the default vector property type mapping: + +| Python Type | Database Type | +|-------------|----------------| +| uint8 | BINARY | +| int8 | INT8 | +| float | FLOAT64 | +| float32 | FLOAT32 | +| float64 | FLOAT64 | +| binary | BINARY | + +## Learn More +Refer to the following resources to learn more: +- [Documentation: python-oracledb](https://python-oracledb.readthedocs.io/en/latest/index.html) + ::: zone-end ::: zone pivot="programming-language-java" @@ -394,10 +501,10 @@ The following table shows the default data property type mapping along with the | Java Type | Database Type| | ------------- |-------------| -| String | VECTOR(%d, FLOAT32) | -|Collection``|VECTOR(%d, FLOAT32) | -|List`` |VECTOR(%d, FLOAT32) | -|Float[] |VECTOR(%d, FLOAT32) | -|float[] |VECTOR(%d, FLOAT32) | +| String | VECTOR(%d, FLOAT32) | +|Collection``|VECTOR(%d, FLOAT32) | +|List`` |VECTOR(%d, FLOAT32) | +|Float[] |VECTOR(%d, FLOAT32) | +|float[] |VECTOR(%d, FLOAT32) | ::: zone-end From 3b7e5987d69adeeabcdcc6c46e4e590d7492f2d3 Mon Sep 17 00:00:00 2001 From: Priyanka Nair Date: Thu, 27 Nov 2025 17:57:19 +0530 Subject: [PATCH 24/24] Change ms.topic to article based on suggestion --- .../vector-store-connectors/out-of-the-box-connectors/index.md | 2 +- .../out-of-the-box-connectors/oracle-connector.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md index 9b292d2a..226a18cd 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/index.md @@ -3,7 +3,7 @@ title: Out-of-the-box Vector Store connectors (Preview) description: Out-of-the-box Vector Store connectors zone_pivot_groups: programming-languages author: westey-m -ms.topic: conceptual +ms.topic: article ms.author: westey ms.date: 07/08/2024 ms.service: semantic-kernel diff --git a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md index 67f32dae..da907a57 100644 --- a/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md +++ b/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/oracle-connector.md @@ -3,7 +3,7 @@ title: Using the Semantic Kernel Oracle Database Vector Store connector (Preview description: Contains information on how to use a Semantic Kernel Vector store connector to access and manipulate data in Oracle Database. zone_pivot_groups: programming-languages author: minal-agashe-oracle -ms.topic: conceptual +ms.topic: article ms.author: westey ms.date: 08/14/2025 ms.service: semantic-kernel