EF Core 11: Vector Search Features with SQL Server
In this article we will see the EF Core 11 Vector Search Feature. Please note that, the following items come from EF Core 11. Only the first two are used directly in this application. Vector properties are not loaded by default. A SqlVector<T> property is no longer included in the SELECT list when you materialize an entity. A 1536-dimension float vector is roughly 6 KB per row, and most queries never need it back. In this app the vector is only used inside ORDER BY , so nothing extra is transferred. Exact vector distance. EF.Functions.VectorDistance(metric, vector1, vector2) , introduced in EF Core 10, keeps working and maps to the T-SQL VECTOR_DISTANCE function. This is what the application uses. Approximate vector search (experimental). EF Core 11 adds translation for the SQL Server VECTOR_SEARCH function, which runs against a DiskANN vector index. It is marked experimental on the SQL Server side, so the API may change. The application in this article does not use it...