Skip to content

Commit

Permalink
commit 15 / Model Selection complete
Browse files Browse the repository at this point in the history
  • Loading branch information
nitya committed Jan 1, 2025
1 parent 65bcaea commit ca0ea94
Show file tree
Hide file tree
Showing 20 changed files with 414 additions and 183 deletions.
39 changes: 26 additions & 13 deletions docs/2-Portal-First/1-Overview/00.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,32 @@
# 1.1 Learning Objectives
# 1.1 Learning Roadmap

!!! info "This workshop focuses on providing developers with an end-to-end workflow using the Azure AI Foundry Portal for development. It is assembled using a diverse set of resources from the official documentation."
!!! info "TThis workshop teaches you the capabilities of the Azure AI Foundry Portal with a set of interactive labs that take you from catalog (model selection) to cloud (application deployment). The labs are derived from the documentation but assembled into an end-to-end narrative for an AI Engineer journey."

This lab teaches you how to build a RAG-based copilot using the Azure AI Foundry **Portal** as the default developer environment. By completing this lab, you'll gain a complete understanding of the Azure AI Foundry Portal features and learn to do the following tasks:
---
## 1. Core Objectives

This workshop has two core objectives:

- Develop familiarity with the layout and capabilities of the Azure AI Foundry Portal (web UI)
- Learn how to build, evaluate, and deploy, a RAG-based generative AI app portal-first.

In this context, _portal-first_ means that we prioritize using the Azure AI Foundry portal for the end-to-end developer workflow. By comprison, the [Hybrid](./../../1-Hybrid-Workshop/1-Overview/00.md) approach uses the Azure AI Foundry Portal (low-code) for setup and the Azure AI Foundry SDK (code-first) for ideation and evaluation.

---

## 2. Learning Journey

By completing the labs in this workshop, you will learn to do the following:

1. **Model Selection** - use the Azure AI model catalog to discover and compare models.
1. **Project Setup** - create an Azure AI hub & project with models and connected resources.
1. **Ideation** - go from initial prompt to functional prototype using model (with & without data).
1. **Evaluation** - learn about built-in and custom evaluators, run an evaluation flow & view results.
1. **Observability** - learn about tracing and app insights, view run traces in the portal.
1. **Deployment** - go from prototype to production by deploying an app and using the endpoint.

1. **SETUP your Azure AI Foundry Project**
- create a new Azure AI project
- customize it by creating a new Azure AI hub resource
- customize it by adding an Azure AI Search resource
- customize it by adding an Application Insights resource
1. **SELECT models from Azure AI model catalog**
1. **ADD DATA to your application using the RAG pattern**
1. **EVALUATE your application using built-in evaluators**
1. **DEPLOY your application from the portal**
Along the way, we'll also understand how to orchestrate complex workflows in the portal using the currently-provided tooling (prompt flow) and a retrieval-augmented generation pattern (RAG) to improve responses by grounding them in your data.

---

??? info "BONUS → Once you've completed this exercise, try the [Hybrid Workshop](./../../1-Hybrid-Workshop/1-Overview/00.md) to get your first experience with the Azure AI Foundry SDK for a code-first development workflow."
??? quote "OPTIONAL → Once you've completed this exercise, try the [Hybrid Workshop](./../../1-Hybrid-Workshop/1-Overview/00.md) to get your first experience with the Azure AI Foundry SDK for a code-first development workflow in Python."
48 changes: 42 additions & 6 deletions docs/2-Portal-First/1-Overview/01.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,54 @@
# 1.1 Application Scenario
# 1.2 Application Lifecycle

To simplify our walkthrough, we'll use the same Application Scenario and Application Data resources defined in the [Hybrid Workshop](./../../1-Hybrid-Workshop/1-Overview/00.md) path.
## 1. Generative AI Operations

