Securing RAG Endpoints with JWT Authentication in ASP.NET Core

Because I would be deploying my RAG application along with my website, I decided to secure my embedding and chat endpoints. Yes, it is selfish but I am writing all these first for myself :). To keep things simple and local, I chose to use JWT tokens for authentication. My approach uses in-memory token generation and validation—no external dependencies or persistent storage required. This is a solid starting point, and you can always enhance it later as your needs grow. ...

May 16, 2025 · 3 min · Taner

AI-102 Study Series Exercise 2: GenAI Chat App with Azure AI Foundry SDK

Overview The exercise walks you through building a generative AI chat app using the Azure AI Foundry SDK. You deploy the gpt-4o model in the Azure AI Foundry portal and then create a client application that interacts with that model. Both Python and C# implementations are provided. Repository and Environment Setup Clone the repository and navigate to the correct folder: Python: rm -r mslearn-ai-foundry -f git clone https://github.com/microsoftlearning/mslearn-ai-studio mslearn-ai-foundry cd mslearn-ai-foundry/labfiles/chat-app/python C#: ...

May 13, 2025 · 2 min · Taner

AI-102 Study Series Exercise 1: Building a GenAI Application with Azure AI Foundry

Important Points: Deploying a Model in Azure AI Foundry: Sign in to the Azure AI Foundry portal. Search for and select the gpt-4o model. Create a project with customized settings (resource name, subscription, resource group, region). The project includes connections to Azure AI services and models. Creating a Client Application: Use Azure AI Foundry and Azure AI Model Inference SDKs to develop an application. Choose between Python or C# for development. Application Configuration: ...

May 10, 2025 · 2 min · Taner

AI Terms Simplified: A Beginner's Guide with Examples

Understanding AI can feel overwhelming with all the jargon, but it doesn’t have to be! Here’s a beginner-friendly guide to some of the most commonly used AI terms, each with a practical example: 1. Artificial Intelligence (AI) AI is a broad field of computer science focused on creating systems that can perform tasks requiring human-like intelligence, such as recognizing images, understanding speech, making decisions, and translating languages. Example: A virtual assistant like Siri or Alexa that can answer questions and control smart devices. 2. Machine Learning (ML) A subset of AI where computers learn patterns and make decisions from data. Unlike traditional programming, ML models improve their performance as they process more data. ...

May 5, 2025 · 4 min · tc

Azure AI Service Use Cases: Mapping Business Needs to the Right Service

Now studying more on Azure AI services, below is an in-depth look at how to map specific business requirements and use cases to the various Azure AI services. While the ultimate choice always depends on end-to-end needs—ranging from time-to-market and customization to scalability and regulatory constraints—here are some guiding principles: 1. Azure Cognitive Services When It Fits: Rapid Integration & Out-of-the-Box Capabilities: If your business needs to add AI capabilities quickly without developing and training custom models from scratch, Cognitive Services are ideal. They provide pre-built APIs for vision, speech, language, decision support, and more. Example use cases: ...

May 5, 2025 · 4 min · tc

Azure AI Services Overview for AI-102 Certification

I started to study for AI102 Certification. Preparing for the AI-102 certification is an excellent way to deepen understanding of Azure AI services. Here’s a breakdown of the key services that is related with exam: Azure AI Services Overview Azure Cognitive Services – These are pre-built AI models that allow developers to integrate AI capabilities into applications. They include: Vision (e.g., Computer Vision, Face API) Speech (e.g., Speech-to-Text, Text-to-Speech, Translator) Language (e.g., Text Analytics, Language Understanding) Decision (e.g., Personalizer) Search (e.g., Azure AI Search) Azure Machine Learning – A comprehensive cloud-based service that helps in building, training, and deploying ML models efficiently. Key components include: ...

May 5, 2025 · 2 min · tc

Azure AI Services: Real-World Examples and Decision Criteria

Let’s take a deeper dive into how you might choose between Azure Cognitive Services, Azure Machine Learning, and Azure Bot Services in real-world business scenarios. 1. Azure Cognitive Services When to Use It Quick Integration & Out-of-the-Box Capabilities: If your business needs an immediate boost by incorporating AI into existing applications without building models from scratch, Cognitive Services fit the bill perfectly. They offer pre-trained APIs for vision (image recognition, OCR), speech (speech-to-text, text-to-speech), language (sentiment analysis, translation), and decision making (personalizers, anomaly detectors). ...

May 5, 2025 · 5 min · tc

Building a Local RAG System: My Journey and How You Can Too

My Story: Why I Built a Local RAG System A few months ago, I found myself frustrated with the limitations and privacy concerns of cloud-based AI tools. I wanted to experiment with Retrieval-Augmented Generation (RAG) on my own terms—locally, with full control over my data and the ability to tinker under the hood. As a developer who loves open source, C#, and learning by doing, I decided to build my own local RAG system from scratch. ...

May 5, 2025 · 4 min · Taner

Building an MCP Server: Contracts and Use Cases for AI-Driven Code Quality, Documentation, and Dependency Management

Introduction The Model Context Protocol (MCP) is an emerging standard for integrating AI-driven tools into software development workflows. In this post, I’ll share how you can design contracts for an MCP server to automate code quality checks, generate API documentation, and manage dependencies—all with practical C# examples. 1. Code Quality Checker MCP Server Purpose: Integrate with static analysis tools (like SonarQube or ESLint) to automate code reviews, enforce style guidelines, and generate actionable reports. ...

May 5, 2025 · 3 min · TC

Choosing the Right Embedding Model for Your RAG Application

When building a Retrieval-Augmented Generation (RAG) application, selecting the right embedding model is crucial. After researching various models, I’ve summarized the key differences and use cases for two popular options: nomic-embed-text and all-minilm. Let’s dive in! Key Differences Between Nomic-embed-text and All-MiniLM 1. Architecture Nomic-embed-text: Optimized for handling large token context windows, making it suitable for both short and long text embeddings. All-MiniLM: Based on the MiniLM architecture, designed for sentence-level embeddings using self-supervised contrastive learning. 2. Performance Nomic-embed-text: Excels in semantic similarity tasks and produces high-quality embeddings for detailed documents. All-MiniLM: Offers faster inference speeds and is lightweight, making it ideal for real-time applications. 3. Use Cases Nomic-embed-text: Versatile and handles diverse text lengths, making it suitable for tasks like semantic search and clustering. All-MiniLM: Best for sentence-level tasks, such as paraphrase detection and short text similarity. Nomic-embed-text Use Cases Since nomic-embed-text is optimized for long text inputs and broad context windows, it’s ideal for applications requiring deep contextual understanding: ...

May 5, 2025 · 3 min · tc