Posts

.NET 11: Vectoring and Clustering Documents using EF Core 11 and ML.NET

Image
In this article we will build a small ASP.NET Core 11 MVC application that groups loan documents by itself. We can upload .txt files. The app turns each file into a vector, stores it in SQL Server 2025 through EF Core 11, groups all stored files with ML.NET K-Means, and shows one table per group. The groups are not set up in advance, and you never pick the number of groups. Please Note Than: All documents used in this article are synthetic. Do not load real customer or loan documents into this demo. The application is a learning project and has not been through a security review.

EF Core 11: Vector Search Features with SQL Server

Image
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...

ML.NET: Sentiment Analysis with Binary Classification

Image
In this article, we will build an ASP.NET Core 10 MVC application that finds out whether a statement typed by the user is Positive or Negative . The training data comes from a SQL Server table, the model is built with ML.NET using binary classification, and the application keeps working correctly when new rows are inserted in the table while it is running. We will go step by step. First we create the database and the table. Then we create the MVC project, add the packages and write the classes one by one. After each piece of code, we will see what the code is doing. At the end we will look closely at how the application handles new rows in the table, including the Refresh model now button that has a 2 minute timer and posts to the server by itself when nobody clicks it. Figure 1: The architecture of the application. The request path is on top and the training path is below it. What is ML.NET? ML.NET is an open source and cross platform machine learning framework from Micros...