Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
b4ff8a3
Add Search Index Data Contributor role assignment for RBAC authentica…
perktime Feb 4, 2026
a65373f
Merge branch 'microsoft:master' into ai-fundamentals-0226
perktime Feb 20, 2026
1c93b12
Updated because of changes to Agent Framework
perktime Feb 20, 2026
e232ba8
Update notebook to reflect Azure AI Search terminology and improve cl…
perktime Feb 21, 2026
e5c5eca
Add userObjectId parameter and role assignment for Cognitive Services…
perktime Feb 21, 2026
495398d
Refine prompt engineering explanations and enhance clarity in groundi…
perktime Feb 21, 2026
e63e720
Enhance local workstation setup instructions and clarify model router…
perktime Feb 21, 2026
cd01582
Update documentation and notebooks to reflect Azure AI Search termino…
perktime Feb 21, 2026
827d278
Update comment to reflect Azure AI Search terminology in notebook
perktime Feb 23, 2026
1907850
Update terminology from Form Recognizer to Document Intelligence in n…
perktime Feb 23, 2026
ca32b98
Fix formatting of example prompt in Challenge-02.md
perktime Feb 23, 2026
d88c3da
Update Python version in notebook metadata from 3.13.11 to 3.11.14
perktime Feb 24, 2026
93e2e01
Fix typo in local workstation setup instructions
jrzyshr Feb 25, 2026
c23350c
Update notebook text for Azure OpenAI resource
jrzyshr Feb 25, 2026
6b0a2af
Fix typo in comment for article length extraction
jrzyshr Feb 25, 2026
8fd5c7b
Revise prerequisites in README for Azure hack
jrzyshr Feb 25, 2026
cb599c9
Fix typos in CH-01-PromptEngineering.ipynb
jrzyshr Feb 26, 2026
07e6883
Update Python version in Jupyter notebook
jrzyshr Feb 26, 2026
feb410a
Revise setup instructions and environment terminology
jrzyshr Feb 26, 2026
a452713
Revise setup instructions and resource references
jrzyshr Feb 26, 2026
e639e90
Add new learning resources to Challenge-00.md
jrzyshr Feb 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions 066-OpenAIFundamentals/Coach/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,10 @@ Always refer students to the [What The Hack website](https://aka.ms/wth) for the
This hack requires students to have access to an Azure subscription where they can create and consume Azure resources. These Azure requirements should be shared with a stakeholder in the organization that will be providing the Azure subscription(s) that will be used by the students.

- [Azure subscription](https://azure.microsoft.com/en-us/free/)
<!-- Estimated spend may be around $10 based on running Cognitive Search for four days (total length of time depends on implementation time) -->
- [Access to Azure OpenAI](https://customervoice.microsoft.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbR7en2Ais5pxKtso_Pz4b1_xUOFA5Qk1UWDRBMjg0WFhPMkIzTzhKQ1dWNyQlQCN0PWcu)
- Jupyter Notebook editor (we recommend [Visual Studio Code](https://code.visualstudio.com/Download) or [Azure Machine Learning Studio](https://ml.azure.com/))
- If using Visual Studio Code, we also recommend installing [Anaconda](https://docs.anaconda.com/anaconda/install) OR [Miniconda](https://docs.anaconda.com/anaconda/install) for project environment management
- [Python](https://www.python.org/downloads/) (version 3.7.1 or later), plus the package installer [pip](https://pypi.org/project/pip/)
- [Azure Cognitive Search](https://learn.microsoft.com/azure/search) (Basic Tier) - This will be created during the Hack and is not necessary to get started.
<!-- Estimated spend may be around $10 based on running Azure AI Search for four days (total length of time depends on implementation time) -->
- [Access to Azure OpenAI](https://customervoice.microsoft.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbR7en2Ais5pxKtso_Pz4b1_xUOFA5Qk1UWDRBMjg0WFhPMkIzTzhKQ1dWNyQlQCN0PWcu) - This used to be something Azure users needed to request, but it should be enabled by default. However, availability may vary by Azure region.
- [Azure AI Search](https://learn.microsoft.com/azure/search) (Basic Tier) - This will be created during the Hack and is not necessary to get started.
- [GitHub Codespaces](https://docs.github.com/en/codespaces/overview) - Students will use GitHub Codespaces to run a Jupyter Notebook environment. All students must have a GitHub account which they can sign up for free.

## Suggested Hack Agenda

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"source": [
"## Introduction\n",
"\n",
"In this notebook, we will explore the practical application of RAG with a more manageable type of data i.e structured data such as relational data or text data stored in csv files. The main objective is to introduce a specific use case that demonstrates the utilization of Azure Cognitive Search to extract relevant documents and the power of ChatGPT to address relevant portions of the document, providing concise summaries based on user prompts. It aims to showcase how Azure OpenAI's ChatGPT capabilities can be adapted to suit your summarization needs, while also guiding you through the setup and evaluation of summarization results. This method can be customized to suit various summarization use cases and applied to diverse datasets.\n",
"In this notebook, we will explore the practical application of RAG with a more manageable type of data i.e structured data such as relational data or text data stored in csv files. The main objective is to introduce a specific use case that demonstrates the utilization of Azure AI Search to extract relevant documents and the power of ChatGPT to address relevant portions of the document, providing concise summaries based on user prompts. It aims to showcase how Azure OpenAI's ChatGPT capabilities can be adapted to suit your summarization needs, while also guiding you through the setup and evaluation of summarization results. This method can be customized to suit various summarization use cases and applied to diverse datasets.\n",
"\n",
"This notebook leverages **Semantic Kernel** as an orchestration framework to coordinate multiple AI services and manage the RAG workflow. Semantic Kernel provides:\n",
"\n",
Expand All @@ -32,7 +32,7 @@
"- **Configuration Management**: Unified handling of model parameters and execution settings\n",
"- **Async Operations**: Efficient handling of concurrent AI service calls\n",
"\n",
"The kernel acts as the central hub that orchestrates the interaction between Azure Cognitive Search for document retrieval and Azure OpenAI for embeddings and completions.\n",
"The kernel acts as the central hub that orchestrates the interaction between Azure AI Search for document retrieval and Azure OpenAI for embeddings and completions.\n",
"\n",
"## Student Tasks\n",
"Your goals for this challenge are to read through this notebook and complete the code where there is a TODO comment. Use Github Copilot to write the code! Ensure you run each code block, observe the results, and then be able to answer the questions posed in the student guide."
Expand Down Expand Up @@ -96,7 +96,7 @@
},
{
"cell_type": "code",
"execution_count": 111,
"execution_count": null,
"id": "69bd738e",
"metadata": {},
"outputs": [
Expand All @@ -112,7 +112,7 @@
}
],
"source": [
"# Import Azure Cognitive Search, Semantic Kernel, and other python modules\n",
"# Import Azure AI Search, Semantic Kernel, and other python modules\n",
"\n",
"import os, json, requests, sys, re\n",
"import asyncio\n",
Expand All @@ -121,7 +121,7 @@
"import numpy as np\n",
"from sklearn.metrics.pairwise import cosine_similarity\n",
"\n",
"# Azure Cognitive Search imports\n",
"# Azure AI Search imports\n",
"from azure.core.credentials import AzureKeyCredential\n",
"from azure.search.documents.indexes import SearchIndexClient \n",
"from azure.search.documents import SearchClient\n",
Expand Down Expand Up @@ -299,7 +299,7 @@
},
{
"cell_type": "code",
"execution_count": 114,
"execution_count": null,
"id": "11eff67e",
"metadata": {},
"outputs": [
Expand All @@ -315,7 +315,7 @@
}
],
"source": [
"# Create a Cognitive Search Index client\n",
"# Create a Azure AI Search Index client\n",
"service_endpoint = os.getenv(\"AZURE_AI_SEARCH_ENDPOINT\") \n",
"key = os.getenv(\"AZURE_AI_SEARCH_KEY\")\n",
"credential = AzureKeyCredential(key)\n",
Expand Down
85 changes: 22 additions & 63 deletions 066-OpenAIFundamentals/Student/Challenge-00.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Thank you for participating in the OpenAI Fundamentals What The Hack. Before you
## Description
In this challenge, you will set up the necessary prerequisites and environment to complete the rest of the hack, including:
- [Azure Subscription](#azure-subscription)
- [Setup Jupyter Notebook Environment](#setup-jupyter-notebook-environment)
- [Setup Development Environment](#setup-development-environment)
- [GitHub Codespaces](#setup-github-codespace)
- [Local Workstation](#setup-local-workstation)
- [Deploy Microsoft Foundry Resources](#deploy-microsoft-foundry-resources)
Expand All @@ -19,15 +19,15 @@ In this challenge, you will set up the necessary prerequisites and environment t
You will need an Azure subscription to complete this hack. If you don't have one, get a free trial here...
- [Azure Subscription](https://azure.microsoft.com/en-us/free/)

### Setup Jupyter Notebook Environment
### Setup Development Environment

You will be working with Jupyter Notebooks and Python to interact with Azure OpenAI for the hack.
You will be working with Jupyter Notebooks and Python to interact with Azure OpenAI services for the hack.

[Jupyter Notebooks](https://jupyter.org/) are an open-source web application that allows you to create and share documents containing live code, equations, visualizations, and narrative text. It's useful for a wide range of tasks, such as data cleaning and transformation, numerical simulation, statistical modeling, data visualization, and machine learning.

Jupyter notebooks require an environment to run in.
Jupyter notebooks require a development environment to run in.

You can use [GitHub Codespaces](https://docs.github.com/en/codespaces/overview) where we have a pre-configured Jupyter lab environment set up and ready to go for you, or you can setup a Jupyter lab environment on your local workstation.
You can use [GitHub Codespaces](https://docs.github.com/en/codespaces/overview) where we have a pre-configured Jupyter development environment set up and ready to go for you, or you can setup a Jupyter lab environment on your local workstation using DevContainers.

A GitHub Codespace is a development environment that is hosted in the cloud that you access via a browser. All of the pre-requisite developer tools for this hack are pre-installed and available in the codespace.

Expand Down Expand Up @@ -68,68 +68,30 @@ You are ready to run the Jupyter Notebook files, hooray! Skip to section: [Setup

**NOTE:** You can skip this section if are using GitHub Codespaces!

If you want to setup a Jupyter Notebooks environment on your local workstation, expand the section below and follow the requirements listed.
If you want to setup this environment on your local workstation, expand the section below and follow the requirements listed. We have provided a Dev Container that will load the development environment on your local workstation if you do not want to use GitHub Codespaces.

<details markdown=1>
<summary markdown="span"><strong>Click to expand/collapse Local Workstation Requirements</strong></summary>
<summary markdown="span"><strong>Click to expand/collapse Local Workstation Setup</strong></summary>

To work on your local workstation, please ensure you have the following tools and resources before hacking:
#### Download Student Resources

- [Student Resources](#student-resources)
- [Visual Studio Code](#visual-studio-code)
- [Python](#python)
- [Conda Runtime](#conda)
- [Azure CLI (Optional)](#azure-cli-optional)
The Dev Container, Jupyter notebooks, starter code, and sample data sources for this hack are available in a Student Resources package.

##### Student Resources
- [Download `Resources.zip`](https://aka.ms/wth/openaifundamentals/resources) package to your local workstation.

The Jupyter notebooks, starter code, and sample data sources for this hack are available in a Student Resources package.
The rest of the challenges will refer to the relative paths inside the Codespace or `Resources.zip` file where you can find the various resources to complete the challenges.

- [Download and unpack the `Resources.zip`](https://aka.ms/wth/openaifundamentals/resources) package to your local workstation.
#### Set Up Local Dev Container

The rest of the challenges will refer to the relative paths inside the `Resources.zip` file where you can find the various resources to complete the challenges.
You will next be setting up your local workstation so that it can use Dev Containers. A Dev Container is a Docker-based environment designed to provide a consistent and reproducible development setup. The VS Code Dev Containers extension lets you easily open projects inside a containerized environment.

##### Visual Studio Code
**NOTE:** On Windows, Dev Containers run in the Windows Subsystem for Linux (WSL).

Visual Studio Code is a code editor which you will work with Jupyter notebooks.

- [Install VS Code](https://getvisualstudiocode.com)

##### Setup GitHub Copilot

For parts of this hack we will be relying heavily on GitHub Copilot for coding. Please setup [VS Code with GitHub Copilot](https://code.visualstudio.com/docs/copilot/setup-simplified?wt.md_id=AZ-MVP-5004796)

##### Python

- [Python Installation](https://www.python.org/downloads), version at least \>= 3.6, the minimum requirement for using OpenAI's GPT-3.5-based models, such as ChatGPT.

##### Conda

- Conda Installation, for project environment management and package management, version \>= conda 4.1.6. Anaconda distribution is a popular Python distribution, while Miniconda is the lightweight version of Anaconda.
- [Anaconda](https://docs.anaconda.com/anaconda/install) OR [Miniconda](https://docs.conda.io/en/latest/miniconda.html)
- Environment setup:
- Open Anaconda Prompt or your favourite terminal and verify Python and Conda installations using `python --version` and `conda --version`
- Create a project environment using Conda - `conda create --name <env_name>`
- Activate Conda environment - `conda activate <env_name>`
- Install required libraries and packages, provided in the form of a `requirements.txt` file in the root folder of the `Resources.zip` file. We recommend using pip or Conda in a virtual environment to do so. For example, you can run `pip install -r requirements.txt`
- Open the project in VS Code using `code .`
- If you are using Visual Studio Code, make sure you change your Python interpreter (CTRL+SHIFT+P) to select the project/virtual environment that you just created.

For more information, see [Jupyter Notebooks in VS Code](https://code.visualstudio.com/docs/datascience/jupyter-notebooks)

##### Azure CLI (Optional)

While it is not necessary for this hack, you may wish to use the Azure CLI to interact with Azure in addition to the Azure Portal.

- [Install Azure CLI](https://aka.ms/installazurecli)

#### Cloud Environment

There is a *THIRD* way of setting up a Jupyter Notebook environment if you don't want to set it up on your local workstation or use GitHub Codespaces. You can set one up in the cloud with Azure Machine Learning Studio and take advantage of Azure Compute power.

For more information, see: [Run Jupyter Notebooks in your Workspace](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-run-jupyter-notebooks?view=azureml-api-2)

Once you have an Azure Machine Learning Studio Workspace set up, you can upload the contents of the `/notebooks` folder in your `Resources.zip` file to it. For more information on this, see: [How to create and manage files in your workspace](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-manage-files?view=azureml-api-2)
On Windows and Mac OS (**NOTE:** only tested on Apple Silicon):
- (Windows only) Install the Windows Subsystem for Linux along with a Linux distribution such as Ubuntu. You will need to copy the `Resources.zip` to your Linux home directory and unzip it there.
- Download and install Docker Desktop
- Open the root folder of the Student Resources package in Visual Studio Code
- You should get prompted to re-open the folder in a Dev Container. You can do that by clicking the Yes button, but if you miss it or hit no, you can also use the Command Palette in VS Code and select `Dev Containers: Reopen in Container`

</details>
<br/>
Expand Down Expand Up @@ -247,10 +209,8 @@ If using GitHub Codespaces:
- `.env` <= Copied from `.env.sample`
- `.gitignore`
- `requirements.txt`
- Verify that you have created the Project in Microsoft Foundry.
- Verify that you have the following resources: Azure OpenAI, deployed the necessary models, AI Search, Document Intelligence, Azure Blob.

If working on a local workstation:
If working directly on a local workstation:

- Verify that you have Python and Conda installed
- Verify that you can run Jupyter Notebooks in Visual Studio Code or Azure Machine Learning Studio
Expand All @@ -260,16 +220,15 @@ If working on a local workstation:
- `.env` <= Renamed from `.env.sample`
- `.gitignore`
- `requirements.txt`
- Verify that you have created the Project in your Microsoft Foundry.
- Verify that you have the following resources: Azure OpenAI, deployed the necessary models, AI Search, Document Intelligence, Azure Blob.

## Learning Resources

- [GitHub Codespaces Overview](https://docs.github.com/en/codespaces/overview)
- [Dev Containers: Getting Started](https://microsoft.github.io/code-with-engineering-playbook/developer-experience/devcontainers-getting-started/)
- [Developing inside a Container](https://code.visualstudio.com/docs/devcontainers/containers)
- [Jupyter Notebooks in VS Code](https://code.visualstudio.com/docs/datascience/jupyter-notebooks)
- [Jupyter Notebooks](https://jupyter.org/)
- [Project Jupyter](https://en.wikipedia.org/wiki/Project_Jupyter)
- [Run Jupyter Notebooks In Your (Azure Machine Learning) Workspace](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-run-jupyter-notebooks?view=azureml-api-2)
- [How to setup .env in Python](https://dev.to/edgar_montano/how-to-setup-env-in-python-4a83#:~:text=How%20to%20setup%20a%20.env%20file%201%201.To,file%20using%20the%20following%20format%3A%20...%20More%20items)
- [Azure OpenAI Models](https://learn.microsoft.com/en-us/azure/ai-foundry/foundry-models/concepts/models-sold-directly-by-azure?pivots=azure-openai&tabs=global-standard-aoai%2Cstandard-chat-completions%2Cglobal-standard)

46 changes: 32 additions & 14 deletions 066-OpenAIFundamentals/Student/Challenge-02.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,24 +76,42 @@ Scenario: You are a product manager at a multinational tech company, and your te
### 2.4 Model Router
#### Student Task 2.4
- Navigate to Microsoft Foundry and deploy an instance of model router in the same project as your other models
- In Chat Playground use the model router deployment and prompt it with a variety of questions ranging simple to difficult. You can use the sample prompts below or come up with your own! Note how different models are used for each query (you can see this switch in the metadata on top of the prompt).
- After trying the below prompts navigate to a browser window and open Copilot. Ask Copilot the pricing for the three different models each query used. Note the price difference for each model. The smart routing is optimizing cost by using light weight models (which are cheaper) for the easier prompts!
- In Chat Playground use the model router deployment and prompt it with a variety of questions ranging simple to difficult. You will need to try some prompts that demonstrate the model router in action.



##### ⚡ Simple Transformations (should route to small/cheap models)

These are intentionally lightweight.

**Examples**

```Summarize this sentence in five words: The cat slept on the warm windowsill.``` <br>
```Convert this list into comma‑separated values: apples, bananas, pears, grapes”```<br>
```Classify the sentiment: I guess it’s fine, whatever.”```<br>
```Rewrite this in past tense: I walk to the store.```

Simple Prompt:
##### 🧠 Moderate Reasoning Tasks (often routes to mid‑tier models)

```
What is the capital of the United States?
```
Medium Prompt:
These require some structure but not deep reasoning.

```
Given a hybrid cloud architecture with latency-sensitive workloads, how would you design a multi-region failover strategy using Azure services?
```
Difficult Prompt:
**Examples**

```Explain the difference between throughput and latency to a non‑technical audience.``` <br>
```Generate 10 creative marketing slogans for a local bakery.```

##### 🧩 Deep Reasoning / Multi‑Step Logic

These are the ones that really test the router.

**Examples**

```A factory produces widgets using three machines with different failure rates. If machine A fails 3% of the time, B fails 1%, and C fails 0.5%, and they operate in sequence, what is the probability a widget is defective? Show your reasoning.``` <br>
```Design a 4‑week onboarding curriculum for new data engineers, including prerequisites, labs, and assessments.```

- Notice how different models are used for each query (you can see this switch in the metadata on top of the prompt).
- After trying the below prompts navigate to a browser window and open Copilot. Ask Copilot the pricing for the three different models each query used. Note the price difference for each model. The smart routing is optimizing cost by using light weight models (which are cheaper) for the easier prompts!

```
Generate a Bicep script to deploy a secure, autoscaling AKS cluster with Azure Entra ID integration and private networking.
```
## Success Criteria

To complete this challenge successfully, you should be able to:
Expand Down
Loading