generative-ai-for-beginners
by microsoft
Free Microsoft course of 21 lessons that teaches beginners how to build applications with generative AI.
- Stars
- 124,147 stars
- Forks
- 67k forks
- Last push
- 6 days ago
- Activity
- Active
# Clone the course without the 50+ translations$ git clone --filter=blob:none --sparse https://github.com/microsoft/generative-ai-for-beginners.gitCommands from the project's README. Run them after installing (see below).
Overview
Understand generative-ai-for-beginners in 60 seconds
- What it does
- Generative AI for Beginners is a free 21-lesson course from Microsoft Cloud Advocates on building generative AI applications. Lessons explain concepts and include code in Python and TypeScript.
- The problem it solves
- Getting started with generative AI is confusing because of the many models, APIs and techniques. This course walks through the fundamentals one topic at a time, with hands-on build lessons.
- Why choose it
- Choose it for a structured, free course backed by Microsoft that you can start at any lesson. Some lessons use Azure or OpenAI services, though Foundry Local lets you run models offline.
- Who should use it
- Developers new to generative AI
- Students learning to build AI apps
- Python or TypeScript programmers
- Teams onboarding people to LLM development
- Setup difficulty
You'll need:
- Basic Python or TypeScript knowledge helps
- A GitHub account to fork the repo
- Access to Azure OpenAI, Microsoft Foundry Models, the OpenAI API, or Foundry Local
How generative-ai-for-beginners works
The course has 21 standalone lessons, so you can start wherever you like. Learn lessons explain a generative AI concept, and Build lessons add code examples in Python and TypeScript where possible. Each lesson includes a short video introduction and a Keep Learning section.
To run the code you can use Azure OpenAI Service, Microsoft Foundry Models, the OpenAI API, or Foundry Local to run models fully offline. The README notes GitHub Models was retired at the end of July 2026 and Microsoft Foundry Models replaces it.
A Course Setup lesson helps you set up your development environment. The repository includes translations into 50+ languages, so the README suggests a sparse clone to skip them. There is also a separate .NET edition.
Features
Key features
21 lessons
From fundamentals to building generative AI apps.
Learn and Build lessons
Concepts plus runnable code.
Python and TypeScript
Code examples in both languages where possible.
Several model options
Azure OpenAI, Foundry Models, OpenAI API or offline Foundry Local.
50+ translations
Course content in many languages.
Free
Open course material under the MIT license.
Strengths
- Free and well structured
- Backed by Microsoft
- Start at any lesson
- Offline option with Foundry Local
Limitations
- Some lessons assume Azure or OpenAI accounts
- Full clone is large because of translations
- It's a course, not a library you install
Practical use cases
Learn the basics
Work through the Learn lessons to understand prompts, models and RAG.
Build a first app
Follow a Build lesson to create a working generative AI app.
Team training
Use the lessons as an onboarding curriculum.
Installation
Install generative-ai-for-beginners
Commands come from Generative AI for Beginners's README. AIRepoHub hasn't run them yet. View source
Prerequisites
- Git
- Python or Node.js
Supported systems
- Windows
- macOS
- Linux
- 1
Clone without translations
Shellgit clone --filter=blob:none --sparse https://github.com/microsoft/generative-ai-for-beginners.gitcd generative-ai-for-beginnersgit sparse-checkout set --no-cone '/*' '!translations' '!translated_images' - 2
Open the Course Setup lesson
See 00-course-setup/README.md to set up your environment and model access.
- 1
Clone without translations
Textgit clone --filter=blob:none --sparse https://github.com/microsoft/generative-ai-for-beginners.gitcd generative-ai-for-beginnersgit sparse-checkout set --no-cone "/*" "!translations" "!translated_images"
Configuration and API keys
| Setting | What it's for |
|---|
First run
- 1
Read the Course Setup lesson
00-course-setup/README.md explains how to configure your environment.
generative-ai-for-beginners's documentation doesn't include sample output, so we don't show any. Expect the results in your terminal.
Your first project
Set up the course and start your first lesson
Get the course on your machine and run a Build lesson.
Before you start
- Git installed
- An account for one of the supported model services, or Foundry Local
- 1
Sparse-clone the repository
Shellgit clone --filter=blob:none --sparse https://github.com/microsoft/generative-ai-for-beginners.gitcd generative-ai-for-beginnersgit sparse-checkout set --no-cone '/*' '!translations' '!translated_images' - 2
Follow 00-course-setup to configure your environment
- 3
Pick a lesson and run its code
Use the assignment folder that matches your model service: aoai-assignment, githubmodels or oai-assignment.
What to expect
The course is on your machine and a lesson's example runs against your chosen model service.
Next steps
- Continue through the 21 lessons in any order
- Try the advanced Generative AI code samples
- Join the Microsoft Foundry Discord for help
Costs and requirements
What it costs to run
- License
- MIT. Free to use and share.Free
- Course
- Free.Free
- Model services
- Azure OpenAI and the OpenAI API are paid; Foundry Local runs offline for free.Depends
Troubleshooting
Common setup issues
Clone is slow or huge
Use the sparse checkout commands to skip the 50+ language translations.
GitHub Models lessons don't work
GitHub Models was retired at the end of July 2026; use Microsoft Foundry Models instead.
Alternatives
Similar AI repositories
dify
langgenius
Visual workspace for building agentic workflows and RAG pipelines, self-hosted or in the cloud.
graphify
Graphify-Labs
Agent skill that turns a codebase and its docs into a searchable knowledge graph for Claude Code, Cursor, Codex and Gemini CLI.
claude-mem
thedotmack
Memory add-on for AI coding agents that saves what happened in past sessions and brings the useful parts back later.
ragflow
infiniflow
RAG engine for building retrieval and question answering over your own documents.