
Explore artificial intelligence fundamentals and practical building blocks like LLMs, prompts, tools, and agents in .NET, and build a basic chatbot that remembers previous interactions.
Define artificial intelligence and its data-driven machine learning approach, and explain how APIs from major providers enable smart features like transcription, translation, sentiment analysis, and image recognition.
Discover generative artificial intelligence, Gen-AI, and how models learn patterns to create text, images, and code. Learn to adapt tasks via prompts and integrate Gen-AI into .NET apps.
Understand how large language models process text into tokens, guided by prompts and context, producing probabilistic responses via APIs. Design effective prompts and manage temperature to build robust .NET applications.
Explore the roles of prompts, system prompts, and tool calling in real-world llm applications, defining immediate instructions, consistent behavior, and data-driven actions through function calls.
Structure LLM conversations by assigning roles—developer, user, and assistant—to clarify prompts, guide model behavior, and generate coherent responses, while tracking message history to maintain context.
Chatbots are reactive conversational interfaces, while agents plan, execute multi-step tasks, and use tools and memory to achieve goals autonomously.
Generative AI has limitations such as hallucinations, cost, and latency. Validate information with databases or tool calls, and balance quality, cost, and performance, including streaming or faster models.
Build a simple console chatbot in .NET that uses AI with OpenAI, includes streaming text, and demonstrates context-aware responses.
Build a console app, obtain an OpenAI API key, install the OpenAI SDK via NuGet, and use a chat client to query a model like GPT 5.4 nano for testing.
Protect secrets in .NET by using a configuration provider and environment variables, moving the OpenAI key out of source code and loading it from a .env file.
Learn how to add conversation history to a chat bot by passing the full list of user and assistant chat messages to the AI, giving it context for coherent responses.
Explore how system prompts shape model behavior in .NET and other languages, preventing markdown formatting and enforcing plain text responses through practical examples.
Explore streaming the response to display model text as it arrives, improving perceived speed, while coding for continuous updates, history handling, and using a string builder to preserve context.
This lecture demonstrates building a Claude-based chatbot in .NET using Anthropic Cloth, including installing the SDK, configuring API keys, selecting Haiku, streaming responses, and comparing with OpenAI implementations.
Explore communicating with models via APIs by sending HTTP POST requests without SDKs. Send JSON payloads with system prompts, user prompts, reasoning, and responses using a C# HTTP client.
Explore the fundamentals of artificial intelligence, including learning, reasoning, pattern recognition, and decision making, and examine generative artificial intelligence, large language models, prompts, system prompts, message rules, hallucination, and chatbots.
Design applications with Microsoft Extensions AI to stay model-agnostic, avoiding hard dependencies on a single AI, so you can switch from OpenAI to cloud or Gemini without rewriting business logic.
Design systems with provider abstraction to decouple AI models from specific providers using Microsoft Extensions AI, enabling seamless provider switches and consistent interactions across OpenAI, Anthropic, and Google.
Identify duplication in chatbot implementations across chatbot-openai and chatbot-cloud, and replace repeated logic with an abstraction using Microsoft Extensions AI to reuse code and swap providers like Gemini.
Organize the project and install Microsoft extensions ai to enable a unified iChatClient abstraction that swaps between OpenAI, Anthropic, and other models, using chat messages, roles, and streaming responses.
Create a chatbot that accepts an iChatClient, wire it into a reusable run method, and leverage OpenAI and Microsoft Extensions AI for streaming responses and flexible models.
Centralize iChatClient creation with dependency injection in a console app using Microsoft.Extensions.Hosting and NuGet, configuring services to select OpenAI, Anthropic, or Cloud providers and models via command-line arguments.
Create a middleware for iChatClient in .NET to intercept prompts before and after sending them to the model, enabling visibility into messages and an optional cache layer within the pipeline.
Use chat options to centralize model behavior in .NET, set max output tokens, and distinguish input from output tokens. Adjust temperature to 0.7 for OpenAI and cloud models.
Explore the Microsoft Extensions AI library to create abstractions for AI models from providers, like OpenAI, and expose a client interface for sending messages to LLM and receiving responses.
Discover tooling to let ai perform actions, like querying databases and sending emails, beyond answering questions. Learn to invoke multiple functions in sequence, handle user confirmations, and reduce errors.
Enable tool calling to let the AI decide when to invoke defined functions, bridging natural language and code and enhancing accuracy, integration, and business workflows.
Expose a weather fetch function to the AI model, using a fake weather service and getWeather tool, with function invocation enabled for city queries like santo domingo and madrid.
Build a real weather service using weatherapi.com, inject an API key via environment variables, and fetch current conditions from JSON with an HTTP client, testing weather for Santo Domingo.
Demonstrates how a prompt makes an AI call multiple tools in sequence, using a weather-evaluation service and AIFunctionFactory to assess conditions and guide outdoor decisions.
Define a special tool that requires user approval before actions like sending emails. Implement an approval flow in a .NET chatbot with fake email services and actionable tool descriptions.
Discover how description attributes attach tool metadata and how middleware sends tools and their JSON schema to the model, demonstrated with a send email tool.
Master how to handle tool errors in a chatbot by reading exception messages and proposing fixes to retry tool invocations.
Explore tooling and tool calling, where an ai model invokes user-defined functions with parameters, uses results to proceed, and applies human-in-the-loop oversight and error handling for exceptions.
Migrate the chatbot to a Blazor web app, enable consecutive tools with human intervention, add a data query tool, and support canceling during AI responses.
Create a Blazor web app and implement a simple AI chat interface with a fake chatbot to demonstrate messaging, conversation management, and human-in-the-loop controls.
Install and configure AI in a Blazor app by adding NuGet packages for OpenAI and Anthropic, configuring a chat client with a system prompt and streaming UI updates.
Add a tools class to the Blazor application and configure the chat client to use tools, fetching weather API key via IConfiguration and environment variables, then test Santo Domingo weather.
Learn to use human-in-the-loop tools by adding an approval request UI that requires user confirmation before sending an email, managing pending approvals, and updating the chat bot accordingly.
Extract the chat options from the IChatClient by configuring a transient chat options service and injecting them into the model, enabling Entity Framework Core with scoped setup for weather queries.
Install Entity Framework Core with SQLite, define a person entity and dbContext, seed data, apply migrations, and build a getAll service to query the people table.
Aims to support multiple tool calls that require human intervention by queuing pending approvals, displaying each in turn, and processing them sequentially until all are resolved.
Add a typing indicator with three animated dots when the AI chat text is empty, signaling thinking with CSS in the chat component.
Implement cancellation of a running AI prompt in .NET using a cancellation token source, link tokens, and catch and finally blocks to safely handle operation cancelled exception.
Enable users to choose the AI model at runtime by introducing an iChatClientFactory and AI models dictionary, with a Blazor server UI to select the model.
Migrate the chatbot to the web, tackle front-end and back-end synchronization, enable operation cancellation, and offer a chat service with database access, plus an iChat client factory for AI models.
Explore Rack, an approach that enables large language models to work with your own data, including embeddings and vector databases, plus cloud solutions for internal policies and documents.
Understand how retrieval augmented generation (rach) enables llms to fetch up-to-date information from data sources, reducing hallucinations by providing relevant context through embeddings and retrieved fragments.
Explore how embeddings convert words into real-valued vectors that capture semantic relationships. Store chunked documents as embeddings in a vector database and retrieve nearest matches by vector similarity.
Store embeddings in vector databases to enable semantic search by retrieving vectors closest in multidimensional space, while indexing metadata such as source, date, author, and tags for LLM responses.
Build an in-memory rag workflow by storing document fragments as vectors, generating embeddings, and retrieving top relevant chunks via cosine similarity in a Blazor AI app.
Build a chatbot with a rack service to retrieve relevant context from internal documents, generate embeddings, and feed the AI with document-based context.
Enforce that AI answers only from retrieved context in documents, applying a strict system prompt, a 0.6 similarity threshold, and a default not enough information reply when context is insufficient.
Implement a real RAG pipeline by uploading markdown files to Azure AI Search as a cloud vector database, storing embeddings and fragments for semantic search.
Implement a semantic search workflow in Azure using the Azure Search rack service, embedding generation, and vector search to retrieve and rank relevant documents from a vector database.
Create a component to read markdown files and render them as HTML in a .NET app, enabling citations and content retrieval.
Display source documents for chatbot answers by updating the chat UI to show cited files, add a RAC search result DTO with document title and text, and render clickable citations.
Stream the model's answer while hiding internal sources by using a metadata sources class and a delimiter, then display only the used document titles as JSON after the delimiter.
Explore retrieval augmented generation (RAG) that blends information retrieval with generative models to answer using external data, leveraging embeddings and vector databases for fast semantic searches and JSON-style responses.
Explore the model context protocol (MCP) to enable LLMs to invoke code and access tools across servers, allowing any AI model to interact with your tools.
Explore the model context protocol, MCP, which standardizes structured context, tools, resources, and prompts to let AI models query data sources and interact with external services outside prompts.
Create a functional MCP server with Espritonet Core in .NET, configure http transport, enable stateless mode, allow-any-origin policy, map the MCP endpoint, and test connectivity with the model-context-protocol inspector.
Expose MCP server tools to enable AI agents to manage people data with an in memory repository, offering get all, get by id, and update active operations, returning operation results.
Add prompts to the MCP server by creating a prompts class and exposing four prompts: get all, get by ID, activate, and deactivate, then verify in the MCP inspector.
Expose resources to share static data and internal documents via the mcp server, then define a documents resource with a uri and read its contents.
Publish the MCP server to production by adding an api controller with a get all endpoint and enabling controllers. Test by updating Gloria's status via the MCP inspector.
This optional Blazor video shows how to visualize a list of people in a standalone Blazor app, fetching data via HTTP and updating a table every second.
Test the MCP server with a ChatGPT app, enabling developer mode and creating a demo app at the MCP endpoint to query and activate records, demonstrating read and write access.
Explore how the model context protocol enables AI to interact with external systems by defining tools, data, and prompts, separating AI logic from integrations.
Explore local models, learn to use OLAMA to manage them, download and run local models, and integrate these models into applications.
Explore how local models run on your own hardware, offering privacy, control, and potential cost savings, while noting hardware demands, performance gaps, and the technical complexity of setup.
Install olama to run artificial intelligence models locally on your PC without internet or external APIs. Use PowerShell on Windows or download executable to manage models with a common interface.
Learn how to download and run local ai models with olama, selecting lighter versions like kuen 3.5 for modest hardware and using GWEN3 embedding models.
Integrate Olama in a console app by installing the Olama sharp NuGet package, configuring the Olama API client with a model, and testing with a weather service and capital questions.
Integrate a local Olama model into a Blazor AI project by installing Olamasharp, configuring models via user secrets, and wiring the chat client to the Olama endpoint.
Implement RAG with Ollama by switching the embedding generator from OpenAI to the Ollama API client, updating the embedding dimension to 1024, and reindexing Azure search indexes.
Learn how local models run on user hardware to boost privacy and data control, managing memory, storage, and performance via OLAMA for downloading and running open-source models.
Learn to build an ai-powered web api and embed a chatbot for an independent front-end. Explore front-end options like JavaScript in an MVC view, Angular, React, Blazor, and more.
Build an mvc application with separate front-end and back-end, enabling AI interactions via Angular, React, or Blazor, and support multiple conversations with separate context.
Build an esprit online core mvc application with a web api controller and a JavaScript front end, using OpenAI and individual accounts to preserve each user's AI message history.
Build a mvc chatbot using a chat client factory and OpenAI model. Enable streaming responses and maintain history for web api context with human-in-the-loop approvals.
Explore building the UI for AIChat in .NET, including a chat layout with a sidebar of conversations, a main chat area, and a bottom input form for sending messages.
Create a SendMessageDTO with conversationId and text and an API endpoint to send messages to the AI, returning the response. Use vanilla JavaScript to post prompts and update chat UI.
Store chat history in a database to enable concurrent conversations and resume from where you left off, preserving message order and enabling follow-up questions to the AI.
Display user conversations and enable on-demand chat creation by building a ConversationSummaryDTO and a GetConversations endpoint. Implement a dynamic UI with loadConversations and create new chat functionality.
Enable loading existing conversations and managing multiple chats by introducing a conversation dto and a get-by-id endpoint, then fetch, render, and mark active conversations with histories.
Implement a delete conversation endpoint in a .NET chat controller using post, returning affected rows with 404 or 204, and update the UI to reselect or recreate a chat.
Replicate the first user message as the conversation title, replacing the default new chat label. If the first message is under 60 characters, use it; otherwise trim and add ellipsis.
Learn to implement streaming in .NET by sending text and events with a stream event protocol, enabling real-time delta updates and tool approval handling.
Implement operation cancellation in a .NET AI agent using a cancellation token and an abort controller. Update the UI to disable the send button and enable cancel during processing.
Implement human-in-the-loop tool approvals by introducing a ChatApprovalRequest entity with statuses pending, approved, rejected, completed; persist and map approvals to a pending approval dto for the front end.
Explore back-end development for a human-in-the-loop tool by implementing endpoints to fetch pending approvals, resolve approval requests via DTOs, update status, and feed results to the frontend and AI model.
Implement a front-end flow for human-in-the-loop approvals using vanilla javascript, including addApprovalRequestApproval, pending approval handling, and approve or reject actions, with API-driven resolution and UI updates.
Store chat messages and pending approval requests in a database to maintain full interaction history, support multiple concurrent conversations, and resume any conversation exactly where you left off.
Discover how to take your .NET applications to the next level by integrating artificial intelligence in a practical, modern, and production-ready way. In this course, you’ll learn step by step how to add AI capabilities to your applications, with minimal theory and a strong focus on real-world scenarios.
We’ll start with the basics by integrating AI into a console application, so you can understand the fundamentals of interacting with language models. From there, we’ll move on to Microsoft Extensions AI, one of the key components of the modern .NET ecosystem for working with AI in a flexible and decoupled way, allowing you to switch between providers such as OpenAI, Anthropic, or Google without rewriting your application.
As we progress, we’ll build a fully functional chatbot using ASP.NET Core. This won’t be just another text generator: we’ll implement response streaming to improve the user experience, enabling text to appear in real time without unnecessary waiting. You’ll also learn how to use tool calling, a technique that allows the AI to execute functions from your C# code, integrate with your database, or consume external APIs.
We’ll also cover more advanced scenarios, such as human-in-the-loop workflows, where the AI requests approval before performing sensitive actions like sending emails. This is essential for building secure and reliable systems in real-world environments.
In the RAG (Retrieval-Augmented Generation) module, you’ll learn how to build applications that allow AI to answer questions based on your company’s own documents. Not only that, but we’ll also implement a source citation system, increasing the reliability of responses and making it possible to verify the information being used.
Finally, we’ll explore the Model Context Protocol (MCP), where we’ll build a server that enables tools like ChatGPT or Claude to interact directly with your application. This opens the door to scenarios where users can perform real actions in your system simply through natural language.
This course is designed for .NET developers who want to learn by building real-world projects they can immediately apply to their jobs or products. You don’t need prior experience with artificial intelligence, but you should have a basic understanding of C# and ASP.NET Core.
By the end of the course, you won’t just understand how modern AI works, but also you’ll be able to integrate it effectively into your own applications, creating smarter, more automated solutions aligned with today’s industry trends.
If you want to learn how to build AI and agent-powered .NET applications, this course is for you.