Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 981 Bytes

File metadata and controls

21 lines (14 loc) · 981 Bytes

EF Core 10 Vector Sample

This sample shows how to use the native vector functions in EF Core 10 to store and query vector data. You need to have a Azure OpenAI embedding endpoint to run this sample.

More details on vector support in EF Core 10 can be found in the Vector search in the SQL Server EF Core Provider documentation.

Create a .env file from .env.example and fill in the required values, then run the database migration to create the database tables

dotnet tool install --global dotnet-ef
dotnet build
dotnet ef database update

Run the application

dotnet run

The sample will create a database with a Blogs and Posts table and seed it with some data. It will then query the database using the vector functions to find similar blog content to a given topic.