Mindket

Generative AI for Beginners

Newversion 2 · updated
Star123k

Overview

Microsoft Cloud Advocates’ free course on building generative AI apps, in 21 lessons. Learn lessons explain a concept, and Build lessons add Python and TypeScript code where possible. The setup notes cover Codespaces, a local install and each model provider.

Generative AI for Beginners is an open-source project on GitHub in the Education category, listed by Mindket. It is free. This is version 2, last updated on . Install it from GitHub as its README says. Get Mindket’s setup notes on your Mindket account, as a zip.

At a glance

Runs in
  • GitHub Codespaces: a browser-based VS Code with Python 3, Node.js, .NET and Java already inside
  • Your own computer: a Python virtual environment, Miniconda, or classic Jupyter in your browser
  • VS Code with Docker Desktop: the Dev Container, the same environment a Codespace uses
  • Your browser with no setup: each coding lesson’s README shows its code and outputs
Start with
git clone https://github.com/<your-github>/generative-ai-for-beginners
cd generative-ai-for-beginners
python -m venv .venv

Platform

VS CodeCode editor
DockerContainer

About

What it is

Generative AI for Beginners is a free course from Microsoft Cloud Advocates, kept as a GitHub repository under the MIT license. Its README says the course has 21 lessons and that each one covers its own topic, so you can start where you like. A “Learn” lesson explains a concept. A “Build” lesson explains a concept and adds code in Python and TypeScript where possible. The README says each lesson includes a short video, a written lesson and links to extra learning, though its table marks a few videos as coming soon.

  1. Fork the repository to your GitHub account
  2. Open it in a Codespace, or clone it to your computer
  3. Copy .env.copy to .env and fill in your model provider
  4. Read a lesson in its README
  5. Run its Python or TypeScript sample

Who it suits

Developers who are new to generative AI and know a little Python or TypeScript. The README calls that knowledge helpful and links a Python course and a TypeScript course for absolute beginners. This is a teaching repository, and AGENTS.md says its examples are intentionally simple and not production code.

Who uses it, and how
IndustryWho uses itHow they use itExample
Software teamsDevelopers adding a first LLM featureRead the lessons on prompts, function calling and security before they design the featureA developer reads Lessons 04, 11 and 13 before writing the spec for a support chatbot.
Self-taught learnersProgrammers who know Python or TypeScriptStart at any lesson, since each one covers its own topicA TypeScript developer starts at Lesson 06 and runs its recipe app.
Teachers and study groupsInstructors and learners working togetherFork the repository, read the Learn lessons and run the Build lessons as labsAn instructor forks the repository for a class and assigns Lesson 03, on responsible use, as reading.
Offline learnersPeople without a cloud subscriptionRun models on their own device with Foundry Local or Ollama. The Providers page says Foundry Local’s OpenAI-compatible endpoint lets you reuse most of the sample code with minimal changes.A learner installs Foundry Local with winget, then changes a sample’s client to point at its OpenAI-compatible endpoint.

Skip it if you want a finished app to deploy. The README points to a separate collection of code samples for more advanced work, and to a separate .NET edition.

Where to use it

The course is Markdown lessons, Python and TypeScript samples and Jupyter notebooks, so it runs wherever those do. The Course Setup page recommends a GitHub Codespace.

  • GitHub Codespaces: a browser-based VS Code with Python 3, Node.js, .NET and Java already inside
  • Your own computer: a Python virtual environment, Miniconda, or classic Jupyter in your browser
  • VS Code with Docker Desktop: the Dev Container, the same environment a Codespace uses
  • Your browser with no setup: each coding lesson’s README shows its code and outputs

The code reaches a model through a provider, and an assignment that needs a specific provider carries its tag in its filename.

Which provider, which files
ProviderFilename tagWhat you need
Azure OpenAI in Microsoft FoundryaoaiAn endpoint, a key and a chat model deployment
OpenAI APIoaiAn API key from your OpenAI account
Hugging FacehfAn access token from your profile
Microsoft Foundry ModelsgithubmodelsAn endpoint and a key from your Foundry project
Foundry Local or Ollamanone listedFoundry Local needs no key (the Providers table says “Not required”). The pages give no key details for Ollama

