Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.
GitHub repo · AI & Machine LearningFree

Generative AI for Beginners

A free Microsoft course on GitHub with 21 lessons that explain how generative AI works and how to build with it, in Python and TypeScript. "Learn" lessons cover concepts such as prompting, responsible AI and security; "Build" lessons produce chat, search, image and RAG applications, function calling and agents. It is the course to take before agent courses, for developers new to building with language models.

GitHub stars

120.3k

GitHub (microsoft/generative-ai-for-beginners) · Sept 2026

Forks

63.3k

GitHub · Sept 2026

Lessons

21 plus setup

GitHub · Sept 2026

Licence

MIT

GitHub · Sept 2026

Format

GitHub repo

Topic

AI & Machine Learning

Provider

Microsoft

Time needed

21 lessons

Level

Beginner

Access

Free

What the lessons cover

The course has a setup lesson and 21 lessons, marked as either Learn (concepts) or Build (code):

  • Foundations (Learn): introduction to generative AI and LLMs; exploring and comparing models; using generative AI responsibly; prompt engineering fundamentals; advanced prompts.
  • Building apps (Build): text generation apps, chat apps, search apps with vector databases, image generation apps, low-code AI apps and function calling.
  • Product and safety (Learn): designing UX for AI applications, securing generative AI applications and the application lifecycle.
  • Deeper building (Build): retrieval-augmented generation and vector databases, open source models with Hugging Face, and AI agents.
  • Model choices (Learn): fine-tuning, small language models, and building with Mistral and Meta models.

Each lesson has a written explanation, a short video for most lessons and code samples.

What you need

  • Basic Python or TypeScript.
  • A GitHub account to fork the repository.
  • Access to one model provider: Azure OpenAI, Microsoft Foundry Models, the OpenAI API or Foundry Local for running models on your machine. The setup lesson explains the options; choose the one you can access cheaply.

Popularity

It is one of the most popular AI learning repositories on GitHub, with about 120,000 stars and 63,000 forks as of September 2026, and it was updated that month. Translations are available in more than 50 languages. It is MIT licensed.

Why take it before an agent course

Agent courses assume you understand what a model does with a prompt, why embeddings and vector search go together, how function calling works and where things go wrong. This course teaches exactly those pieces. Skipping it tends to mean copying agent code you cannot debug.

How long it takes and a good route

The lessons are self-contained and short. At two lessons a week with the code, the full course takes around three months; the essential path is shorter:

  1. Lessons 1 to 5 for concepts and prompting.
  2. Lessons 6, 7, 8 and 11 for chat, search and function calling.
  3. Lesson 15 on RAG, then lesson 17 on agents.
  4. The rest as you need them, particularly 13 on security before shipping anything.

Build one small project alongside, such as a chat app over your own notes, and extend it after each Build lesson.

Weak spots

  • Code samples lean towards Azure and OpenAI; adapting them to other providers is usually simple but not always covered.
  • Some lessons are more conceptual than hands-on, which suits beginners but may feel slow if you already build with LLMs.

Common questions

Is it really beginner level? Yes, for generative AI. You still need to be able to program.

What should I take next? Microsoft's AI Agents for Beginners or the Hugging Face Agents Course.

Best for: developers new to generative AI who want a structured, free foundation before building agents.

aillmfree courseopen source

Ready to start?

Opens on Microsoft in a new tab.

Open resource
Link broken or out of date?

Report a problem

With "Generative AI for Beginners". Only Tauseef reads this.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.