Skip to content

Guide · Open source

How to use generative-ai-for-beginners: clone, set up and work through 21 lessons

Updated · written with AI from the project's own documentation and checked against our catalogue data

generative-ai-for-beginners is a free, MIT-licensed course from Microsoft Cloud Advocates. It contains 21 lessons on building applications on top of generative AI models, mostly with Python and TypeScript code. By the end of the guide you will know how to get a copy of the repo, choose a model provider, and decide where to start in the lesson list.

Generative AI for Beginnersmicrosoft/generative-ai-for-beginners · ★ 123k · MIT

Quick start

  1. 1Check your prerequisites. Confirm you know some Python or TypeScript and have access to Azure OpenAI, Microsoft Foundry Models, the OpenAI API, or Foundry Local.
  2. 2Clone the repo. Run the sparse checkout commands to download the course without the translations folders.
  3. 3Open the Course Setup lesson. Read 00-course-setup/README.md to prepare your development environment.
  4. 4Pick a provider path. Choose the lesson folder that matches your service, such as aoai-assignment or oai-assignment.
  5. 5Choose a starting lesson. Pick any lesson that matches your interest, since each covers its own topic.
  6. 6Work through Build lessons. Run the Python or TypeScript code samples that accompany the concept you just read.
  7. 7Ask for help if stuck. Use the Microsoft Foundry Discord or the Developer Forum on GitHub.

What you need before you start

The course expects basic knowledge of Python or TypeScript. The README says this is helpful rather than strictly required, but it also points absolute beginners to separate Python and TypeScript courses first.

You also need a GitHub account if you want to fork the repo, and access to one of the supported model services.

  • Basic knowledge of Python or TypeScript (helpful)
  • A GitHub account, to fork the repo to your own account
  • Access to Azure OpenAI, Microsoft Foundry Models, OpenAI API, or Foundry Local

Clone the repo without the translations

The repository includes more than 50 translations, which makes the download large. The README shows a sparse checkout that skips them. The commands below are for Bash, macOS and Linux. The README also gives a CMD version for Windows.

git clone --filter=blob:none --sparse https://github.com/microsoft/generative-ai-for-beginners.git cd generative-ai-for-beginners git sparse-checkout set --no-cone '/*' '!translations' '!translated_images'

Choose a model provider

The README lists four ways to run the code. Each one maps to a lesson folder name you will see in the course. Microsoft notes that GitHub Models is retiring at the end of July 2026, so use Microsoft Foundry Models instead of the githubmodels lesson path.

Foundry Local runs models fully offline on your own device and needs no cloud subscription, according to the README.

  • Azure OpenAI Service: lessons under "aoai-assignment"
  • Microsoft Foundry Models: use instead of the retiring GitHub Models path
  • OpenAI API: lessons under "oai-assignment"
  • Foundry Local: runs fully offline on your own device

Understand the Learn and Build lessons

Each lesson is labeled either Learn or Build. Learn lessons explain a generative AI concept. Build lessons explain a concept and pair it with code, usually in Python and TypeScript where possible.

You do not need to follow a fixed order. Each lesson covers its own topic, so start wherever fits your goal. Each lesson includes a short video introduction, a written lesson in the README, code samples for Azure OpenAI and the OpenAI API, and links to extra resources under Keep Learning.

  • Learn: explains a concept
  • Build: concept plus code examples
  • Each lesson: video intro, written lesson, code samples, extra links

Set up your environment and get help

The repo has a Course Setup lesson at 00-course-setup/README.md to help you set up your development environment. If you find a spelling or code error, or have a suggestion, you can raise an issue or open a pull request on GitHub.

For questions, the README links to an official Microsoft Foundry Discord server and to the Microsoft Foundry Developer Forum on GitHub.

What people use it for

  • Learning how to build applications on top of generative AI models with Python code samples
  • Practising with Azure OpenAI or the OpenAI API using the course's supporting code
  • Running model examples offline with Foundry Local, as described in the README
  • Forking the repo to keep your own copy of the lessons and exercises

Frequently asked questions

Is generative-ai-for-beginners free?

The repository is published under the MIT licence, and the README describes it as a self-paced course. The model services it uses, such as Azure OpenAI and the OpenAI API, are separate products with their own access requirements, which the README does not price.

What are the prerequisites for generative-ai-for-beginners?

The README lists basic knowledge of Python or TypeScript as helpful, a GitHub account to fork the repo, and access to Azure OpenAI, Microsoft Foundry Models, the OpenAI API, or Foundry Local. It recommends separate Python or TypeScript courses for absolute beginners.

How do I clone generative-ai-for-beginners without the translations?

Use a sparse checkout. Run git clone with --filter=blob:none --sparse, cd into the folder, then run git sparse-checkout set --no-cone with '/*' and the '!translations' and '!translated_images' exclusions. The README gives these steps for Bash, macOS and Linux, plus a CMD version for Windows.

Can I run generative-ai-for-beginners without a cloud account?

The README says Foundry Local runs models fully offline on your own device and requires no cloud subscription. Note that the other listed options, such as Azure OpenAI and the OpenAI API, are cloud services.

Is there a .NET version of this course?

Yes. The README points .NET developers to a separate repository called Generative AI for Beginners (.NET Edition). This course focuses on Python and TypeScript.

What are good alternatives to this course?

Comparable projects named for this item include the Hugging Face NLP Course, fast.ai Practical Deep Learning, LangChain documentation examples, and Full Stack Deep Learning. Choose based on whether you want a generative AI application focus or a broader machine learning foundation.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Choose this course if you already know some Python or TypeScript and want a free, self-paced, hands-on introduction to building generative AI applications, and you can work in any lesson order. Pick something else if you are new to programming, since the README recommends separate beginner courses first, or if you want a finished app to run rather than a course.

Install options & downloads