Skip to content

Generative AI for Beginners

A free 21-lesson course for learning to build generative AI apps, with Python and TypeScript code.

Stars
123k
Forks
65.7k
Licence
MIT
Language
Jupyter Notebook
Last update
5 days ago
Type
Learning resource

What it is

This is a structured course made of 21 lessons that teach the basics of building applications on top of generative AI models. Each lesson covers its own topic, so you can start wherever you like. Lessons are labeled either as 'Learn' lessons explaining a concept or 'Build' lessons that pair a concept with code examples, often in Python and TypeScript. It is written by Microsoft Cloud Advocates.

  • Work through a 'Learn' lesson to understand a generative AI concept
  • Run a 'Build' lesson's code samples in Python or TypeScript
  • Follow the course's examples using Azure OpenAI, OpenAI API, or Foundry Local
  • Find more advanced samples in the linked Generative AI Code Samples collection

Great for

  • Developers who know some Python or TypeScript and want a guided introduction to generative AI
  • Students who want a free, self-paced course with hands-on code
  • Learners who want to work through lessons in any order
  • People who want to use Azure OpenAI, OpenAI API, or Foundry Local for practice

Not ideal for

  • Absolute beginners to programming, since the README recommends separate Python or TypeScript courses first
  • People looking only for a finished product or app, since this is a course rather than software to run
  • People who need .NET-specific material as the main focus, since the README points to a separate .NET edition
Step-by-step guide: how to use Generative AI for BeginnersInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Clone and build from source

    You'll need: Basic knowledge of Python or TypeScript (helpful) · A GitHub account (to fork the repo) · Access to Azure OpenAI, Microsoft Foundry Models, OpenAI API, or Foundry Local

    Clone without translations (Bash / macOS / Linux, sparse checkout)

    git clone --filter=blob:none --sparse https://github.com/microsoft/generative-ai-for-beginners.git

    Enter the repo folder

    cd generative-ai-for-beginners

    Exclude translations from checkout

    git sparse-checkout set --no-cone '/*' '!translations' '!translated_images'
  2. 2

    Run it

    • Fork or clone the repository from GitHub
    • Follow the Course Setup lesson (00-course-setup) to prepare your environment
    • Choose a model provider from the README's list and set it up
    • Open any lesson and work through its code samples
  3. 3

    Get the most out of it

    • Star the repo to find it later, as the README suggests
    • Use the 'Keep Learning' section at the end of each lesson for extra tools
    • Check the Generative AI Code Samples collection for more advanced examples
    • Join the official Microsoft Foundry Discord to get help from other learners

Downloads

Strengths

  • Free and open source under the MIT license
  • Lessons can be taken in any order and each covers its own topic
  • Includes code in Python and TypeScript and links to extra resources

Trade-offs

  • The README notes GitHub Models is retiring at the end of July 2026, so some setup paths may change
  • Needs access to a model provider such as Azure OpenAI, OpenAI API, or Foundry Local
  • The repo is large because of 50+ translations, so cloning requires sparse checkout for a faster download

How it compares

ProjectStarsTypeLevelUpdatedBest for
generative-ai-for-beginners (this)123kLearning resourcebeginner5 days agoDevelopers who know some Python or TypeScript and want a guided introduction to generative AI
Prompt-Engineering-Guide79.8kLearning resourcebeginner8 months agoPeople who are new to prompting and want structured lessons with examples
repomix29.1kCLIbeginner4 days agoDevelopers who want to ask an AI assistant questions about a whole project
OpenHands92.5kAppintermediate4 days agoDevelopers who want coding agents running on a server while their laptop is off
LibreChat46.6kAppintermediate4 days agoTeams that want one shared chat interface across several AI providers
one-api37.3kAppintermediate10 months agoDevelopers who want one OpenAI-compatible endpoint for several model providers

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.