- See: [Contoso Outdoor](./../../1-Hybrid-Workshop/1-Overview/01.md#2-contoso-outdoor-chat-ui) to understand the enterprise retail application scenario.
- See: [Application Data](./../../1-Hybrid-Workshop/1-Overview/02.md) to understand customer, product & manual data formats.
When we think about the AI Engineer's journey from prompt to production, we also need to understand [the paradigm shifts in Generative AI Operations](https://techcommunity.microsoft.com/blog/aiplatformblog/the-future-of-ai-the-paradigm-shifts-in-generative-ai-operations/4254216) based on the following challenges faced by customers:

- **Complex Model Landscape** - how can I select the right model for my use case?
- **Data Quality & Quantity** - how can I discover or generate quality datasets for use?
- **Operational Performance** - how can I balance tokens, cost & performance optimization?
- **Security & Compliance** - how can I meet regulatory requirements & deliver trustworthy AI?

The result is a paradigm shift from traditional MLOps to LLMOps - and now **GenAIOps** - with focus on a _comprehensive set of practives, tools, foundation models, and frameworks_ to intergrate people, processes and platforms. The Azure AI platform offers a robust suite of tools and services to support this end-to-end developer journey, as shown below.

![GenAIOps toolchain](./../img/overview-genaiops-toolchains.png)

Let's look at how we can go from prompt to production using a **Portal-first** approach where we prioritize usage of tools and processes in the browser-based UI for a low-code experience.

---

![Contoso Chat](./../../1-Hybrid-Workshop/img/contoso-chat.png)
## 2. E2E Development Worflow

To put the labs in context, let's look at the end-to-end application lifecycle from an AI Engineer perspective. The process can be broken into three stages: _ideation_ (prompt to prototype), _augmentation_ (prototype to production) and _operationalization_ (performance optimization).

![GenAIOps toolchain](./../img/overview-genaiops-flow.png)

These stages map loosely onto GenAI Ops toolchains as follows:

1. **Ideation** = _Getting started_, _Customization_, _Prompt Management_ → prompt to prototype.
- **Augmentation** = _Evaluation_ and _Orchestration_ → prototype to production
- **Operationalization** - _Automation_ and _Monitoring_ → usage to optimization

Assume that you are building the retail copilot chat AI (backend) that can be accessed from the Contoso Outdoor UI (frontend) shown below. Your chat AI needs to do the following:
In the **Hybrid** track we used the Azure AI Foundry portal for the initial setup but prioritized the SDK for development and production stages. In **this track** we'll instead look at each of the toolchains steps with a **Portal-first** approach.


## 3. Retail RAG scenario

While we can explore the development journey in abstract, it can help to have an application scenario to contextualize and frame the discussion. For convenience, let's repurpose the same application scenario used in the **Hybrid Track** (summarized below).

!!! quote "Some labs (e.g., Model Selection) may be general-purpose and not reflect this specific scenario."

_Assume that you are building the retail copilot chat AI (backend) that can be accessed from the Contoso Outdoor UI (frontend) shown below. Your chat AI needs to do the following:_

- Answer customer queries in natural language (= generative AI)
- Give answers grounded in product data (= RAG design pattern)
- Give answers that are **also** coherent, fluent & relevant (= evaluators)
- Block customer requests that have harmful intent (= content safety)
- Block customer requests that break the rules (= jailbreak protection)

![Contoso Chat](./../../1-Hybrid-Workshop/img/contoso-chat.png)

- See: [Contoso Outdoor](./../../1-Hybrid-Workshop/1-Overview/01.md#2-contoso-outdoor-chat-ui) to understand the enterprise retail application scenario.
- See: [Application Data](./../../1-Hybrid-Workshop/1-Overview/02.md) to understand customer, product & manual data formats.

---
23 changes: 14 additions & 9 deletions docs/2-Portal-First/1-Overview/02.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
# 1.2 Azure AI Foundry Portal
# 1.3 Azure AI Foundry Portal

In this workshop track we will prioritize the use of the browser-based web UI (Azure AI Foundry portal). Before we begin, let's understand the architecture and some key concepts. Use the following resources for self-guided exploration of the docs:
In the previous section, we spoke broadly about the Generative AI Operations toolchains in Azure AI. In this section, we'll dive into more details about the **Azure AI Foundry** platform that streamlines this experience for AI Engineers and application developers.

![GenAIOps toolchain](./../img/overview-genaiops-toolchains.png)

Want to get a deeper dive into the details of the platform? Start with these two resources:

- [Azure AI Foundry Documentation](https://learn.microsoft.com/en-us/azure/ai-studio/) - canonical source.
- [Azure AI Foundry Documentation Markmap](https://markmap.js.org/full#?d=github%3Anitya%2Flearns-with-markmaps%40refs%3Aheads%2Fmain%2Fdocs%2Fazure-ai-foundry.mm.md) - interactive visualization

---


## 1. Azure AI Foundry Architecture

!!! info "UNDERSTAND THE KEY COMPONENTS OF THE AZURE AI FOUNDRY ARCHITECTURE"
!!! info "Azure AI Foundry is the recommended platform for E2E development of _customizable_ gen AI apps on Azure"

![Landing](https://learn.microsoft.com/en-us/azure/ai-studio/media/concepts/ai-studio-architecture.png)
![Landing](https://learn.microsoft.com/en-us/azure/ai-studio/media/concepts/ai-studio-architecture.png)

1. The Azure AI Foundry provides _a unified experience_ for building, evaluating, and deploying, AI models and applications on Azure.
1. The Azure AI Foundry platform provides _a unified experience_ for building, evaluating, and deploying, AI models and applications on Azure.

1. Developers can build applications end-to-end using the web portal (low-code), the SDK (code-first) or the CLI (code-agnostic) based on preferences.

Expand Down Expand Up @@ -63,7 +68,7 @@ You can accomplish these tasks from this page:

An Azure resource provider is a set of REST operations that enable functionality for a specific Azure service. _Registering_ resource providers helps you define the Azure resources you can deploy to your account (subscription).

??? info "Review this section to learn about Azure & AI resource providers _(click to expand)_"
??? info "REVIEW: Learn about Azure & AI resource providers _(click to expand)_"

A resource type's name follows the format: _{resource-provider}/{resource-type}_.

Expand All @@ -75,7 +80,7 @@ An Azure resource provider is a set of REST operations that enable functionality
The Azure AI Foundry is built on the Azure Machine Learning resource provider, and takes a dependency on several other Azure services.


??? info "Review list of REQUIRED resource providers for Azure AI. _(expand to view)_"
??? info "REVIEW: list of _required_ resource providers for Azure AI. _(expand to view)_"

1. `Microsoft.MachineLearningServices/workspace (kind=hub)` - for hub
1. `Microsoft.MachineLearningServices/workspace (kind=project)` - for project
Expand All @@ -84,7 +89,7 @@ The Azure AI Foundry is built on the Azure Machine Learning resource provider, a
1. `Microsoft.Storage/storageAccounts` - for storing artifacts
1. `Microsoft.KeyVault/vaults` - for storing secrets

??? info "Review list of ADDITIONAL resource providers useful for RAG. _(click to expand)_"
??? info "REVIEW: list of _additional_ resource providers useful for RAG. _(click to expand)_"

1. `Microsoft.Search/searchServices` - for search & retrieval
1. `Microsoft.ContainerRegistry/registries` - for registering docker images
Expand Down Expand Up @@ -114,7 +119,7 @@ Review these links to accomplish these tasks using the Azure Portal (in browser)
1. Every project **must** have a parent hub. Every hub **may** have one or more child projects.
1. Hubs are **collaboration** environments (team). Projects are **development** environments (app).

??? quote "FIGURE: Understand how AI hub, project, and services, resources interact _(click to expand)_"
??? info "FIGURE: Understand how AI hub, project, and services, resources interact _(click to expand)_"
![Landing](https://learn.microsoft.com/en-us/azure/ai-studio/media/concepts/resource-provider-connected-resources.svg)

---
Expand Down
Loading

0 comments on commit ca0ea94

Please sign in to comment.