How to set it up

Get it saves a zip of Mindket’s setup notes in your downloads folder, with each path’s steps from Microsoft’s setup pages. The main route is a fork opened in a Codespace, or a local clone with a Python virtual environment.

What you need first
NeedDetail
A GitHub accountTo fork the repository, which the Course Setup page asks for
Python3.12, the version the .python-version file names (3.12.10). The pinned numpy 2.4.2 and pandas 3.0.0 need 3.11 or newer on PyPI. The Local Setup page says 3.10 or newer and AGENTS.md says 3.9 or newer
GitThe latest version, for a local clone
Node.jsOnly for the TypeScript samples. The pages give no version
Docker DesktopOnly for the Dev Container path
A model providerNeeded to run the code. The Course Setup page says the coding lessons use Azure OpenAI in Microsoft Foundry, with an Azure subscription and an API key. The Providers page says you can configure one, none or all providers.
  1. Fork the repository to your GitHub account.
  2. Open your fork in a Codespace. On the fork, pick Code, Codespaces, Create codespace on main. Or clone it and make a virtual environment, as below.
  3. Run pip install -r requirements.txt. It installs the Python packages. AGENTS.md says a Dev Container does this for you, though the post-create script it names installs only python-dotenv, openai and the lint and test tools.
  4. Copy .env.copy to .env and fill it in. Use the values for the provider you picked.
  5. Open a lesson’s README and run its sample.
git clone https://github.com/<your-github>/generative-ai-for-beginners
cd generative-ai-for-beginners
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.copy .env

On Windows PowerShell, the Local Setup page activates the environment with this line instead of the source line.

.\.venv\Scripts\activate

The repository holds many translations, which make a clone large. The README gives a sparse checkout that leaves them out.

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'

How to use it

Start anywhere. Read a Learn lesson’s README. For a Build lesson, open its folder and run the sample for the provider you set up. AGENTS.md gives this pattern for a Python sample:

cd 06-text-generation-apps/python
python aoai-app.py

The oai files use the OpenAI API, the aoai files use Azure OpenAI and the githubmodels files use Foundry Models. For Lesson 06 in TypeScript, AGENTS.md gives these lines:

cd 06-text-generation-apps/typescript/recipe-app
npm install
npm run build
npm start

Notebooks open in Jupyter or VS Code. The Local Setup page’s example is 08-building-search-applications/python/oai-solution.ipynb.

Example

You want to try Lesson 06 on your own OpenAI account. You open a Codespace from your fork and save OPENAI_API_KEY as a Codespaces secret, which the Cloud Setup page says the code picks up. In its terminal you run:

cd 06-text-generation-apps/python
python oai-app.py

The script sends the prompt “Complete the following: Once upon a time there was a” to the gpt-5-mini model and prints the reply. To see how the wording steers the answer, open the file, change the prompt and run it again.

For newcomers and experts

If you are new. A large language model, or LLM, is the kind of model behind chat tools. Your code sends it text through an API and gets text back. Lesson 01 explains what generative AI is and how LLMs work, and Lesson 02 helps you choose a model. Start with Lesson 01. You can read before you set up any account, because each coding lesson’s README shows its code and outputs.

For experts. AGENTS.md sets the model rules. The default chat model is gpt-5-mini, a reasoning model that rejects temperature and top_p and takes max_output_tokens or max_completion_tokens in place of max_tokens. The temperature demos use a Llama model through the Foundry Models endpoint, named by AZURE_INFERENCE_CHAT_MODEL.

Lesson 18 keeps gpt-4.1-mini because GPT-5 only supports reinforcement fine-tuning. Lessons 20 and 21 keep temperature and max_tokens because they target Mistral and Llama models. In TypeScript, the openai package serves Azure OpenAI through the /openai/v1/ endpoint and the Responses API, and @azure-rest/ai-inference serves Foundry Models.

The Providers page says Foundry Local exposes an OpenAI-compatible endpoint, so you can reuse most of the sample code with minimal changes.

