Skip to main content

Posts

Showing posts with the label machine learning C#

Azure AI Search with C#: Build Smart Search (2026)

Learn Azure AI Search with C# — index data, run vector and hybrid queries, and add RAG to your .NET app. Start building intelligent search today. If your application's search box still runs a LIKE '%term%' query against SQL Server, your users are quietly suffering. They type "cheap laptop for uni" and get zero results because your catalogue says "affordable notebook for students." Azure AI Search with C# fixes exactly this problem: it combines classic keyword search, vector embeddings, and semantic reranking into a single managed service that you can drive from .NET with a few dozen lines of code. In this tutorial you'll build a working search index from scratch, run keyword, vector, and hybrid queries, and finish with a Retrieval Augmented Generation (RAG) pattern that grounds an LLM in your own data. This guide targets .NET 9 and the Azure.Search.Documents v11 SDK. Every snippet is runnable. We'll explain why each design choice matter...

ML.NET Image Classification in C#: Train & Deploy a Model

Learn ML.NET image classification in C#. Train a custom image classifier with transfer learning, evaluate it, and deploy it in ASP.NET Core. Start now. ML.NET image classification lets you train a custom image classifier in pure C# without leaving the .NET ecosystem. You don't need Python, you don't need to hand-write a neural network, and you don't need a PhD. In this tutorial you'll build an image classification model in C# using transfer learning, evaluate it properly, save it, and deploy it behind an ASP.NET Core Web API. Along the way we'll cover why each step matters, the best practices that separate a demo from a production model, and the pitfalls that catch most developers the first time. What Is ML.NET Image Classification and Why Use It? ML.NET is Microsoft's open-source, cross-platform machine learning framework for .NET. Its image classification API wraps a TensorFlow-based training pipeline and exposes it through the same MLContext and IDataV...

ML.NET Tutorial: Build Your First ML Model in C#

Learn ML.NET with this step-by-step C# tutorial. Build, train, and deploy your first machine learning model in .NET with practical code examples. If you've ever wanted to add machine learning to a .NET application without leaving C#, this ML.NET tutorial is where you start. ML.NET is Microsoft's open-source, cross-platform framework that lets C# and F# developers build, train, and deploy custom machine learning models — no Python required, no context switching, just the language and ecosystem you already know. In this hands-on guide, you'll build a complete machine learning model in C# from scratch. We'll walk through real, runnable code that loads data, trains a binary classification model, evaluates its accuracy, and makes predictions — all using ML.NET in a standard .NET console application. By the end, you'll understand the ML.NET pipeline architecture, know how to pick the right algorithm for your problem, and have a working model you can integrate ...