Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 813 Bytes

File metadata and controls

21 lines (14 loc) · 813 Bytes

EF Core 9 Vector Sample

This sample shows how to use the vector functions in EF Core to store and query vector data. It is an end-to-end sample using the extension EFCore.SqlServer.VectorSearch package.

You need to have a Azure OpenAI embedding endpoint to run this sample.

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.