Good to know

The lessons and code sit on your machine or in your Codespace, but every model call goes to the cloud provider you configure unless you run Foundry Local or Ollama.

  • Accounts and cost: you use your own provider accounts, and each cloud provider has its own pricing, which the Providers page links. Related assignments error out on missing credentials. Foundry Local runs on your device and needs no key
  • Your keys: keep them in .env, which the Local Setup page says is already in .gitignore, or in Codespaces secrets. Never commit them
  • Your prompts: every call goes to the provider you configure. Foundry Local and Ollama keep them on your device
  • GitHub Models: the docs say it retires at the end of July 2026, and that date has passed. Files tagged githubmodels use Foundry Models credentials
  • Setup pages disagree: AGENTS.md says Python 3.9 or newer, the Local Setup page says 3.10 or newer, and the .python-version file reads 3.12.10. The pinned numpy and pandas need 3.11 or newer on PyPI. The Course Setup page says Azure OpenAI access is open with no application, while the Providers table says “Must Apply Ahead For Access”
  • Gaps in the docs: after its troubleshooting table, the Course Setup page shows the end of the .env guide without its heading or first step. That end is the touch and echo commands, then steps 3 to 6. Use the Local Setup page for that guide. Local Setup says to make sure Jupyter is installed and gives no command for it
  • Tracking links: the repository’s rules put a tracking ID on links to Microsoft domains, so a click from a lesson carries it
  • Removal: the pages give no uninstall steps. Delete the folder, or stop or delete the codespace
  • License: MIT. The LICENSE file reads “Copyright (c) Microsoft Corporation.”

README and files

README

Generative AI for Beginners: setup notes

This kit holds setup notes only. Mindket wrote them. The course, its lessons, code and notebooks stay in Microsoft's repository: https://github.com/microsoft/generative-ai-for-beginners

These notes are not made or endorsed by Microsoft. The README calls the repository "Generative AI for Beginners (Version 3) - A Course" and says it teaches "the fundamentals of building Generative AI applications with our 21-lesson comprehensive course by Microsoft Cloud Advocates." The notes were written from the README and setup pages read on 3 November 2026.

License: MIT. The LICENSE file (https://github.com/microsoft/generative-ai-for-beginners/blob/main/LICENSE) reads "Copyright (c) Microsoft Corporation."

What the course is

The README says the course has 21 lessons and that each one covers its own topic, so you can start wherever you like. Its table adds a setup lesson, 00, and lists 22 rows in all. A lesson is either a "Learn" lesson that explains a concept or a "Build" lesson that explains a concept and shows code in Python and TypeScript where possible. The README says each lesson includes a short video introduction, a written lesson in its README, Python and TypeScript code samples for Azure OpenAI and the OpenAI API, and links to extra learning, though its table lists "Video Coming Soon" for lessons 00, 19, 20 and 21. Source: https://github.com/microsoft/generative-ai-for-beginners/blob/main/README.md

The lessons

Titles and folder names are copied from the README's table. The folder is where the lesson's README and code live.

| # | Lesson | Folder | Kind |
|---|---|---|---|
| 00 | Course Setup | 00-course-setup | Learn |
| 01 | Introduction to Generative AI and LLMs | 01-introduction-to-genai | Learn |
| 02 | Exploring and comparing different LLMs | 02-exploring-and-comparing-different-llms | Learn |
| 03 | Using Generative AI Responsibly | 03-using-generative-ai-responsibly | Learn |
| 04 | Understanding Prompt Engineering Fundamentals | 04-prompt-engineering-fundamentals | Learn |
| 05 | Creating Advanced Prompts | 05-advanced-prompts | Learn |
| 06 | Building Text Generation Applications | 06-text-generation-apps | Build |
| 07 | Building Chat Applications | 07-building-chat-applications | Build |
| 08 | Building Search Apps Vector Databases | 08-building-search-applications | Build |
| 09 | Building Image Generation Applications | 09-building-image-applications | Build |
| 10 | Building Low Code AI Applications | 10-building-low-code-ai-applications | Build |
| 11 | Integrating External Applications with Function Calling | 11-integrating-with-function-calling | Build |
| 12 | Designing UX for AI Applications | 12-designing-ux-for-ai-applications | Learn |
| 13 | Securing Your Generative AI Applications | 13-securing-ai-applications | Learn |
| 14 | The Generative AI Application Lifecycle | 14-the-generative-ai-application-lifecycle | Learn |
| 15 | Retrieval Augmented Generation (RAG) and Vector Databases | 15-rag-and-vector-databases | Build |
| 16 | Open Source Models and Hugging Face | 16-open-source-models | Build |
| 17 | AI Agents | 17-ai-agents | Build |
| 18 | Fine-Tuning LLMs | 18-fine-tuning | Learn |
| 19 | Building with SLMs | 19-slm | Learn |
| 20 | Building with Mistral Models | 20-mistral | Learn |
| 21 | Building with Meta Models | 21-meta | Learn |

What you need first

  • A GitHub account, to fork the repository. The Course Setup page says to fork it "to be able to change any code and complete the challenges".
  • Basic knowledge of Python or TypeScript is helpful, the README says. It links a Python course and a TypeScript course for absolute beginners.
  • To run the code, one of: Azure OpenAI Service, Microsoft Foundry Models, the OpenAI API, or Foundry Local (models run fully offline on your own device). The model providers page adds Hugging Face and Ollama. The Providers page says you can configure one, none or all of them: "You can configure one, none, or all providers." The Course Setup page says the coding lessons use Azure OpenAI in Microsoft Foundry, with an Azure subscription and an API key, and calls access open with no application. The Providers table says "Must Apply Ahead For Access" for Azure.
  • Python 3.12 for a local setup, the version the repository's .python-version file names (3.12.10). The Local Setup page says 3.10 or newer and AGENTS.md says 3.9 or newer, but the root requirements.txt pins numpy==2.4.2 and pandas==3.0.0, which PyPI lists as needing 3.11 or newer (checked on 3 November 2026).
  • Node.js only for the TypeScript samples. The pages read give no version.

Each coding lesson's README shows its code and outputs, so you can read it without running anything. Source: https://github.com/microsoft/generative-ai-for-beginners/blob/main/00-course-setup/README.md

Ways to run it

  • setup/github-codespaces.md: a browser-based VS Code with everything installed. The setup guide recommends it.
  • setup/local-python.md: your own computer, with a Python virtual environment.
  • setup/dev-container.md: VS Code with Docker, the same environment a Codespace uses.
  • setup/miniconda-and-jupyter.md: a Conda environment, and notebooks in your browser.
  • setup/model-providers.md: the model behind the code, the .env file and every variable in it.
  • setup/typescript.md: running a TypeScript sample.
  • setup/coding-agents.md: the AGENTS.md file the repository carries.

Keep a copy small

The README says the repository holds translations in 50+ languages, which "significantly increases the download size". It gives a sparse checkout that leaves them out. Source: https://github.com/microsoft/generative-ai-for-beginners/blob/main/README.md

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'

On Windows CMD, the README gives:

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"

Update or remove

The pages read give no update or uninstall steps. The course is a repository, so to update a clone you pull from it with Git, and to remove it you delete the folder. These two lines are Mindket's, not Microsoft's. A Codespace is stopped from the Command Palette with Codespaces: Stop Codespace, as setup/github-codespaces.md says. The Cloud Setup page also says to delete idle codespaces but gives no command for it.

Other courses by the same team

The README lists more courses from the same team, among them a .NET edition of this one at https://github.com/microsoft/Generative-AI-for-beginners-dotnet, and "Generative AI Code Samples" in Python and TypeScript for more advanced code at https://aka.ms/genai-beg-code

Sources

Files
README.md  7 KB
setup/coding-agents.md  3 KB
setup/dev-container.md  3 KB
setup/github-codespaces.md  3 KB
setup/local-python.md  4 KB
setup/miniconda-and-jupyter.md  3 KB
setup/model-providers.md  8 KB
setup/typescript.md  3 KB

8 files, 34 KB, downloaded as a zip.

What’s new

  • Version 2 · 2026-11-09

    Updated by Mindket to the current version of this kit.

  • Version 1 · 2026-11-03

Compare with similar

Listed GitHub projects in the same category that share the most topics with this one.

ProductStarsActivityLanguageLicenseLast change
Generative AI for Beginners This page123,169ActiveJupyter NotebookMIT
Build a Large Language Model (From Scratch)Shares gpt · language-model · generative-ai107,934————
AI For BeginnersShares microsoft-for-beginners · ai70,626——MIT—
AI Engineering from ScratchShares generative-ai · ai77,834——MIT—
Numbers as Mindket last read them, from 2026-11-07 to 2026-11-09. Activity is read from each project’s last change on GitHub: Active within 30 days, Quiet within 180, Stale after that.

Reviews

No ratings yet

Write a review

No reviews yet.

What people say

Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search and on Trendshift. Mindket doesn’t write or check them. Open one to read it where it was posted.

koreyspaceGenerative AI for Beginners – Version 24 pointsThomas Manders@itbros.nl - De AI cursus uit aflevering 29 was iets minder breaking dan mevrouw Nicholson aangaf. Ze is namelijk uit juni 2024. Voor basiskennis niet verkeerd, maar 2 jaar is lang in AI-land. learn.microsoft.com/en-us/shows/... - NL alternatief: www.ai-cursus.nl1 like · 1 reply@petarivanovv9Once your first agent runs, this is how to test it in 3 layers (unit tests, LLM judges, production alerts): https://t.co/mbrYX5II6xr/BestGitHubRepos6 GitHub repos that take you from "I use ChatGPT" to "I know how it works"wirelesslifeGenerative AI for Beginners via Microsoft AI Services2 points · 1 replyMr. ÅnandStage 2: Build with GenAI Generative AI for Beginners, Microsoft (21 lessons, 121k+ GitHub stars) github.com/microsoft/g... Why: prompts, RAG and function calling come before agents, not after.1 reply@waveking1314$81sebgGenerative-AI-for-Beginners: 18 Lessons, Get Started Building with Generative AI2 pointsVikas Gupta→ How generative AI works + practical tools 3️⃣ Introduction to Responsible AI → Ethics, safety + responsible AI use Microsoft 4️⃣ AI Skills for Work → Use AI tools to become more productive 5️⃣ Generative AI for Beginners → GenAI basics + prompt skills 6️⃣ Responsible AI1 reply@danielishakutvWant to get really good at generative AI? Save these 10 GitHub repos. 👇 The diagram is where they lead: AI agents with memory, tools, and a human still in control.EntICOncMicrosoft's Generative AI for Beginners2 pointsSyed Ubada2️⃣ Generative AI for Beginners — Microsoft 🔗 learn.microsoft.com/en-us/shows/... ⏱ ~10-15 hrs | 18 lessons (18 videos + code notebooks) | No formal exam | 100% Free | Self-paced | ⚠️ No certificate1 reply

Searched

More from Mindket

See all from Mindket

Huashu Design

alchaincyf · Skill

Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…

New29.4k

Guizang PPT Skill

op7418 · Skill

Skill that makes single-file HTML slide decks, slide illustrations and platform covers in two visual styles, with a presenter mode for rehearsal. For speakers…

New29.8k

Claude Code Skills & Plugins

alirezarezvani · Skill

Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…

New29.8k

Similar projects

See all in Education

The official code for Sebastian Raschka’s book on building a GPT-like LLM in PyTorch, one chapter at a time. The notebooks cover text data, attention, pretrain…

New108k

OpenHands Agent Canvas

OpenHands · Kit

OpenHands’ open source, self-hosted control center for coding agents. One browser app runs the OpenHands agent, Claude Code, Codex, Gemini CLI, Pi or OpenCode…

New92.8k

System Prompts Leaks

asgeirtj · Kit

A curated collection of verbatim system instructions for popular AI models and chatbot platforms, providing insight into how AI agents are configured to perfor…

New71k