Repolode
microsoft

microsoft/Generative-AI-for-beginners-dotnet

Hands-on .NET course with five lessons and runnable samples for building generative AI apps, agents and RAG.

Stars
3,136
Forks
2,213
Open issues
1
Last commit
21 hours ago

What is it?

This repository is a practical course for .NET developers who want to add generative AI to their applications. It is organized into five lessons that move from basic text generation and chat context to embeddings, semantic search, retrieval-augmented generation (RAG), tool-using agents, multi-agent workflows, MCP integration, and responsible AI practices.

Each lesson provides a short video, complete C# code samples, and step-by-step setup guidance. Samples can run in GitHub Codespaces, against Azure OpenAI or Microsoft Foundry, or locally with Ollama. The repository also includes additional sample collections for Foundry Local, the Microsoft Agent Framework, and a GitHub Copilot SDK BYOK example, plus translated course READMEs in several languages.

Key features

  • 01Five structured lessons covering generative AI fundamentals, techniques, application patterns, agents, and responsible AI.
  • 02Runnable C# samples that demonstrate chat, embeddings, semantic search, RAG, and document processing.
  • 03Samples for building tool-using agents and multi-agent workflows with the Microsoft Agent Framework.
  • 04Support for GitHub Codespaces, Azure OpenAI / Microsoft Foundry, and local models through Ollama.
  • 05Additional sample sets for Foundry Local, GitHub Copilot SDK BYOK, and MCP integration.
  • 06Course README translations in Simplified Chinese, Traditional Chinese, French, Japanese, Korean, Portuguese, Spanish, and German.

Use cases

  • A .NET developer learning how to integrate LLM calls into an existing C# application.
  • A team that wants working reference code for RAG, semantic search, or document Q&A in .NET.
  • Developers evaluating Azure OpenAI, Microsoft Foundry, or local Ollama models for a .NET project.
  • Engineers who need examples of tool-using agents, multi-agent orchestration, and MCP in .NET.

Quick start

  1. 1

    Fork the repository on GitHub

  2. 2

    Run the automated Azure setup script from the repository root

    ./setup.ps1
  3. 3

    Run the BasicChat sample (navigate to samples/CoreSamples/BasicChat-01MEAI first)

    dotnet run app.cs

Things to know

  • Samples need an Azure OpenAI or Microsoft Foundry deployment and Azure sign-in (az login).
  • Some provider-specific samples are optional reference material, not part of the recommended learning path.

Topics

FAQ

What is Generative-AI-for-beginners-dotnet?
Hands-on .NET course with five lessons and runnable samples for building generative AI apps, agents and RAG. This repository is a practical course for .NET developers who want to add generative AI to their applications. It is organized into five lessons that move from basic text generation and chat context to embeddings, semantic search, retrieval-augmented generation (RAG), tool-using agents, multi-agent workflows, MCP integration, and responsible AI practices.
Is Generative-AI-for-beginners-dotnet free to use? What license does it have?
Generative-AI-for-beginners-dotnet is open source under the MIT license. Check the license terms before using it in commercial products.
Is Generative-AI-for-beginners-dotnet still maintained?
Actively maintained. The last commit to Generative-AI-for-beginners-dotnet was on Oct 19, 2026.
What can I use Generative-AI-for-beginners-dotnet for?
A .NET developer learning how to integrate LLM calls into an existing C# application. A team that wants working reference code for RAG, semantic search, or document Q&A in .NET. Developers evaluating Azure OpenAI, Microsoft Foundry, or local Ollama models for a .NET project. Engineers who need examples of tool-using agents, multi-agent orchestration, and MCP in .NET.
How do I install Generative-AI-for-beginners-dotnet?
Fork the repository on GitHub Run the automated Azure setup script from the repository root: ./setup.ps1 Run the BasicChat sample (navigate to samples/CoreSamples/BasicChat-01MEAI first): dotnet run app.cs
Where can I get Generative-AI-for-beginners-dotnet?
The source code and installation instructions are on GitHub: https://github.com/microsoft/Generative-AI-for-beginners-dotnet

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects