Microsoft Azure AI Fundamentals (AI-901) Certification Course

#Azure AI Fundamentals #AI-901 Certification #Microsoft Foundry #Responsible AI #Machine Learning #Deep Learning #Generative AI #Azure AI Services #Custom Vision #Prompt Engineering #Programming
💬 Chat with this Video
Ask anything about this video…
Hey, it's Andrew Brown, your favorite cloud instructor, bringing you another free technical certification course. And this time, it's the Azure AI Fundamentals, also known as the AI-901. And I'm going to help you pass this exam uh by providing you lecture content, hands-on labs that you'll do in your own Azure accounts. And as always, I provide you a free practice exam, which you can go get over at exampro.co. And if you like the study materials that I put out, the best way to get more of them is to support the optional paid additional materials. So for this one, you can go over to exampro.co/ai-901 and get those materials and it's greatly appreciative. If you do not know me, I've taught a lot here. AWS, Azure, GCP, Kubernetes, Terraform, Nvidia, Anthropic, and more. But with that out of the way, let's go jump into the course. >> [music] >> Hey, this is Andrew and we're at the start of our journey asking the most important question first, which is, what is the Microsoft Azure AI Fundamentals? Well, it is an entry-level certification, specifically as the name says, AI Fundamentals. So it's going to cover that, uh but it's also going to take a closer look at Microsoft Foundry as well as um a suite of other Azure AI services, I believe previously called um cognitive services. Um and we might see that in the API if we carefully look. Um you do need to learn a little bit of Python, but not a lot. Um and there is a suite of uh services that are holdovers from before even uh Microsoft Foundry existed when uh Microsoft was first getting started with AI and they work really, really well. Um but the certification exam code here is the AI-901. So prior, this was the AI uh 900. And so this is my third iteration of this course. It has gotten much, much easier. So previously they wanted you to know ML Fundamentals and a bunch of other stuff. But I think what they've done is they said, okay, people just need to get uh practically started and so they've made this a practitioner's kind of a uh certification. So it's definitely a lot easier. Um it's a really good entry point uh into AI fundamentals in general because Azure is the second largest cloud service provider and a lot a lot of the content here is evergreen. It can transfer to other verticals here, so it's a good uh starting point. Um so who's the certification for? Well, consider it if you are starting your journey in AI development, you want to learn fundamentals, you are a developer or tech professional who wants to start building AI apps and agents on Azure or specifically you want to know how Microsoft Foundry and Azure AI services work. So what is the value of the certification? Well, it validates the foundational knowledge of AI concepts and Azure AI services, but it does not prove that you can build AI solutions. For technical roles like uh an AI developer, an AI engineer, maybe a Ford developer engineer, which is a more popular uh term these days, it will not be enough to obtain that technical role, but it could help uh your resume stand out. Um it does provide a foundation so that you can go build out hands-on AI projects and go to more advanced certifications. And let's talk about uh the path here after the certification. Well, before you even do the Azure AI fundamentals, make sure you do the Azure fundamentals because we are not starting from zero here. We should have some basic knowledge of Azure and I'm not going to cover that in this certification. So make a detour and do the Azure fundamentals. It doesn't take long. It's very, very useful and you really should have it uh because it gives you a lot of safe ways of working with Azure, okay? I would strongly recommend the Azure data fundamentals. Whenever you're dealing with AI, data is goes hand in hand and often it is uh 90% of the work. So um you know, I would go over to the Azure data fundamentals and learn that. Uh you can see that uh Azure has very specific certifications after this for AI. So we have the AI cloud developer and the AI app and agents developer. I believe the AI apps and agent developer is specifically for um what's called? Power Apps. It's It's like integrations with your um uh like business application tools. So, both are really good. If you are in an organization and you you're utilizing uh the Microsoft ecosystem, then Azure app and agent developer is really, really good. Um over here, I just want to uh make note that there is a cloud and AI security engineer and this is partnered with the security, compliance, and identity fundamentals. So, this one is very broad and this one here is very specific. Uh so, that might be some stuff you want to consider. Um beyond that, uh I don't really specifically recommend anything in particular at the advanced level. There is the machine learning operations, so ML Ops that you can go do. Uh that's a specialized um basically DevOps for uh machine learning. Uh but that gives you a general idea of pathing there. So, how long does it take to pass? Well, for beginners, 15 hours. For experienced uh folks, maybe 6 hours. So, somewhere in between for 8 hours. You're going to be splitting that time between the lectures and labs and practice exams. Uh even though this is not a a long course, you have to consider that you do have to rewatch videos and uh your experience will be different than than mine as Azure is extremely inconsistent in terms of routine work. Um the recommended study time here is 30 minutes to 1 hour uh for 14 days. What does it take to pass the exam? Well, watch the video lectures and memorize key information and do hands-on labs and fall within your own account. And I strongly, strongly, strongly, strongly recommend for Azure that you do this because Azure Azure's documentation often does not match implementation. And even for routine things uh that I would think that I know uh inside and out just do not work for various reasons. And so, you'll see when we do Microsoft Foundry, in the first video we do Microsoft Foundry, I run into a problem with permissions and all I was able to do was have confidence, wait, and then it eventually worked. And there was no solution that AI could provide me or online that could solve it. And that is the nature of working with Azure. Um so, understand that if you do something your own account, it doesn't work and it worked for me, then it's just the nature of Azure. But anytime I run into a problem with Azure, I want to capture that and show it to you so that you have sanity that uh you're not crazy and you are doing things correctly and that even the experts run into problems. Um I strongly recommend you do the paid online practice exams. Personally, it helps this content here and so uh we put a lot of effort here to make these certifications and we're not using AI to generate them out and we're sitting the exam. So uh help support the content here. In terms of the content outline, there are two domains. Um previously, this had like four or five domains and so now they've cut it down to two. This is really strange because you don't normally see certifications with only two, but it's fine for uh what this certification's purpose is. So it's totally fine for that regard. But you'll notice that there's a section that's specifically um conceptual. This is lecture content. And then here, it's it's basically hands-on stuff with Microsoft Foundry. And so those Azure AI services are within Microsoft Foundry and they've really rolled stuff up. Microsoft Foundry used to have a different name, Azure ML Studio. Um I don't really like the name Foundry, but uh it is what it is. And they've changed the UI like four times and um uh now it's becoming a lot more unified, so I think it's uh a lot better. But even if you have taken the AI 900 a few years ago, maybe retake this again and just get up to speed on all the changes because they like to move things around here and it can be very challenging to find where things are. Uh where do you take the exam? Well, in an in-person test center or the online convenience of your own uh home. So um Pearson VUE has authorized testing centers that it's partnered with, but Pearson VUE online is where you can do that. Um and these exams are proctored, so with a supervisor, a person who monitors students during the examination, I would suspect they use AI these days. Um [snorts] but the point is is that there's anti anti-cheat stuff there. In terms of grading, you need 700 out of 1,000, so basically 70%. I say around because technically you can fail with 70%, so make sure you aim above like 85%. Um in terms of response types, there's 40 to 45 questions, so you can get 10 to 13 questions wrong. The reason I say it's between that range is that as your exams, they don't give you a definitive amount per whatever. They give you a range of percentages, which is a bit odd, but that's just how Azure uh certifications work. Some questions are worth one point. Some questions cannot be skipped. The format questions is multiple choice, multiple answer, drag and drop, hot area, and my favorite, case studies. And we have this in the exam pro system. There's no penalty for wrong questions. The duration of the exam is 60 minutes, so one minute per question. The exam time is 60 minutes. The seat time is 90 minutes. Seat time refers to the amount of the the time that you should allocate for the exam. It includes the time to review the instructions, read and accept the NDA, complete the exam, provide feedback at the end. Often, they let you start your exam a bit earlier. So, you know, uh I would I would make sure you have time before and after so you're not stressed. If you can, go to an in-person test center. It's so much less stressful. But if you can't, uh you know, just do it from your uh from the convenience of your home and make sure your office is clear, as that can make uh things difficult for you. Uh this certification is valid forever. The certification does not expire, but even though that's the case, um you know, if if you have taken the 900 like three years or four years ago, just redo the 901 here because you will learn new things, at least where things are now. And um even for me, I have to relearn stuff and there there's a value of it, okay? But there you go. Ciao ciao. Hey folks, it's Andrew. We're taking a look at the AI 901. This is a uh new version of the 900. So the 900 here had a lot more domains. So you can see there's a bunch more, but they basically cut out the middle of it where they had a bunch of machine learning information. And so that is now gone. And then also some of the services have just been uh flattened and simplified. And so this is kind of an unusual um unusual exam guy because there's only two domains. You don't normally see just two domains. waiting for Azure to have the one domain certification. Um but you know, you kind of question as to how they are implementing stuff here. But you'll notice the split is between uh about 40 to 45% to 55 to 60%. More points on the Microsoft Foundry. This used to be called Microsoft, oh, I don't know, uh Azure uh Azure uh ML Studio. They've changed the name so many times, but now it's Foundry. Uh I don't like the name Foundry, but it is what it is. So let's take a look at what we have here. So for identify AI concepts and capabilities, so describe fairness, reliability and safety, privacy and security, inclusiveness, transparency, and accountability. Um so that stuff is just the responsible AI and it is very straightforward and it is a little bit nonsense, but we do need to learn it for the exam. We have identify AI model components configuration. So looking at how to do generative work, uh which is very straightforward. Appropriate AI models and their capabilities, uh appropriate model deployment options and configuration parameters, so choosing the right thing. So those are our options there. We have identify the AI workload, so choosing the right thing for the job. So you have computer vision, speech recognition, text analysis. This is kind of pushing into the suite of their modalities. We'll learn about the concept of modalities or uh types of inputs and outputs, okay? And then here's the big one is Microsoft Foundry. So this is their unified platform um uh uh to provide AI. So if you've ever used other providers um and their playgrounds, it's kind of like a playground, but it's a little bit more advanced than other playgrounds. Um so if you ever use the open AI uh playground, you're going to notice some things are very similar here, but there's a there's more going on here. Uh but generally these are called model as a service because they have a bunch of models from different providers and you can deploy them. Um but anyway, so here we have um implement generative AI apps for using Foundry, implement AI solutions, text and speech for Foundry, implement AI solutions and computer vision, image generation, implement AI solutions, etc. for Foundry. So these are all things that um, you know, if you've the 900, they're very similar. They just have different UIs. Uh one thing that's kind of interesting is that content understanding has been sticking around much longer than I expect. I don't know if we'll see it in the future um as it feels like a not very strong tool, but for whatever reason, it's sticking around here. Um but anyway, uh that's the exam guide and again, it's much, much easier than the 900. Um I think that they should have left in the ML classical skills, but I think that just people are uh being more practitioners and kind of not wanting to do the deep learning or they're throwing them in other exams, but that's just how it is, okay folks? Uh there you go. Hey, this is Andrew Brown and we are taking a look at the definition of what is artificial intelligence and we really want to put this against uh the terms of machine learning, deep learning and generative AI so that it is very clear uh what the differences are. Often people just say AI when they mean ML or deep learning. So understand that um these terms are uh not used correctly often, but people generally will understand what you're trying to say. So it's not a big deal if you use them out of turn, but let's make sure that we know what they are. Let's so let's first take a look here at artificial intelligence, also known as AI. These are machines that perform jobs that mimic human behavior, okay? That's the key thing here is that they are human-like or doing tasks that you'd expect a human to do. Um and that is clearly a very broad term of what is AI and so you can see why a lot of things are attributed to being AI. Then you have machine learning. And machine learning, initialized as ML, is machines that get better at a task without explicit programming. Now, of course, we have to code a machine learning model, but once we have that model and we pass things into it, it's able to complete its task with its very complex algorithms. Um so you could also just think of it as an uh it's a a a special algorithm to perform a task that would negate you the negate you having to do calculations or programming or things like that. Then we have what is deep learning? And when we think of a lot of the AI stuff, we're usually thinking of deep learning because it's these machines that have an artificial neural network inspired by the human brain to solve complex problems. So you probably have this uh you've probably seen a graphic of it of like these nodes and they're interconnected and they go through layers. That's deep learning. Uh a lot of people call that machine learning or AI, but no, that's that's DL. Then we have Gen AI. So Gen AI, which is more of a uh marketing term, but generative AI is a specialized subset of AI that generates out uh content such as images, video, text, and audio. Now, I don't have it in the graphic on the left because it's hard to say where it does go. Does it go here? Right? Because it is a subset of AI, but technically um Gen AI often utilizes deep learning. Cuz when we think of it, and my line's not drawing here today, but um when we think of it, there we go. There's the line. Is that a lot of Gen AI techniques like large language models or um or um vision models and things like that are utilizing neural networks, so it is deep learning, okay? All right, so let's take a look here at the key elements of AI. So AI is the software that imitates human behaviors and capabilities and there are key elements according to Azure or Microsoft as to what makes up AI. So let's go through this list quickly here. So we have machine learning, which is the foundation of an AI system that can learn and predict like a human. You have anomaly detection, so detect outliers or things out of place like a human. Computer vision, be able to see like a human. Natural language processing, also known as NLP, be able to process human languages and infer context, you know, like a human. Uh conversational AI, be able to hold a conversation with a human. So, you know, I wrote here according to Microsoft and Azure because, you know, the the global definition is a bit different, but I just wanted to put this here because I've definitely seen this as an exam question. And so we're going to have to go with Azure's definition here, okay? Let's define what is a data set. So a data set is a logical grouping of units of data that are closely related to or share the same data structure. And there are publicly available data sets that are used in uh learning of statistics, data analytics, and machine learning. I just want to cover a couple here. So the first is the MNIST database. So images of handwritten digits used to test, classify, cluster image processing algorithms, commonly used when learning uh how to build computer vision ML models to translate handwritten into or handwriting into digital text. So it's just a bunch of handwritten uh uh numbers and letters. And then another a very popular data set is the common objects in context COCO data set. So this is a data set which contains many common images using a JSON file COCO format that identify objects or segments within an image. Uh and so this data set has a lot of stuff in it. So object segmentations, recognition in context, super pixel stuff segmentation. They have a lot of images and a lot of objects. Uh so there's a lot of stuff in there. So why am I talking about this and in particular COCO data sets? Well, when you use um Azure Machine Learning Studio, it has a data data labeling service. And um the thing is is that uh it can actually export out into COCO format. So that's why I wanted you to get exposure to what COCO was. And the other thing is is that when you're building out Azure machine learning uh pipelines, you uh they actually have open data sets, which you'll see later in the course, um that shows you that you can just use very common ones. And so uh you might see MNIST and uh the other one there. Uh so I just wanted to get you some exposure, okay? Let's talk about data labeling. So this is the process of identifying raw data, so images, text files, videos, and adding one or more meaningful and informative labels to provide context so a machine learning model can learn. So, with supervised machine learning, labeling is a prerequisite to produce training data and each piece of data will generally be labeled by a human. The reason why I say generally here is because uh with Azure's uh data labeling service, uh they can actually do ML assisted labeling. Uh so with unsupervised machine learning, labels will be produced by the machine and may not be human readable. Uh and then one other thing I want to touch on is the term called ground truth. So, this is a property uh uh a properly labeled data set that you can use as the objective standard to train and assess a given model is often called ground truth. The accuracy of your trained model will depend on the accuracy of your ground truth. Now, using um Azure's tools, I never seen them use the word ground truth. I see that a lot in AWS and even this uh graphic here is from AWS, but uh I just want to make sure you uh are familiar with all that stuff, okay? So, let's take a look at what a feature is. So, a feature is a characteristic extracted from our unstructured data set that has been prepared to be ingested by our machine learning model to infer a prediction. So, ML models generally only accept numerical data and so we prepare our data into machine readable format by encoding, which we'll revisit later in more detail. Um so let's talk about what is feature engineering. So, feature engineering is the process of of of extracting features from our provided data sources. So, imagine you have your data sources, which you have then your raw data. You're going to clean and transform them into features, turning them into machine readable format information for your machine learning models and then, you know, you go from there, okay? So, we are going to dive into the types of machine learning in other slides in more detail, but this is just kind of an overview so that you can kind of see these terms up front. Um so we'll just quickly go through this here. And we're going to group them um based on what they're trying to do. So the first is learning problems. We have supervised, unsupervised, reinforcement. These are three terms you're going to hear quite a bit with machine learning. Uh the key thing here is that supervised is where you have labeled data and unsupervised is where you're working with unlabeled data. For reinforcement, this is an agent an agent that operates in an environment and must learn to operate using feedback. And this kind of sounds like agentic workflows or agentic coding when we're talking about GenAI, which we'll learn about later. But the idea is like imagine you wanted to make a uh a machine learning model that played the the Mario or or the Sonic video game. That'd be using reinforcement learning, okay? Then we have hybrid learning problems. So we have semi-supervised, self-supervised, multi-instance. So semi-supervised is where you have uh a mix of labeled and unlabeled data. You have a lot of unlabeled data and a little bit of label data. And so um that's kind of a a a mix between supervised and unsupervised. You have self-supervised. Um and I believe that this is where um the idea is that it can label its own data, I think. But we'll find out later on in future slides. We have multi-instance where we have um examples of unlabeled data. And so then we just kind of bag them together. Um again, we'll cover that later on. We have statistical inference. So here we have inductive, deductive, and and transductive. So using evidence to determine the outcome, you or then we have deductive, using general rules to determine the specific outcomes. And then we have transductive used uh to predict specific examples given specific uh specific things from a specific domain, okay? Then for learning techniques, we have multitask, active, online, transfer, and ensemble. So multitask is fitting a model on one data set that addresses multiple related problems. Active is the model is able to query a human operator during the learning process. Um online is using available data and updating the model before a prediction is made. Kind of sounds like RAG when we're talking about GenAI. Um but again, this is just general machine learning, right? So we have transfer model is first trained on one task and then some or all the model is used as a starting point for uh for related tasks. And then we have uh ensemble where uh two or more models are fit on the same data and the predictions from each model are combined. So yeah, we're going to see these terms again, but just trying to get it uh upfront here for you, okay? Okay, let's review it one more time. I know it's getting tiresome, but it's very important that you remember the difference between supervised, unsupervised, and reinforcement. So supervised learning is where the data has been labeled for training. It's task driven and you're making a prediction. This is when the labels are known and you want a precise outcome, when you need a specific value return. And so here we would use classification, regression as examples of supervised learning. There's more than just those two, but that's what I want you to know for now. We have unsupervised learning. Data has not been labeled. The ML model needs to do its own labeling. It is data driven. You're recognizing a structure or pattern when the labels are not known and the outcome does not need to be precise when you're trying to make sense of data. Here we have clustering, dimensionality reduction, association. Then you have reinforcement learning. So there's no data and there's an environment and an ML model generates data and many attempts to reach the goal. It this is decision driven. You have game AI, learning task, robot navigation. So hopefully that is clear and it's in your head. Um we're going to repeat these again, but it's going to be less of this um and more detail, okay? Hey, this is Andrew Brown and we're looking at the concept of a regression and this is a process of finding a function to correlate a labeled data set into a continuous variable or number. Uh so we need to predict a variable in the future such as the weather, what is it going to be next week? And so the idea is that you're going to plot your data onto a graph or vector space. Our dots are represented as vectors. Um and we're going to draw a line through it, which we call a regression line. And the point of the regression line is that is our prediction. So if this is going over time based on the temperature, um you know, uh that is how we are figuring out in the future what things are going to be. So the distance of a vector from the regression line, I'm going to just get out uh a different colored pen tool other than red, so maybe cyan. So imagine this dot here to the line, that's what we're going to call an error because the idea is that um things that are closer to the line is the prediction and things that are farther away from the line are an error from the line. So hopefully that makes sense. There are different regression algorithms used uh uh that can uh that we use to predict future variables. So we have mean squared error, uh root mean squared error, mean absolute error. And so based on the algorithm that you use to draw your line, that's going to change um the prediction, okay? Let's take a look at classification. This is the process of finding a function to divide a labeled dataset into classes or categories. So the idea here is we're going to predict a category to apply to the input data. So will it rain next Saturday? Is it going to be sunny or is it going to be raining? So the idea is uh we have our data, we're plotting it on a graph, but we're drawing a classification line that divides the dataset, okay? And the idea is that if it falls on one side, then it's sunny. If it falls on the other side, then it's raining. And so again, if you have a different type of algorithm, that's the thing that's doing the division, um it's going to have different results. So you have a a logistic regression, a decision tree, random forest. you can use a neural network, you can use a a a naive base. I always say that wrong, so I do apologize. Or you can use KNN or you can use a support vector uh machine uh or SVM. So, just understand that there could be more algorithms than this, but these are the common ones and you know, if you want to learn more about how these different algorithms will change, just look up on the internet uh what that would look like and there's definitely visualizations out there, okay? Let's talk about clustering. This is the process of grouping unlabeled data based on similarities and differences. The key word here is unlabeled. When we looked at uh um classification, that was labeled data. So, the idea here is that we're grouping based on similar user differences. So, imagine that this grouping of dots that are close together, we determine that that is Windows and this uh group of dots uh are Mac computers. And just like classification regression, you have different algorithms that are going to give you different results. And the reason why I show you these algorithm names is because when you have to do classification regression or uh clustering, uh you're going to see these names because you're going to have to choose what algorithm you want to utilize. Right now, it's not so important to uh know them, but when they are important, we will look at them uh in more detail, okay? Let's take a look at neural networks and deep learning. First defining what are neural networks. So, these are often described as mimicking the brain. You have a neuron or node that represents an algorithm. The data is inputted into the neuron and based on the output, the data will be passed to one of the many connected neurons. The connections between neurons is weighted. The network is organized into layers. There will be an input layer, multiple hidden layers and an output layer. You could technically have one hidden layer, but often you have multiple layers. If you have three or more, now we're talking about deep learning. If you have less than three, then it's just a neural network. Um and just look at the visual for you here for a moment because each node or uh neural, remember that it has its own um its own algorithm, like how it's going to process that data. And I'm pretty certain that most neural networks or the the algorithm is going to be the same for all the nodes, but we'll talk about that as we uh dig deeper into the neurons themselves. Um but then there's the concept of a feed-forward neural network, which is initialized as FNN. I don't know why it's not FFNN, but whatever. So these are neural networks where connections between nodes do not form a cycle. That means that they always move forward. So data moves forward, okay? We don't have neural networks going back and this way and that way. They're just going one direction, which is forward. Then you have back propagation. This is where after um things ran into like everything's ran through, it's going to move backwards through the neural network and adjust the weights, okay? To improve the outcome on the next iteration. So after it's ran, it actually has to update all the weights and that is back propagation. This is how a neural network learns. It has to do back propagation. Okay? Then we have uh a loss function. So it's a function that compares the ground truth to the prediction to determine the error rate. So how bad the network performed. Ground truth, right? Is data that is labeled that you know to be correct, okay? Now we are talking about how these neurons are going to have their own algorithm, right? Cuz up here we say that uh it represents an algorithm. So this is where we have these um algorithms which we call activation functions. So an activation function is an algorithm applied to a hidden layer node. It's one of these things right here. Let me just get my pen out again. One of these that affects the connected output. And so an example of that would be R E L U or Relu. I don't know how to pronounce it properly, but I recognize it. Uh but we will be looking at activation functions when we look at neurons a bit uh uh uh a bit soon here. Um there's the concept of dense. So when the network layer increases the amount of nodes, we call it more dense. Uh and when the layers decrease the the amount of nodes, we call it sparse. Okay? So when we see an increase, it's dense. If it's decreasing, it's sparse. Um and for deep learning algorithms, we have supervised and unsupervised, just like with classical machine learning. Um and so on the supervised side, we're going to see things like uh FNN, RNN, CNN. So you are passing in labeled data for this to work. For unsupervised learning, we have uh DBNs, SAEs, RBMs. And not important to really remember this, but I just wanted you to know that they have supervised and unsupervised learning um uh for for deep learning, okay? Let's take a look at what a machine learning model is, but before we do that, let's define what a model is in general terms. So in general terms, a model is information representation of an object, person, or system. Models can be concrete, so they have a physical form. Think a design of a vehicle, a person posing for a picture. Then you have abstract, so express as behavioral patterns. Think mathematical, computer code, written words. So what is a machine learning model then? An ML model is a function that takes uh in data, performs a machine learning algorithm to produce a prediction. The machine learning model is trained, not to be confused with the training model, which is learning to make correct predictions. Uh an ML model can be the training model that is just deployed once it has been tuned to make good predictions. So normally have training data, let's say labeled data, and here you are going to have your learning algorithm and you're going to put it through training. So that's your training model. And then you have hyper tuning where you are continuously tweaking the model to get it to where you want it to be. Okay? Then once you deploy the model, that is your trained model, your machine learning model, which can go and produce predictions. Um and from here you could then provide it unlabeled data because, you know, its goal is to make predictions and that could be labeling data or doing other things, okay? And we call uh uh uh the interaction with the deployed machine learning model inference, right? So when you are inferring something, you are providing you're providing data and saying, hey, can you uh make a prediction for me? And that's what inference is, okay? All right, let's get a uh easy introduction into machine learning pipeline. So this one is definitely not an exhaustive one and we're definitely going to see more complex ones uh throughout this course, but let's get to it here. So starting on the left hand side, we might start with data labeling. This is very uh important when you're doing supervised learning because you need to label your data so the ML model can learn by example during training. Uh this stage and the feature engineering stage are is considered preprocessing because we are preparing our data to be trained for the model. Uh when we move on to feature engineering, the idea here is that ML models can only work with numerical data, so you'll need to translate it into a format that it can understand. So extract out the important data that the ML model needs to focus on, okay? Uh then there's the training step. So your model needs to learn how to become smarter. It will perform multiple iterations getting smarter with each iteration. Uh you might also have a hyperparameter tuning uh step here. Uh it says tuning, but it should say tuning. Um but the ML model can have different parameters, so you can use ML to try out many different parameters to optimize the outcome. When you get to deep learning, it's impossible to tweak the parameters by hand, so you have to use hyperparameter tuning. Then you have serving, sometimes known as deploying. Uh but you know, when we say deploy, we talk about the entire pipeline, not necessarily just the the ML model step. So, we need to make an ML model accessible, so we serve it by hosting it in a virtual machine or container. Uh when we're talking about Azure um machine learning, it's either going to be an Azure Kubernetes service or Azure container instance. And you have uh inference. So, inference is the active request uh of requesting to make a prediction. So, you send your payload with either CSV or whatever, and you get back the results. You have a real-time endpoint and batch processing. So, real-time is just there they can batch can be real-time as well, but generally it's slower. But the idea is that do I am I making a single item prediction or am I giving you a bunch of data at once? And again, this is a very simplified ML pipeline. I'm sure we'll revisit an ML pipeline later in this course. So, what is inference? Inference is the active requesting getting a prediction. And when we're talking about it in the context of machine learning, we're inputting data into a machine learning model that has been deployed for production use to then output a prediction. So, imagine our raw data is a banana and we tell we say tell me what this is to the machine learning model. It's going to bring back information, so it's saying it's a yellow banana and it has a confidence score of 0.9. So, if we talk about the inference textbook definition, it's steps in reasoning or moving from premise to logical consequence, but I think that it's easier to remember it as the active requesting and getting a prediction, okay? So, let's compare the uh the terms forecasting and prediction. So, forecasting, you make a prediction with relevant data. It's great for analysis of trends, uh and it's not guessing. And when you're talking about prediction, this is where you make a prediction without relevant data. You use statistics to predict future outcomes. It's more of guessing and it uses decision theory. So imagine you have a bunch of data and the idea is you're going to infer from that data, okay, maybe it's A, maybe it's B, maybe it's C. And for prediction, you don't have really much data, so you're going to have to uh kind of invent it. And the idea is that you'll figure out what the outcome is there. These are extremely broad terms, but you know, just so you have a high level view of these two things, okay? So what are performance or evaluation metrics? Well, they are used to evaluate different machine learning algorithms. The idea is uh, you know, when your machine learning makes a prediction, these are the metrics you're using to evaluate to determine, you know, is your ML model working as you intended? So for different types of problems, different metrics matter. This is absolutely not an exhaustive list. I just want you to get you exposure to these uh words and things uh so that when you see them, you go, okay, I'll come back here and refer to this. Uh but lots of these you just it's not it's not necessary to remember, but classification metrics you should know. So classification, we have accuracy, precision, recall, F1 score, ROC and AUC. For regression metrics, we have MSE, RMSE, MAE. Ranking metrics, we have MMR, DCG, NDCG. Statistical metrics, we have correlation. Computer vision metrics, we have PSNR, SSIM, IOU. NLP metrics, we have perplexity, BLEU, METEOR, ROUGE. Deep learning related metrics, we have inception score. I cannot say this person's name, but or I'm assuming it's a person, but uh this inception distance. And there are two categories of evaluation metrics. We have internal evaluation, so metrics used to evaluate the internals of an ML model. So accuracy, F1 score, precision, recall. I call them the famous four used in all kinds of uh models. And it uh external evaluation metrics used to evaluate the final prediction of an ML [snorts] model. So yeah, uh don't get too worked here. I know that's a lot of stuff. Uh the ones that matter we will see again, okay? Let's talk about Jupyter. So, Jupyter Notebook is a web-based application for authoring documents that combine live code, narrative text, equations, and visualizations. And before it was called Jupyter Notebook, it was known as IPython IPython's Notebook. And Jupyter Notebooks were overhauled and then turned into an IDE called JupyterLab, which we'll talk about here in a moment. But you generally want to open notebooks in labs. Um and the lag the legacy web-based interface is known as Jupyter Classic Notebook. And to be honest, I get confused between JupyterLab and Classic. I think most things that use these days are JupyterLab. Um but the confusion is because we just call them notebooks, even though Jupyter Classic Notebook is the note nope the uh the older one, and the newer one is JupyterLab. Let's go take a look at JupyterLab. So, JupyterLab is the next generation web-based user interface. Uh it has all the similar features as the classic Jupyter Notebook in a flexible and more powerful user interface. So, it has notebooks, terminals, text editor, file browser, uh rich outputs. And the way you I think that you know that you're using a JupyterLab is that it will have this uh these tabs here on the side and a bunch of functionality. So, JupyterLab will eventually replace the classic uh Jupyter Notebook. And that's kind of true because um but not fully because in some places I do come across classic notebooks launching them up. Um but for the most part, functionally, it has been replaced. Then we have JupyterHub. So, JupyterHub is a server to run JupyterLabs for multiple users. It's intended for a class of students, a corporate data science group, scientific research groups, and so it has some components uh underneath. You will come across notebook-like experiences that are like JupyterLabs. So, some companies will um extend the functionality it. One example is Sagemaker uh Studio Classic. For whatever reason, AWS um spent all this time creating extensions and extending JupyterLab, and then they decided uh no, we're not going to have extensions anymore, and we're just going to use the vanilla version. Um but uh there's also things like VS Code that has notebooks or Code Lab that have notebooks. And VS Code is like its own kind of notebook thing. It's not JupyterLabs, but it's JupyterLab compatible. So just understand that you will come across things that are notebooks that look like JupyterLab, but they're not necessarily JupyterLab, okay? What is a GPU? Well, it's a general processing unit that is specially designed to quickly uh render high resolution images and videos concurrently. GPUs can perform parallel operations on multiple sets of data, so they are commonly used for non-graphical tasks such as machine learning and scientific computation. So a CPU has an average of 4 to 16 processor cores. A GPU can have thousands of processor cores. So something that has 48 GPUs could have as many as 40,000 cores. Here's an image I grabbed right off the Nvidia website. And so it really illustrates uh very well uh like uh how this would be really good for uh machine learning or uh uh neural networks because neural networks have a bunch of nodes. They're very repetitive tasks. If you can spread them across a lot of cores, that's going to work out really great. So GPUs are suited uh for repetitive and highly parallel computing tasks such as rendering graphics, cryptocurrency mining, deep learning, and machine learning. We're talking about CUDA before we can. Let's talk about what Nvidia is. So Nvidia is a company that manufactures graphical processing units for gaming and professional markets. If you play video games, you've heard of Nvidia. So what is CUDA? It is the compute unified device architecture. It is a parallel computing platform and API by Nvidia that allows developers to use CUDA enabled GPUs for general purpose computing on GPUs, so GPGPUs. All major deep learning frameworks are integrated with NVIDIA deep learning SDK. The NVIDIA deep learning SDK is a collection of NVIDIA libraries for deep learning. One of those libraries is the CUDA deep neural network library, so cuDNN. So CUDA or cuDNN provides highly tuned implementations for standard routines such as forward and back convolution. Convolution is really great for um uh computer vision, pooling, normalization, activation layers. Uh so, you know, in the Azure certification for the AI-900, uh they're not going to be talking about CUDA, but if you understand these two things, you'll understand why GPUs uh really matter, okay? So to understand anomaly detection, let's define quickly what is an anomaly. So an abnormal thing that is marked by deviation from the norm or standard. So anomaly detection is the process of finding outliers within a data set called an anomaly. So detecting when a piece of data or access patterns appear suspicious or malicious. So use cases for anomaly detection can be data cleaning, intrusion detection, fraud detection, system health monitoring, event detection and sensory or sensor networks, ecosystem disturbances, detection of critical and cascading flaws. Uh anomaly detections by hand is a very tedious process, so using ML for anomaly detection is more efficient and accurate. And Azure has a service called anomaly detector, detects anomalies in data to quickly find uh quickly identify and troubleshoot issues. So computer vision is when we use machine learning neural networks to gain high level understanding of digital images or videos. So for computer vision deep learning algorithms, we have convolutional neural networks. These are for image and video recognition. They're inspired after how the human eye actually processes information and sends it back to the brain to be processed. You have recurrent neural networks, RNNs, which are generally used for handwriting recognition or speech recognition. Of course, these algorithms have other applications, but these are the most common use cases for them. For types of computer vision, we have image classification, so look at an image or video and classify its place in a category. Object detection, so identify objects within an image or video and apply labels and location boundaries. Semantic segmentation, so identify segments or objects by drawing pixel masks around them. So great for objects in movement. Image analysis, so analyze uh an image uh or video to apply descriptive context uh labels. So maybe an employee is sitting at a desk in Tokyo would be uh something that image analysis would do. Optical character recognition or OCR, find texts in images or videos and extract them into digital text for editing. Facial detection, so detect faces in a photo or video and draw a location boundary uh and label their expression. So for computer vision, to some things around Azure or Microsoft services, there's one called Seeing AI. It's an AI app developed by Microsoft for iOS. And so you use your device camera to identify uh people and objects and the app is audibly describes those objects for people with visual impairments. It's totally free if you have an iOS app. I have an Android phone, so I cannot use it, but I hear it's great. Some of the Azure computer vision service offerings is computer vision, so analyze images and videos and extract descriptions, tags, objects and texts. Custom vision, so custom uh image classification, object detection models using your own images. Face, so detect and identify people and emotions in images. Form Recognizer, so translate scanned documents into key value or tabular editable data. All right, let's take a look at image generation. So this uses a generative model to create new images from a prompt. Um very likely you folks have used it before, but we will just make sure we explain it nicely and clearly. So in Microsoft Foundry, you can select an image generation model and test it in the images playground. Some models can also use an existing image as an input for edit. So the idea is you make a prompt. So create a playful cartoon of the sushi riding a tiny train past Mount Fuji with cherry blossoms in the background. So here we can use GPT image 2.5 in Microsoft Foundry. I believe 2.6 is out right now, but uh this is what I'm using here. And so we get a cute image of uh well, sushi riding. So nothing super complicated there, but image generation creates new visuals. Image analysis interprets existing ones. So understand that there is a difference there. And why don't you generate your own sushi uh riding train cuz that's fun. So natural language processing, also known as NLP, is machine learning that can understand the context of a corpus, corpus being a body of related text. So NLPs enable you to analyze and interpret text within documents and email messages, interpret or contextualize spoken tokens. So for example, maybe customer sentiment analysis, whether a customer is happy or sad, synthesize speech, so a voice assistance uh assistant talking to you, automatically translates spoken or written phrases and sentences between languages, interprets broken or written commands and determine appropriate actions. A very famous example for a voice assistant specifically or virtual assistant for Microsoft is Cortana. Uh it uses the Bing search engine to perform tasks such as setting reminders and answering questions for the user. Uh and if you're on a Windows 10 machine, uh it's very easy to activate Cortana by accident. Uh when we're talking about Azure's MLP offering, we have text and analytics. So sentiment analysis to find out what customers think. Find topic uh topic relevant phrases using key phrase extraction, identify the language of the text with language detection, detect and categorize entities in your text with named entity recognition. For translator, we have real-time text translation, multi-language support. Uh for speech service, we have transcribe audible speech into readable searchable texts. And then we have language understand uh understanding, also known as Lewis. Uh natural language processing service that enables you to understand human language in your own application, website, chatbots, IoT device and more. When we talk about conversational AI, it usually generally uses NLP. So that's where you'll see that overlap next, okay? Okay, let's talk about information extraction. So this finds specific facts and content and turns them into data an app can use. So imagine you have an invoice and um in that invoice we are going to provide it along with a prompt to a model. And so we're saying extract the vendor, invoice number, the date in a very specific format, the customer, uh the total from this invoice and return only JSON. So that's what we want to extract out of the invoice here to secure supplies. Um and so we're going to feed both those things into a model like GPT-6.1 as an example and we'll get uh back from it an output as JSON, okay? So here you can see the vendor, invoice number, etc, etc. And so the results contain specific invoice fields in a format the application can use. Um when it comes to getting JSON back, sometimes you have to provide a very specific schema, but often you can just say return only JSON and newer models are pretty good at it. But the key thing to understand here is what is information extraction? It's when you ask specifically for information to be extracted out of something and specifically in this case, it could be a document and it or it could be an image. Uh so we'll just pretend that this is an image in this case as GPT-6.1 can take images, PDFs uh or text uh and output stuff. But there you go. All right, let's just make sure we understand the difference between generative and agentic AI as these terms sound very, very similar and so it just helps to clarify them. So generative AI creates content, whereas agentic AI uses models and tools to complete tasks. So let's do the comparison. So generative AI is often a single turn, um and agentic AI is multi-turn. Generative AI generally does not have an agentic loop, whereas agentic AI has an agentic loop. Um generative AI does not external tools, whereas agentic AI does use external tools. Uh generative AI is single output type, whereas um well, agentic AI can have uh multiples. Usually it's uh text, but it can have multiple modalities. And so I do need to put an asterisk on this because newer generative models, um newer generative models like uh GPT image 2.5 and um let's say Meta Muse 1.0. These models actually you can have a conversation with them. So prior models were basically like single shot. You had to get it perfect the first time. You couldn't really have an iteration. Um and so there's always exceptions to it in variations, but generally it helps to think of generative AI models as not having a long conversation or having a gentic loop. Um but there you go. Let's take a look here at conversational AI, which is technology that can participate in conversations with humans. So we have chatbots, voice assistants, and interactive voice recognition systems, which is like the second version to interactive voice response systems. So you know when you call in and they say press these numbers, that is a response system and a recognition system is when they can actually take human uh speech and translate that into action. So the use cases here would be online customer support replaces human agents for uh for replying about customer FAQs, maybe shipping questions, anything about customer support. Accessibility, so voice operate UI for those who are uh visually impaired. HR processes, so employee training, onboarding, updating employee information. I've never seen it used like that, but that's what they say is a use case. Healthcare, accessible, affordable healthcare. So maybe you're doing a claim process. I've never seen this, but maybe in the US where you do more of your claims and everything is privatized, it makes more sense. Internet of things, so IoT devices. So Amazon Alexa, Apple Siri, Google Home, and I suppose Cortana, but it doesn't really have a particular device, so that's why I didn't list it there. Computer software, so autocomplete search on phone or desktop. So that would be Cortana, something it could do. Uh for the two services that are around conversational AI for Azure, we have Q&A Maker. So create a conversational question and answer bot from your existing content, also known as a knowledge base. And Azure Bot Service, intelligent serverless bot service that scales on demand, used for creating, publishing, managing bots. So uh the idea is you make your bot here and then you deploy it with this, okay? All right, let's compare AI versus generative AI. First starting with AI. So what is AI? It is computer systems that perform tasks typically requiring human intelligence. This includes problem solving, decision making, understanding natural language, recognizing speech and images. Um and the AI's goal is to interpret, analyze and respond to human actions to simulate human intelligence in machines. And I create a large emphasis on the word simulate because it's not emulating. So simulate is where we are mimicking aspects or resembling the behaviors of humans or other things. Emulation is when we're actually replicating exact processes in machines. It's the real virtualization of the the human mind. And you could say that's pretty much AGI, so the artificial general intelligence, but um the point is is that AI is a simulation, not an emulation. AI applications are vast and includes areas such as expert systems, natural language processing, speech recognition, robotics and more. Um for industries, it's across the board. If you're talking about B2C, everyone's probably experienced a customer service chatbot. I hate them, but that is uh probably the number one use for uh gener or AI. Uh we have e-commerce, so recommendation systems. So think like using Amazon and maybe it's using AI there and you're not aware of it. Uh autonomous driving vehicles, uh medical diagnostics. So lots of verticals there for different industries. Let's talk about generative AI. So generative AI is a subset of AI focusing on creating new content data that is novel and realistic. It can interpret or analyze data, but also generates new data itself. It often involves advanced machine learning techniques. So we got our GANs, our VAEs, our GPTs, like the transformer models. And we're going to be talking about transformers, not uh autobots and decepticons, but actual uh architecture for LLMs. I really should throw in some uh some of those if they weren't copyright, I would have them in there. Uh Generative AI has multiple modalities. And if you never heard the word modalities, think of it like senses. You know, you have vision, you have touch, you have taste, things like that. So for Gen AI, we have uh things for vision, for text, for audio, right? Uh and there are some odd ones like molecular. So something that generative AI can do is it can do a a drug discovery via uh genomic data. Hopefully I'm saying that correctly. Um and a lot of people associate generative AI with large language models, which generate out human like text. It is a subset of Gen AI, but it's often conflated with being AI due to it being the most popular and developed. And it has strong correlation to the text modality because they usually do that. But um uh large language models can be multimodal, uh meaning that they can work across multiple modalities, but it's mostly text. So let's just sum this up and make sure we know the distinction between AI and Gen AI. So AI is focused on understanding decision making. Gen AI is about creating new and original outputs. That doesn't mean that Gen AI can't do the the former, but it has that added benefit of generation. For data handling, it AI analyze analyzes and make decisions based on existing data. Gen AI uses existing data to generate new data and unseen outputs. For applications, um AI is generally more applicable because, you know, it just is. Whereas Gen AI is very focused on creative uh uh innovative generation of synthetic stuff. Um and I that M threw me off there. It's not supposed to be there, but I think you understand the distinction between the two and there you go. Hey, this is Andrew Brown and we are taking a look at what is a foundational model. So, a foundational model is a general purpose model that is trained on vast amounts of data. We say that a foundation model is pre-trained because it can be fine-tuned for specific tasks. So, just remember we are training the model and we're going to say that it's a pre-trained model, but imagine text, images, video, structured data, all sorts of data, massive and massive amounts of data that is going to produce your foundational model. And from that foundational model, it could do all sorts of things, prediction, classification, text generation. It might be limited to very specific things that it can do, but the point is is that it can do a lot of things. Um and the reason I want to bring up foundational model is because you hear it a lot when we're talking about LLMs and it becomes a bit confusing how to distinguish it between LLMs and a foundational model. But LLMs are a specialized subset of foundational models. They are foundational models that uses transformer architecture. So, if you remember that, that LLMs are foundational models, but they're specifically using the transformer architecture, then that will help make a whole lot of sense, okay? Let's talk about large language models. This is going to be short. Even though there's a lot you can say about it, I just want you to uh remember a key thing about large language models. So, a large language model is a foundational model that implements the transformer architecture. And we're going to spend a bit of time learning about the transformer architecture in upcoming videos. But uh the idea is that um you have natural language. I'm going to get my pen tool out here. So, we have natural language as our input. It goes to the large language model. It predicts uh output for words and as it produces each word, it feeds it back in and continues um to produce until it is done. So during the training phase, the model learns semantics or patterns of language such as grammar, word usage, sentence structure, style and tone. That's what makes it so good at at uh interpreting uh uh language and giving things that sound with uh uh language understanding because it has that ability to uh understand the semantics of language. It would be simple to say that LLMs just predicts predict the next sequence of words because as you use the model, it outputs a word on the end of it and keeps feeding it in and and in and in and in till it's done. But the honest truth is researchers do not know how LLMs generate their outputs because there are so many layers uh and there's so much going on there that at this point right now, the level of complexity makes it very difficult to truly understand how it is reasoning its output. Um but it looks like it's just doing word for word, but there is a bit more to it, okay? But there you go. The transformer architecture was developed by researchers at Google that is effective at natural language processing due to multi-head attention and positional encoding and here is that architecture. It comes from that white paper, attention is all you need because that is the special mechanism that it is utilizing to pull off the feats that it is doing. Um I try to remember what came before it. It was like CNNs and RNNs, so convolutional uh neural networks and uh recurrence neural networks. And recurrence neural networks could kind of do what transformers do, um but they just had an issue with scaling and being able to remember everything that they were looking at. And so this architecture found a way to do that, and that was with positional encoding and multi-head attention. How important is it to know this architecture? Um, it's good it's nice to know so you get a bit of an experience in terms of what's going on there, but to be honest, working with um LLMs constantly, it's just like you kind of forget about this and so it doesn't really inform any of your workflows or decisions. I guess it's just more like by looking at this uh you have more confidence at reading white papers, right? And and looking at some of the stuff of these architectures. So that's why we're looking at it. But transformer architectures are made up of two components or two parts. We have an encoder and that's you can get my pen tool out here so it's very clear what we're looking at. But it's this thing here, right? So that is uh our encoder. I'm just going to erase that there and so you can get the idea that the one on the right is going to be our decoder. But let's read about what the encoder is. So it reads and understands the input text. It's like a smart system that goes through everything it's been taught and picks up on the meanings of words and how they're used in different contexts. So that's the high level. And then the decoder, based on what the encoder has learned, this part generates new pieces of text. It's like a skilled writer that makes up sentences that flow well and make sense. And uh as far as I understand that once you're uh you put your data in here, it comes through here, right? Uh and it has to be already embedded. And then once it goes through here, it's uh it's going to output uh that um that stuff and it's going to go into here. And then each word as it iterates through, it's going to go through here. Each word's going to go here. It's going to produce your sentence with the next word and it's going to go all the way down here and then add the next word and then feed all of this back in and again and again and again. So it's just going to keep looping uh until it runs out of um ability to write or it decides to stop. Um and there are very specific components that we're going to look at, multi-head attention and the positional encoding. So we didn't really describe them here, but there they are and you'll see them up close here in just a moment, okay? So tokenization is the process of breaking data input and in most cases text into smaller parts. So here on the right hand side, imagine you have a string and you're going to break it up into its parts, uh which we represent as an array here. And then we're going to give it a unique ID to the model's vocabulary. So when we're working with LLMs, you have to tokenize inputs and depending on what LLM you're using, it's going to use a different tokenization algorithm. So for example, if you're using GP uh GP3, you'd be using byte pair encoding. If you're using Bert, you'd be using word piece. If you're using Google T5 or or or GPT 3.5, you use sentence piece. You won't really notice this when working with LLMs, especially if you are uh utilizing something like Olama or a managed service because um these APIs are taking care of this um algorithm for you. So you just input it and it works there. But when you're working with um LLMs, the input text must be converted or tokenized into sequence of tokens that match the model's internal vocabulary. What are we talking about when we say internal vocabulary? Well, when an LLM is trained, it's creating an internal vocabulary of tokens of all the stuff that it knows, right? Because if you consume uh the the world's knowledge, uh you want to take all that knowledge, that text, break it down into all its unique components, tokens, and then assign a value to it. And so these large models could have between 30 to 100,000 tokens. It could even be more than this or less depending on your model. But tokenization is very important so that it understands uh what's going on here. There are some things that we could talk about, like what happens when it uh uh encounters a token it doesn't know, but for most part um this is tokenization that you need to know, okay? Let's talk about tokens and capacity because it really matters um about how much you can produce. So, when using Transformers, the decoder continuously feeds the sequence of tokens back in as the output to help predict the next word in the input. So, what are we talking about here? So here, imagine we have our input as the quick. And so we feed it into the encoder. The encoder is going to produce um semantic context so that the decoder knows what to do with that text and then the decoder is going to output the next word. So it says the quick brown and what it does is it feeds that sequence of tokens back into the decoder and produces the next word and again and again. And so the question is what is the capacity required to run this? And so there are two components that we care about, memory and compute. So for memory, each token in a sequence requires memory. So as the token count increases, the memory increases. The memory usage eventually becomes exhausted and you cannot produce anymore, okay? So now for compute, models uh a model performs more operations for each additional token. The longer the sequence uh is is, then the more compute is required. So a lot of AI services that offer models as a service will often have a limit, a combined input and output because it really has to do with the uh the length of the sequence. So if you have a huge input, then you're not going to be able to generate a lot of words because you're going to hit that uh sequence token limit um a lot quicker. So hopefully that makes it very clear about how memory and compute are uh intertwined with tokens. Um the way cost gets down is, you know, they have to figure out a way of reducing or making the model more efficient. So that's helping to reduce the memory compute. Um there's other things you can do. So if you have a conversation it gets too long, what you can do is summarize the conversation um and feed it back into there. So it it doesn't exactly use all of the context of what it had before, but it can do something similar and help that conversation along, okay? So what are embeddings? Well, before we can answer that, we need to answer what is a vector? So a vector is an arrow with a length and direction. Um that is the simplest explanation. If you're talking to a mathematician, they're going to have a more fancier explanation. But the reason why this matters is that a vector needs to exist in a vector space. Um and so what is a vector space model? It represents text documents or other types of data as vectors in a high dimensional space. So right now we're uh only looking at a a 2D axis, but in reality this would be in at least a 3D axis. But the idea is that we have these documents and these documents represent some form of data and they are plotted onto our into our vector space uh with distances between them, okay? And the thing is the distance between these other documents are going to correlate the relationship with them. So maybe these documents up here, I'm going to get my pen out here. Maybe all these things have to do something with um let's say vegetables and these ones all have to do with um uh let's say meat and this is dairy products over here. So the way these things are organized on the um in the vector space is really dependent on the type of embedding you use. So what are embeddings? These are vectors of data used by ML models to find relationships between data. And you'll find that often you're going to be using a machine learning model to create embeddings. And there's specialized um uh machine learning models just for embedding. So you'll see something like Cohere, which is a company that produces um or creates their own ML models. They'll have like command R, but they'll be like command R embeddings. And what it does is it takes an input and it outputs embeddings to be placed into a vector store. So different embedding algorithms capture different kinds of relationships. And so it could be the relationship could be uh similarity in words in terms of the way they are spelled, or it could be the length of a word, uh or the the relationship could be contextual, which is like um, you know, is the context uh related to a specific industry or vertical? So the embedding is going to change uh the relationship that is going to be um projected into that vector space. And these um ML models that produce embeddings are looking at not just like a single relationship, like let's say length of word, but multiple relationships and correlating that to put it into vector space. You can think of embeddings as external memory for performing a task for machine learning models. Embeddings can be shared across models, which uh would give us a multi-model pattern to help coordinate a task between models. But um yeah, there you go. Positional encoding is a technique used to preserve order of words when processing natural language. Transformers need positional encoders because they do not process data sequentially and would lose order of understanding when analyzing large bodies of text. The precursor to transformers is um RNN, so uh recurrence neural networks. They operated in uh sequential order so they could retain the order of words. However, uh it made it hard to scale and to uh remember a large amount of words uh to a point. So, positional coding is a way to fix that. In the architectural diagram for transformers, you'll see positional coding right after embeddings. In this architectural diagram here, we have uh positional codings up here. So, the idea is we have our input, it gets tokenized, um turned into tokens, then embedded into embeddings. It's going to go to the positional encoding where it inserts those uh points. And then we're on to our transformer here. Okay. But let's take a look at the input a bit closer. So, imagine you have each of those words or those tokens, you're going to give them a positional vector and that's how it's going to keep track of words as it's getting mangled uh and interpreted through the whole architectural uh diagram. Okay? Let's take a look at attention. So, attention figures out how each word or token in a sequence is important to other words within that sequence by assigning them word weights or token weights or attention weights, if you will. Um so, I want to talk about three types of attention. We have self attention, cross attention, and multi-head attention, and some of these are combined. You'll see that in a moment. But let's talk about the first one. Self attention computes attention weights within the same input sequence where each element attends to all other elements. And when you see this, it basically means that as attention happens, it keeps feeding uh itself right back into itself, the same sequence. So, used in transformers to model relationships in sequences, so words in a sequence. You have cross attention computes attention weights between two different sequences, allowing one sequence to attend to another sequence. This is used in tasks like translation where the output sequence decoder needs to focus on the input sequence encoder. We have multi-head attention, so combine multiple self attention or cross attention in parallel each focusing on different aspects of the input. Um so using transformers to improve performance and capture various dependencies simultaneously. So how can we look at this in a practical way for our uh architecture for the transformers? So here you can see that in blue where it says multi-headed self attention. It's multi-headed because it's receiving multiple inputs. You see V, K, uh Q. And um I believe that the Q is like for query, K is for key and V is for value. It has something to do with like how search engines think kind of like if you were to if you were to let's say use YouTube and you were to type in a query there, it would match it to keys which would then return you back a value. So that is the best description I can give for it. It's self attention because it feeds back uh its own sequence. It's going to be the same back and forth um there. On the other side we have multi-headed uh cross attention. So it's multi-headed because it's receiving multiple inputs. So we have the V, K, Q. But it's cross attention because it feeds sequences uh sequence inputs from two different sources. Remember it says that um uh cross attention's two different sequences. Well we have V and uh K coming from the encoder and then we have Q which is actually coming from the decoder. So it's cut off here but the idea is that the decoder is feeding itself right back into itself and it goes through here into this uh one here and then we get the Q and it goes right there, okay? So again, it's not super important to remember this stuff. It's just to get you a bit of exposure to looking at these architectural diagrams and to see that there is a way to understand them. Uh but they can get very involved and it might be very hard to retain that information unless you are um actually very invested in understanding and building these things, okay? Let's take a look here at responsible AI, which focuses on ethical, transparent, and accountable uses of AI technology. Microsoft puts into practice responsible AI via its six Microsoft AI principles. This whole thing is invented by Microsoft. Uh and so, you know, it's not necessarily a standard, but it's something that Microsoft is pushing hard to uh have people adopt, okay? So, the first thing we have is fairness. So, this is an AI system which should treat all people fairly. We have reliability and safety. An AI system should perform reliably and safely. Privacy and security. AI systems should be secure and respect privacy. Inclusiveness. AI systems should empower everyone and engage people. Transparency. AI systems should be understandable. Accountability. People should be accountable for AI systems. And we need to know these in uh uh greater detail. So, we're going to have a a short little video on each of these, okay? The first on our list is fairness. So, AI systems should treat all people fairly. So, an AI system can reinforce existing social societal uh stereotypical bias uh can be introduced uh during the development of a pipeline. So, an AI system uh that are used to allocate or withhold opportunities, resources, or information uh in domains such as criminal justice, employee employment and hiring, finance, and credit. So, an example here would be an ML model designed to select a final applicant for a hiring pipeline without incorporating any bias based on gender, ethnicity, or may result in unfair advantage. So, Azure ML can tell you how each feature can influence a model's prediction for bias. Uh one thing that could be of use is Fairlearn. So, it's an open source Python project to help data scientists to improve fairness in the AI systems. At the time of I made this course, a lot of their stuff is still in preview. So, you know, it's the fairness component is it's not 100% there, but it's great to see that they're getting that along, okay? So, we are on to our second AI principle for Microsoft, and this one is AI systems should perform reliably and safely. So, AI software must be rigorously tested to ensure they work as expected before released to the end user. If there are scenarios where AI is making mistakes, it is important to release a report quantified risks and harms to end users so they are informed of the shortcomings of an AI solution. Something you should really remember for the exam, they'll definitely ask that. AI where concern uh for reliability safety for humans is critically important. Autonomous vehicles, uh health diagnosis and suggestions prescriptions and autonomous weapon systems. They didn't mention this in their content and I was just like doing some additional research research. I'm like, yeah, you really don't want mistakes when you have automated weapons or ethically you shouldn't have them at all, but hey, that's uh that's just how the world works. But yeah, this is this category here. We're on to our third Microsoft AI principle. AI systems should be secure and respect privacy. So AI can require vast amounts of data to train deep machine ML models. The nature of an ML model may require personally identifiable information, so PIIs. Uh it is important that we ensure protection of user data that it is not leaked or disclosed. In some cases, ML models can be run locally on a user device so their uh PIIs remain on their device avoiding the the vulnerability. This is called this is like edge computing. So that's the concept there. AI security principles to check malicious actors, so data origin and lineage, data use internal versus external, data corruption considerations, anomaly detection. So there you go. We're on to the fourth Microsoft AI principle. So AI systems should empower everyone and engage people. If we can design AI solutions for the minority of users, they can design AI solutions for the majority of users. So when we're talking about minority groups, we're talking about physical ability, gender, sexual orientation, ethnicity, other factors. This one's really simple. Uh in terms of practicality, it doesn't 100% make sense because if you've worked with um uh groups that are deaf and blind developing technology for them, a lot of times they need specialized solutions. Uh but the approach here is that, you know, if we can design for the minority, we can design for all that is uh the principle there. So that's what we need to know, okay? Let's take a look here at transparency. So AI systems should be understandable. So interpretability and intelligibility is when the end user can understand the behavior of UI. So transparency of AI systems can result in mitigating unfairness, help developers debug their AI systems, gaining more trust from our users. Those builds a uh those who build AI systems should be open about why they're using AI, open about the limitations of the AI systems. Adopting an open source AI framework can provide transparency, at least from a technical perspective, on the internal workings of an AI system. We are on to the last Microsoft AI principle here. People uh should be accountable for AI systems. So the structure put in place to consistently enacting AI principles in it, taking them into account. AI systems should work within frameworks of governments, organizational principles, ethical and legal standards that are clearly defined. Principles guide Microsoft on how they develop, sell and advocate when working with third parties and this push towards regulation towards AI principles. So this is Microsoft saying, hey, everybody adopt our model. Um there aren't many other models, so I guess it's great that Microsoft is taking the charge there. I just feel that it needs to be a bit more well developed. But what we'll do is look at some more practical examples so we can better understand how to apply their principles, okay? So now that we've learned about responsible AI, I want to show you where you can find it within Microsoft Foundry as they really want to anchor uh their responsible AI concepts to the models that you do deploy. So the responsible AI tab provides model specific guidance on safety limitations and appropriate use. So you will find this later on when we use Microsoft Foundry and I'll point it out that there is a responsible AI tab and you can read about how it aligns and stuff like that. So before deployment, review the risks and tests for your use cases, apply safeguards and human reviews when needed. The information provided varies by model and provider, so it's definitely not standardized. And it's kind of nice that they have this here, but um, you know, I think that you you know, if you're going to use models, you need to go beyond this and assess what makes sense for your team, okay? But again, just want to call it out there um that there is something we can tie responsible AI to models when we're doing deployment, okay? All right, let's take a look at the Responsible AI Standard version two. So this is a playbook by Microsoft that organizations can use to implement responsibility controls to ensure governance of AI responsibility. This term responsibility controls, I made it up to make it make more sense um because this is such a new thing that um there aren't terms for it, so I have to kind of help out here. But here is the report and inside of it, you're going to see actionable things that you can do. Um the reason I want to show you this is that they say that you're supposed to know how to apply responsible AI in the exam guide. Um they don't make that very clear uh in terms of what it is and the exam doesn't make it clear, but I would imagine that this would be uh a very good place to look in a practical way. So we're going to take a quick look at it, okay? All right, so I just Googled Microsoft Responsible AI Standard version two and the first thing in the results was this PDF, so here it is. It says it's June 2022, so it's a little bit out of date. Um but I mean there's nothing newer, so it must still be applicable. If we go down below here, let's just take a look at some of these goals. Let's go farther down and see if there's something interesting. Um go here like transparency goal, system intelligibility for decision making. So I uh Microsoft AI systems that inform decisions uh making or about people are designed to support stakeholders' needs of intelligible intelligibility of system behavior. So identify stakeholders will use the outputs of the systems to make decisions, stakeholders who are subject to decisions informed by decisions, uh and then design information. So you can see it's very, very wordy. Um this is very uh What's [laughter] the the word uh put it? I don't want to say BS, but it is um definitely for uh your executive uh folks to make up a report to show that you are being responsible. So I guess you could take this and make a new Word doc and then or or a spreadsheet and just say write exactly how you are meeting these um uh this playbook. That's basically what you'd probably do. And again, this is more for people in management, executive level um to show some level of responsibility, okay? Responsible AI transparency report is a PDF report that outlines the steps that Microsoft has taken to be responsible with AI technologies. So there is a uh picture of the report. Uh the report includes how to build GenAI, AI customer commitments, governance uh of responsibilities of AI, Microsoft, and more. I just want to point out that an RAI transparency report is just a made up thing that uh Microsoft has done to um uh communicate how they are going about uh being transparent with their responsibility of AI. Uh no other company that I'm aware of is doing this or in this format, but um yeah, this is Microsoft for you. But I just wanted to point that out, okay? All right, let's talk about Microsoft Foundry. So it is an end-to-end platform for building, testing, managing, and deploying AI workloads. And they kind of break it up in this uh uh discover, build, operate, manage uh uh tabs here. Personally, I like the old interface, but they're always trying to unify this stuff together. Uh within Microsoft Foundry, we have the model catalog, which will be under, I believe, discovery, where you can find and compare models. There's playgrounds to test prompts and responses, not necessarily um where you want to utilize it for production. So often playgrounds uh they have limitations. They're more for testing models out, but uh they can hit limitations with like uh context output, like how many uh context tokens you can have on output, things like that. And so that's where you'll start to need to use code. Um we have the ability to see a bunch of agents, build agents, so that's kind of interesting. It has evaluation and monitoring built in, so uh we can utilize that. You can explore all this stuff in the portal and connect your app through the APIs and SDKs. Um there's a lot in here, but for the Azure 901, for other certifications, we'll go more much deeper, but for uh for the 901, we need a very basic stuff um for Microsoft Foundry, okay? Well, let's take a look at resources and projects. Two key things we need to know when working with Microsoft Foundry. So when we first set up Microsoft Foundry, we create a resource, but then we also have to create a project. So what is the difference? Well, resources hold shared model deployments, networking, security settings, and projects organize agents, files, and evaluations and applications. And so you can see here, this is a uh graphic from the I believe the the documentation here. And so we have the major resource as the thing around it, and then projects are on the inside. And then we have a bunch of stuff that are scoped under projects. I mean, this diagram's not the best, but it it shows it there. And then you have models that are deployed and they're shared across uh everything, okay? Um and they have their own networking security settings, okay? So projects can have separate access permissions while sharing the same resources. So hopefully that makes sense. Okay, let's take a look at Microsoft Foundry tools. So these are ready-made AI services you can use in your application. I believe these used to be called the cognition or cognitive services. Uh that was the branding before uh all this AI stuff. Um when everything was still ML, they were trying to, I don't know, brand it a certain way, but we might see that terminology uh in the API SDKs or it could have been completely replaced at this point. I do not know. But anyway, uh let's take a look at these tools. So we have speech, which obviously converts speech to text. We language which analyzes text. We have translator which translates text. We have vision which analyzes images and read text. We have document intelligence which extracts document fields and tables, and we have content understanding that extracts information across content types. And so some of these things are basically traditional machine learning stuff wrapped up as services. Um if you're used to AWS, you probably know these as a bunch of isolate services like recognition and transcribe and whatever. Um they don't give it the same kind of elevation as AWS services. They're just kind of like features under or tools under Microsoft Foundry, but they're basically the equivalent. Uh and they're not necessarily powered by and often are not powered by um agents, right? These are your traditional ML models that are optimized by Microsoft for very specific use cases. There you go. All right, let's take a look here at Foundry model catalog. This is a collection of uh thousands of models from different providers. Um this is the key thing that makes a models a service and models a service. Notice in the top right corner, we have um looks like uh 10,000 over 10,000 models. Um probably a lot of them are not that interesting. Some of them are marked as legacy, but um the point is is that they have a very large catalog. And notice that we have Open AI, Anthropic, uh Grock. So there are a lot of providers here. You're not going to see all of them, right? So a competitor like Amazon is not going to have Amazon Nova on the Microsoft platform. Um but every platform, uh major one uh has their model catalog and they collect them from all providers. Um if you click into one, you will get a model card and it will give you uh interesting information. So notice the responsible AI, that is something that we uh care about because we did that responsible AI section. Notice down below here, we have our input output types which will tie into our next slide because different models have different inputs and different outputs. I don't think I've ever seen a model with multiple outputs. They probably do exist, but multiple inputs is very, very common. So let's talk about choosing your AI model. It depends on your use case. So, are you summarizing email? Are you uh analyzing uh an image and trying to figure out what's in it? Are you generating a new image? So, different models uh uh have different capabilities based on what you need. So, imagine you need to generate out a customer email. So, you're going to want a model that is text input. If you don't need a multi-model, then a text generation model like GPT-4 5.4 Mini might be very cost effective for you. Um if you are uh uploading an image and you want it analyzed, you're going to probably need a multi-model uh model. So, this is one that takes multiple inputs. We just saw in the last uh slide the GPT-6.1 Soul that it could take an image and text. So, it's not just solely an image in here, but you'd have an image and a text input. And um then it could produce a text output here on uh the right. And then for your image prompt, so you are saying generate an image, you can send it to an image generation model. These are often um their input technically is text and input, but the point is is that their output is image. So, technically this one is an image and text and an image um image output. So, you could take two of these and have a reference image for those, okay? Um but hopefully that is clear. So, what happens when we have uh multiple models that are seemingly good at the same task? And so, this is where uh we're going to want to run our own little benchmark. And so, benchmarks can get uh pretty technical, uh but we're going to just keep it nice and simple here because it doesn't have to be complicated to pick your best model. Um and so, let's set up some metrics that we care about or you could call it a grading rubric if you will. So, one thing you might care about is quality. So, is the uh response from the model useful, accurate answers? So, imagine we are doing support questions uh like we have 50 real support questions. How many do the model actually answer correctly? And if it came up with 48 out of 50 correctness, that would be our uh measured value. Uh imagine we are determining how fast our app runs. So uh you might care about will a customer wait 8 seconds for an answer? So that is your uh top level uh maximum uh I don't know what you call it, SLA or or target. And so the app performs under 3 seconds, so it's you could say three out of eight if you will. What about cost? So is the uh usage affordable? So, you know, do you want to replace a human or uh or is a human still more efficient? Usually that's the question with cost. But what will 10,000 conversations cost each month? So an example budget might be you have $200 a month and it's able to handle 10,000 conversations whereas you're paying somebody, oh, I don't know, uh $5,000 a month, right? So that could be a factor there. How about context window? That's how much uh tokens, input and output, that the model can hold at one given time. And so here it says, is there enough room for the input and response, input and output tokens, right? Uh so can it process a 40 page product manual plus the customer's conversation? Because it needs all that context to determine how to answer the customer. And so if the model isn't capable of it, you have a physical knowledge gap or you have to engineer it in a way for it to work. And so uh the example uh here is that um the document requires 20 or sorry, if our if the thing is it's 25,000 tokens. Yeah, 25,000 tokens is the manual plus the conversation, but we have a million uh token context and we're fine, right? So uh all that stuff kind of matters. Another thing we want to do here is just kind of compare um uh different models against the use case so we can determine if it's correct. So let's set up a scenario. An online store needs an AI chatbot to answer 10,000 customer questions per month, including questions about refunds, shipping, and product returns. The business has three requirements: at least 95% accuracy, responses in under 3 seconds, and a maximum budget of 200 per month. So looking at this information, what is the stuff that matters? And so over here we have correct answers, response times, monthly costs, context window, meet all targets. So not fancy terms, just whatever it is that we care about. So uh let's take a look for correct answers. So uh 95% accuracy. So I would think that this would tie over to here to correct answers. And so you would have to go out here and determine what the percentage is. Obviously, um uh 49 is very 49 or 50 is really high. 48 out of 50 is high. This one's kind of low. So this does not look like 95% accuracy. Uh this one it probably it like probably is and this one definitely is. Okay. Response time. Response is in under 3 seconds. So uh we don't win here. That's no good. This one is good. This one's good. Um and we have uh 10,000 customer questions per month. So, you know, if we know what the context is, I think the last one said that all context won on that. So I think it'd be all of this. Um and then there's the monthly cost, $200 per month. So this one wins. This one wins. This one does not win. And so when we look at it, this one has all good things across the board and it meets all of our targets. So does that mean we choose that one? Well, it depends because this one has a very low cost. Um and the context window is correct. It's just that this number of errors is wrong. So you might say, okay, well, uh accuracy matters above all else, so the cost is justified here. But what if, and I'm just getting complicated here, what if this is all single turn and you have an opportunity for it to answer twice? Sometimes engineering can get this up higher, but clearly model B is our choice, okay? >> Hey, this is Andrew and we are taking a look at model deployment within Microsoft Azure Foundry and we have two options here, default and custom. So when you find a model you want to deploy, there's a big purple deploy button and we have two options, the default settings. This will use the global standard deployment with the default quota and custom settings will let you tweak a lot of those options. So looking at custom settings, notice here that we can give it its own deployment name that allows you to deploy the same model multiple times with different deployment configurations. Uh there are two uh kind of uh properties we need to pay attention to. It's the standard and provision throughput and the and the global uh and data zone information. So standard, when you notice right here, standard and standard, this uses shared capacity with pay per token billing. So if you have a chatbot with traffic that changes throughout the day, standard deployment is good because you're only paying for the tokens you use uh because you don't really know um what that provision throughput but it could look like whatever, right? If you have a workload where you really know the there's predictable performance, you can save money by paying for uh provision throughput, right? But you get a guarantee of um you know, standards like latency, like SLAs and things like that probably. Um so a customer support app with steady high traffic, right? So when you're choosing your deployment type, you are choosing on the standard and provision throughput. And then the other thing is uh the processing location. So is it global, so across supported zone geographies or is it in a data zone within a specific zone like the US or the EU? Um there are other options here, like you can see uh tokens per minute rate limit and things like that, but um for what we want to know is basically these deployment types and the fact that we can name them, okay? All right, so once our model is deployed, we now have the option of adjusting the model parameters. This allows you to change how the model performs and different models have different parameters. So here for GPT 41, you can see we have uh past messages included, max uh completion tokens, temperature, top P. So the farther older back you go, generally you have more options and uh these days we are seeing less information. So here for uh GPT-61, notice it's just max completion tokens and then we have reasoning efforts. And whether you're utilizing something that is uh text-based model or an image model, you're going to have different results. So like for images, you will have things that say like how many images you want produced, right? So lots of different parameters. It really depends on the model and what they provide on that API. But anyway, reasoning effort adjusts how much the model reasons before answering. So low favors faster answers, higher effort allows more reasoning task completions. Um and again, available parameters depend on the model. So there's no uh standard here, um but hopefully that gives you an idea. Okay? Okay, so Azure speech helps applications recognize spoken words, generate speech, and translate spoken language. So on the right hand side, you see a screenshot of the speech playground. Uh and you'll notice that under there we have text to speech, speech to text, and other options. Um but anyway, speech recognition is about converting spoken words into text, such as transcribing recording. Speech synthesis converts text into spoken audio, such as reading an answer aloud, and speech translation translates spoken words into another language, such as English to Japanese. All right, let's take a look at how we would actually connect to Azure speech programmatically, and we would use speech config to do this. Um and so what I want to show you here is that we're importing um the speech SDK from cognitive services. Now notice that it's called cognitive, and that's because originally before all this AI stuff, that's what they wanted to market this as, but sometimes uh under the SDK, it just still has that name because they're not going to update that name there. Um but another way to think of cognitive services is Azure AI tools. Um and so you can see here that once we have our speech SDK, we're configuring it. We're uh determining how we are connecting to it. So a subscription key and our region. Notice here on the uh right hand side that we are going to or left hand side, we're going to bring in that primary key as our subscription and we're going to provide the region. Notice that we have different endpoints depending on what we want to do. So we have a subdomain here for speech to text and we have a subdomain here for uh text to speech. Um but there you go, okay? Let us take a look here at the Azure speech SDK. This lets applications convert speech to text or text to speech. Um and so you can see here on the right hand side, we are using the speech SDK. Notice that it's not speech uh config, but we have audio config, speech recognizer and a few different other options here. Um but let's talk about some of the components. So audio config selects the audio input such as a microphone or audio file. Speech recognizer converts spoken audio into text. Audio output config selects the output destination such as a speaker or file. Speech synthesizer converts text into spoken audio. So a lot of different options here. For single utterance, uh this is when you're listening for one spoken phrase and then stops and you can use the recognize once or recognize once a sync depending on if you want an async call there. And we have continuous recognition. So this keeps listening for multiple phrases until it stop and this uses the start continuous recognition. Hey folks, it's Andrew and we are back in Foundry and this time it might be fun to try text to text or text to speech. I'm going to turn on my system sound so that you can hear it when we utilize it. And so we need to go find uh that tool. So it's probably services under build as that's where they've been shoving all their prior services under the cognitive services that have existed for a long time. And those we have a lot of options for uh speech. And so, um let's go take a look at some of our options here. So, the first is Azure voice live. So, that's for live voice. And I don't think we need that. I mean, voice live is cool, but it's just it's um for talking in real time here. I mean, I could try it here. We'll just go give it a test. Hey, this is Andrew. Oops. Let's say allow allow this here. Hey, this is Andrew. Can you tell me um what's the weather like inscriber today? >> I'm here to help with travel plans, but I can't check the current weather. You might want to use a weather app or service for that. Are you thinking about planning a trip to Scryber or somewhere else? >> And so, the challenge here is that it can't go out to the web and find out, I guess. So, maybe there is a way. I'm seeing if there's any advanced settings for this, but notice that they do not have that, right? Um >> Hi, this is Andrew. >> It said that it's no name was Andrew. I'm Andrew. That makes no sense. Wait. Why is my why is my travel assistant named after me? Maybe that's just how it was. Oh, this is real-time assistant Andrew. Uh help users plan trips through natural spoken conversation. OH, OKAY. SO, we already had one that was already set up to do something. So, I'm going to go and uh take this out of here and we'll go into um build in a new tab here. And I want to go over to models. And we'll go into Terra. And we will ask it to make a new one. So, this is can you change this? Let's take that out. Can you change this voice assistant to be uh for helping with finding weather? Okay. And we'll go ahead and do that. And we will get our new one here. So, this is our new one and we will copy it. We will go back over to here, and we will go back over to here and replace this here. Oh, I do want to restart this conversation, so I'm just going to refresh. And Yeah, I didn't notice it was Andrew this entire time. We'll go ahead and replace that. And we'll say start. >> Hi, this is Andrew, your weather assistant. >> Hi, this is also Andrew. Can you tell me what the weather is in Schreiber, Ontario today? >> Great to meet you, Andrew. I can't check the weather directly right now, but I recommend looking up a reliable source like Environment Canada's website or a trusted weather app for Schreiber, Ontario. Do you need help finding a specific kind of forecast, like temperature or rain? >> And so this is kind of the challenge here where if it can't go out and and find something, we're going to have a bit of an issue. Oh, look, they have a get weather one. That's perfect. I didn't know they had this. Um, it's just a coincidental that they have a get weather function. So we'll go ahead and save that. And uh we will try this now again. >> Hi, this is Andrew, your weather assistant. >> Hey, this is Andrew as well, uh your customer. Can you tell me what the weather is like in Schreiber, Ontario? And now there's a function call, so it should be able to do it. Are you there? >> Yes, I'm here. The weather in Schreiber, Ontario is sunny with a temperature of 25 degrees. It's a nice day to be outside. Enjoy. Do you need anything else? >> Sorry. Sorry, uh 25 degrees in Celsius or Fahrenheit? I'm in Canada, so we we do things in Celsius. >> Good point. The temperature in Schreiber, Ontario is 25 degrees Celsius. Let me know if you'd like help with anything else. >> How do you know that it's 25 degrees Celsius? >> The temperature I provided was already in Celsius, as it's the standard unit used in Canada. If you'd like me to confirm or check >> let's go take a look here cuz maybe it's hardcoded. Yeah, it is. So, see here, it hardcoded the response. So, it didn't actually go out to the internet. Um which is fine because this is just an example of it checking it. So, um that's the discrepancy there. I just had a feeling that's what it was. Um but Voice Live is pretty cool. Uh we have call service. What's the difference? Uh I guess it's just the programmatic way of setting it up. But anyway, that is Voice Live. Let's go take a look at speech to text. As you imagine, you type something, you get something. Or actually, sorry, this is you say something and then it transcribes it. Okay. Hey, this is Andrew Brown, bringing you another certification course and this time it's the Azure uh AI Fundamentals, also known as the AI-900. There we go. And so we can play this back. Hey, this is Andrew Brown, bringing you another certification course and this time it's the Azure uh AI Fundamentals, also known as the AI-900. Wow, if I sound that good, I understand why people like watching my videos. Anyway, so here we have that transcript. What's important to know is also what comes out as the JSON because depending on what you need, uh depends on what you want. And so one thing I want to know is does it have word per word? And the reason why word per word is interesting is that then if you were to put this in a program, you could have it playback and highlight every single word. Uh so for me, that was really useful. I wonder if it could do other languages. Uh so we do have other ones. My Japanese is terrible, but we will go ahead and try a little bit for fun. Uh and so I really don't want to hear myself talking Japanese to play it back, but uh this is a good opportunity to test it. If you know another language, of course, try it out. Um it'd be interesting to see if it could identify the language. Um Oh no, that's no fun. I'll just tell it what it is. Cuz if it gets it doesn't identify the language correctly, I'll be very embarrassed. So I'm not going to even try that here. Speaker diarization, is that for dialects? Includes one or more uh person's speech into segments that correspond to each thing. So uh that includes more than one person's speech. Okay, so maybe when there's multiple speakers. Some of the challenges with these tools is um you might be able to like tell you that there are two or three speakers, but it can't necessarily take a label and match them consistently. Um and again, I don't know if this one is is matching based on um what Open AI's uh speech to text is, but this is obviously Azure's own one here. So I'm just going to think of something really quickly to say here. Sensei wa uh gakusei ni benkyou shite saseraremasu. Okay. And so what I tried to say here is as for the as for the teacher, um uh for the students, they made them study. And so my middle part here kind of messed up where it says uh oh, I guess it sa chaimase. Let's play back. Sensei wa uh gakusei ni benkyou shite saseraremasu. I'm terrible. Wow. I think benkyou sase saseraremasu. Benkyou saseraremasu. So we'll try that one more time for fun. Gakusei Mm, no. Sensei wa gakusei ni benkyou saseraremasu. Is that even a valid sentence? Oh, that looks a lot better. Sensei wa gakusei ni benkyou saseraremasu. So we'll say Google Translate. So what I'm trying to say is that the teacher forced the students uh to learn uh stuff. But I guess if it's if you're forcing them, well, let's take a look here. If you're forcing them, maybe it's the other way around. The teacher is made to have the students study. Yeah, so I got it mixed up here. It's probably just supposed to be um saserarema sasemasu. Probably sasemasu. Anyway, that's fine. Uh did my best there. Anyway, we'll continue on as nobody wants to hear me speak more Japanese. Uh so we'll go down below here and so we have voice, speech to text, text to speech. So that's the other way. And we'll go ahead here and Where in the world is Carmen San Diego? So we will go ahead and play it. >> Where in the world is Carmen San Diego? >> Carmen Did anyone ever watch that show? >> Where in the world is Carmen San Diego? >> Where in the world Sorry folks, dyslexic, never can type anywhere. >> Where in the world is Carmen San Diego? >> So Carmen. Am I spelling it wrong? Carmen San Diego. Yes, I am. That's why it's wrong. If you don't spell it right, it's going to sound wrong, folks. >> Where in the world is Carmen San Diego? >> Notice that we have different frequencies. 24 uh uh whatever kilohertz is pretty pretty good. 48 is probably what I would want uh on average. >> Where in the world is Carmen San Diego? >> I don't know why it changed the tone there as we're on the default. >> Where in the world is Carmen San Diego? >> If we go down, does it go back to normal? >> Where in the world is Carmen San >> It's going a little really bad. >> Where in the world is Carmen >> No. But it's interesting that it's kind of adding that here. And notice down below, we can give it some Oh, those are sample text. So sometimes you can have like um expression markers. I don't know if they have this here, but I'm not going to go ahead and do that. But it says emotional enabled, so it was already going ahead and doing that. You probably heard of like uh Dragon naturally speaking, which is like a Microsoft product from a very long time ago. Neural, neural multimodal. So these have different levels of quality. Neural is uh newer. There used to be older ones than this one. So this one's probably still decent. >> Where in the world is Carmen San Diego? >> Like you can tell it's fine, but apparently these are latest ones. >> Where in the world is Carmen San Diego? >> An advanced HTML supports multilingual capabilities. So here's a question. What if we mix in Japanese with English? So we'll go back over here, Google Translate for a second. We'll just say, um I want to buy a pizza. There we go. And we'll go back over to here and paste this in. And let's see if we put it on uh this one if it can play both. >> Where in the world is Carmen San Diego? Pizza o kaitai desu. >> So that seemed fine to me. Um what we can do is go over to Japanese here. And let's just take this out and see if it sounds different. >> Pizza o kaitai desu. >> It sounds the same, so that's fine. And we do obviously have some other options for uh tuning and whatever. And we have the lexicon. So if there are very specific words that it's struggling with, there's obviously a very specific lexicon file format to do that. Uh this is useful for me because when you are uh covering so many cloud services, they have a lot of strange names. And so sometimes you need to feed in uh that there. Or like just tech names. Think of all the tech companies that you have no idea how to pronounce them, right? Um like Akamai, uh which I always thought was Akami, which is totally wrong, but it's the uh, you know, the uh CDN provider. Um but anyway, so that is text to speech. So nothing exciting there. We'll go over to text to speech avatar. Oh, this is new. I've never even used that. So this did not exist before. I've never seen it before. Oh, this does not look good. [laughter] This does not look good. Can I add my own avatar though? Oh, I could. Um Well, let's first just give a try for one of these here. I assume it's just stretched because of um our window here, which it really shouldn't do. But let's play the audio. >> Hello. >> So say where in the world is Carmen San Diego. >> Hello, where in the world is Carmen San Diego? >> I cannot write things ever clearly, can I? >> Hello. Where in the world is Carmen San Diego? >> I like how they have a break cuz that's a common thing that we normally need. We'll go ahead and hit generate. If you do not want to waste any money, you can just not press these buttons, but we'll get to take a look here and see what we get back. Um I'm curious if I can add my own. Or I can just generate out an image really quickly. Oh, here we go. >> Hello. Where in the world is Carmen San Diego? >> Okay, so I'm going to go see if I can find an image of myself, if I'm even allowed to do that. Like to upload it here, and we'll find out in just a moment. All right, so I'm back and I mean this is background. Can I add my own avatar? Custom. So again, I don't know what the cost of this is, so you could just watch me do it and see what happens. But I'm going to go ahead and add my own custom avatar. And speech avatar, photo avatar. Unsupported Azure text to speech fine tuning isn't supported in the region you selected. Um registration is required to deploy. Apply for access. So this is going to be too complicated for me to do. I would love to do it for fun, but you can see there are some limitations with it. We will go over to speech translation. Oh, translated over. Okay. So we'll go here and we'll uh translate from I will try this again as even though I'm bad at Japanese, we will try anyway. I can't seem to select the parameter here. Um we'll refresh here and try this again. Uh Japanese. >> And we have English. Oh, and it'll actually produce out the uh voice. So, maybe William. AI generate application of the speaker's voice using live interpreter. Well, that'd be fun to do, but I'm not sure. We probably won't be able to do that. Ohayo gozaimasu. Konnichiwa. Andrew Brown desu. Uh yoroshiku onegaishimasu. And we'll see what comes back here. Good morning. Hello, this is Andrew Brown. Oh, nice to meet you. >> Good morning. Hello. This is Andrew Brown. Oh, nice to meet you. >> There we go. So, yep. Basic introduction and I can get that down there. Be nice to know like how to get the live interpreter going. But that might be a bit of a headache. And so we will go back here a step and take a look at the next one. So, we have uh speech translation. And so we've covered all our voice stuff, okay? And obviously these are all programmatic. Um so if we go into Where is it? Customize. I mean, they all have to have an API. They absolutely do. Especially this one here. So, for whatever reason, they are kind of obscuring it. But the point is is that Oh, here it is. Call service. I don't know why it says call service. Why not just call it code? But you can see the variety of languages and I wonder if this still falls under uh cognitive services as that's what the API is to be called. And well, this one is a newer one. So, this is voice live. Okay. If we go back to content understanding, I'm just curious. I know this is out of scope already. But I just want to look at the code here and see what it what it's called. It looks like they've renamed the packages here. So, that's interesting. But anyway, that was our exploration of the voice models. So, we just covered a bunch of um speech SDK stuff, but let's take a look at voice live, which combines a bunch of these things into single API for real-time conversation, okay? Uh so there are a few things that we can do here. We can have natural turn taking, so it detects when the user finishes speaking. Uh we have interruption handling, so lets the user interrupt uh uh it with a spoken response. Customizable speech, so configure languages and voices for the assistant, and you do not need to connect separate speech recognition and speech synthesis services yourself. And so you could imagine that um people were saying, hey, there's a lot of these uh APIs and we have to do a lot of uh hand configuration to make them all work together. And so Voice Live does that with additional functionality. All right, so something you need to know about multimodal models is that they can take audio as an input. So if you've ever used any of the uh modern assistants and you're talking to them, this is that functionality. Uh and we can call that audio capable multimodal model processing. But the idea is that you are providing that as your prompt. Uh and so you just deploy a model and then you uh record record or turn on the microphone. It's a little bit hard to see here, but look here we have a record button uh or there's the microphone button, okay? Uh and so anyway, you would provide that information and then you'll receive an answer as text or audio. Again, it depends on the model. Um so, you know, but the key thing is that it's that there's models that can accept audio um within uh Azure Foundry, okay? And so an example here would be like I I record saying like explain cloud computing and then my text instruction, which is your system prompt, uh would be answered in one sentence so that it's controlling how the output comes back to you. And so then the response would be cloud computing lets you access uh computing services over the internet, which could be text or audio depending on what model you're utilizing, okay? Let us take a look here at Azure Language, which is actually an umbrella of services. Um and so Azure Language helps applications analyze text, understand user requests, and answer questions from existing content. If this was over at AWS, these would all be separate services or at least under an umbrella of stuff, but um here they make it feel like tools. Uh that's fine. So let's take a look at the first one. You have text analysis and this tool under Azure Language is useful for detecting sentiment. So like, you know, uh if somebody left you a positive or negative review on your uh cooking, extract key phrases, so extracting key information out of a document, identifying people or places, so maybe sensitive information or uh basically, you know, exactly as it says, people or places. You have conversational language understanding is another tool, a CLU. This is very specific language that Azure likes to use this, but language understanding is a generic concept uh in the ML world and this will identify the intent and entities in a request. Sounds very similar to text analysis, but this is more on a conversational level, right? With people talking back and forth and trying to understand their intent or who's talking. You have custom questions answering. So this is for finding answers in FAQ, guides and other documents. This is a very, very old language model and obviously great for uh customer support. And so here we have an example of uh uh CLU, so conversation language understanding. And so in this example, uh in the UI here, you can see it says understand the request. So we want to buy one ticket to Boston tomorrow. So what is the intent? It's to book a flight and the entities here are destination, Boston, date and tomorrow. So, you know, CLU is like an older way uh of of of, you know, before agents and it can be extremely cost effective. Um but, you know, I think that, you know, newer agents are probably just better to utilize, but it's still a service that we can learn about and uh probably has a use case for some folks. Maybe if you have like public facing pages where you really need the cost to be really low, that kind of makes sense, but other places maybe not so much. Hey, this is Andrew Brown from ExamPro and we are looking at text analytics and this is a service for NLP, so natural language processing for text mining and text analysis. So, text analytics can perform sentiment analysis, so find out what people think about your brand or topic. So, features provide sentiment labels such as negative, neutral, positive. Then you have opinion mining, which is an aspect-based sentiment analysis. It's for granular information about the opinions related to aspects. Then you have key phrase extraction, so quickly identify the main concepts in text. You have language detection to detect the language uh of an inputted text that it's written in. And you have named entity recognition, so NER. So, identify and categorize entities in your text as people, places, objects, and quantities. And subset of NER is personally identifiable information, so PIIs. Let's just look at a few of these more in detail. Uh some of them are very obvious, but some of these would help to have an example. So, the first we're looking at is key phrase extraction. So, quickly identify the main concepts in text. So, key phrase extraction works best when you have uh when you give it bigger amounts of text to work on. This is the opposite of sentiment analysis, which performs better on smaller amounts of text. So, document sizes can be 5,000 or fewer characters per document and you can have up to 1,000 items per collection. So, imagine you have a movie review with a lot of text in here and you want to uh extract out the key phrases. So, here it identified Borg ship, enterprise, um surface, travels, things like that. Uh then you have named entity recognition. So, this detects words and phrases mentioned in unstructured data that can be associated with one or more semantic types. And so, here's an example. I think this is medicine based and so the idea is that it's identifying it's identifying um uh these words or phrases and then it's applying a semantic type. So, it's saying like this is a diagnosis, this is a medication class and stuff like that. Uh semantic type could be more broad, so there's location, event. I put location twice here, person, diagnosis, age. And there is a predefined set, I believe, that is in um Azure that you should expect. But they have a generic one and then there's one that's for health. We're looking at sentiment analysis. This graphic makes it uh make a lot more sense when we're splitting between sentiment and opinion mining. But the idea here is that sentiment analysis will apply labels and confidence scores to text at the sentence and document level. And so labels can include negative, positive, mixed, or neutral, and it will have a confidence score ranging from zero to one. And so over here, we have a sentiment analysis of this line here, and it's saying that this was a negative sentiment. But look, there's something that's positive and there's something that's negative. So was it really negative? And that's where opinion mining gets really useful because it has more granular data where we have a subject and we have an opinion, right? And so here we can see the room was great, but the staff was unfriendly and negative. So we have a bit of a split there, okay? All right, let's take a look here at analyzing sentiment with Azure Language SDK. This is one of the cases where we have to uh look at some code. So Azure Language SDK lets your application analyze text through features such as sentiment analysis, key phrase extraction, and entity recognition. So here you can see we are creating ourselves a client and we specifically want to do analyze uh sentiment now for different ones. It would be key phrase extraction or entity recognition. Uh but the idea is that we're going to pass in our documents, which are basically text that we want to be analyzed, and then we call whatever the function is that we want, and then we get results back and then we can get a specific property. So in the case of sentiment, we're getting sentiment back. And so the example here would be output positive, okay? So there's obviously going to be some variation, but this gives you a very quick introduction into the Azure Language SDK. Hey, this is Andrew Brown from ExamPro, and we are looking at optical character also known as OCR, and this is the process of extracting printed or handwritten text into a digital and editable format. So OCR can be applied to photos of street signs, products, documents, invoices, bills, financial reports, articles, and more. And so here's an example of us extracting out nutritional data or nutritional facts off the back of a food product. So Azure has two different kinds of APIs that can perform OCR. They have the OCR API and the Read API. So the OCR API uses an older recognition model. It supports only images. It executes synchron- synchronously, returning immediately when uh it detects text. It's suited for less text. It supports more languages. It's easier to implement. And on the other side, we have the Read API. So this is an updated recognition model, supports images and PDFs, executes asynchronously, paralyzes tasks per line for faster results. Suited for lots of text, supports fewer languages, and it's a bit more difficult to implement. And so when we want to use this service, we're going to be using uh Computer Vision SDK, okay? Hey, this is Andrew Brown from ExamPro and we are looking at Face Service. And Azure Face Service provides an AI algorithm that can detect, recognize, and analyze human faces in images, uh such as a face in an image, face with specific attributes, face landmarks, similar faces, and the same face as a specific identity across a gallery of images. So here is an example of an image uh that I ran that will do in the follow-along. And uh what it's done is it's drawn a bounding box around the image and there's this ID and this is a unique identifier uh string for each detected face in an image and these can be unique across the gallery, which is really useful as well. Another cool thing you can do is uh face landmarks. So the idea is that you have a face and it can identify very particular components of it and up to 27 landmarks is what is provided with this face service. Uh another interesting thing is face attributes, so you can uh check whether they're wearing accessories, so think like earrings or lip rings, uh determine its age, uh the blurriness of the image, uh what kind of emotion is being uh experienced, the exposure of the image, you know, the contrast, uh facial hair, gender, glasses, uh your hair in general, the head pose, there's a lot of information around that. Makeup, which seems to be limited, like when we ran it here in the lab, all we got back was eye makeup and lip makeup, but hey, we get some information. Whether they're wearing a mask, uh noise, so whether there's artifacts, like visual artifacts or occlusion, so whether an object is blocking parts of the face. And then they simply have a Boolean value for whether the person's smiling or not, which I assume is a very common component. So that's pretty much all we really need to know about the face service, and there you go. Let's talk about vision using a multimodal model. So a vision capable model can interpret an image and answer questions about it based on your prompt. So you send in an image and a text prompt to be deployed. Uh you can ask it to describe the scene, identify visible details, or answer a specific question. So an example would be uh this photo here, we're providing it to the model and then uh we're asking, you know, what do you see in terms of objects? So maybe we run GPT-6.1 and then it will come back and say, well, there's a laptop in the center, uh a notebook is on the left, and a mug is on the right. So nothing super complicated here. All right, let's take a look at how we send images in a request, and we can extend this to mean anything uh in terms of other file types, but we'll just talk about this one. So here on the right hand side, you can see we're doing responses.create, so that clearly is the open AI um APIs when you're creating a a request to model to come back with a response, okay? And we already know that you can input text, uh but some models give you the option to provide multiple types of inputs. And so here you can see that we have a type of image. Now, there could be other ones. It could be audio, there could be files, whatever. But the point is we're focusing on image because if you look here, we have the option to provide an image URL. So what does that image URL have to look? And so sometimes it's an image URL or it's a base64 encoded data, all right? So for image URL, you link to an image uh the service can access, so publicly accessible URL or maybe it could be a file locally. Uh so example here is example.com/desktop uh jpg. Um for a base64 data URL, that's where the image is encoded as data. I'll show you that in a moment. But anyway, here we're saying image URL, but notice that the URL isn't necessarily going to a location on the internet. It literally is encoding the image as data, like as a text data, okay? Um input a text obviously carries the question. Input image carries the image. So uh both formats use the image URL uh field. A local path alone does not send the image. So in this exception here for this uh OpenAI API request, it's not allowing to go locally. But understand different APIs, different rules, right? Um so for other ones, there could be a separate um parameter besides image URL. So another one could be image URL, image data, whatever, whatever. But anyway, what does that base64 look like? Well, when you turn it uh an image into base64, you will get a like a text representation. Um and so I let ChatGPT make that one. And I believe this represents a single black pixel one by one. Uh but you can imagine this gets really, really long. But the point is is that you can um encode the data as base64 text as you're seeing there. Uh and that's how we get delivered, okay? Hey Hey it's Andrew and in one, we're actually going to go ahead and deploy a multimodal uh model. So, we will go over to I believe our Discover into our models and from here, we will go ahead and launch ourselves a new model. So, GPT-61 Terra sounds really good. Um GPT has decided now to name everything after constellations like Luna, Sol, like the sun, the moon, earth, and I guess the capabilities, like the closer it is to the sun, the more capable they are. So, obviously, Sun is going to be the most powerful and Terra, I guess is one of their middle models. I don't know if there's like four of them, but I know Terra is in the middle. So, we'll go ahead and deploy that with default settings. And uh often the default is going to be almost always serverless, so that's really good for us in terms of cost. And so we now have uh this here. And so obviously, there are a lot of options going on here. We got tools, we got web search, we got knowledge, uh we got memory, we got guardrails, all sorts of stuff that we can work with. And we have parameters here that we can tweak. Uh but let's keep it nice and simple and just show you some of its capabilities. So, um the first thing is that you this is a multi uh multimodal model, so it can handle multiple kinds of inputs, right? And so we can give it an image and I'm going to go look up a Pokémon. Pokémon uh and we'll say uh Gengar is an example of one. If you know your Pokémon, you know your Pokémon. I'm going to drag this to my desktop. And then I'm going to go upload this here and ask it if it can tell me what kind of Pokémon image this is or just what image it is. So, I have attached the image and that is Gengar. I'll say, what is this an image of? Okay, we'll go ahead and write that in. I know the text is really small and the UI is terrible. This is Gengar, a purple ghost poison type Pokémon. And so obviously, it has a conversation here, but we can get structured output if we want. So, I can go ahead and say like, uh can you give me uh JSON output uh for Gengar's stats in Pokémon uh one uh gen one? Okay. And see if we can get that. So, it's going out to the internet for that. Or not out to the internet. Oh, it did. So it went to Ballpedia here. Um and so it did use utilize web search. And you can see here web search is turned on. If it wasn't turned on, it would just go from its natural memory. So I'm going to turn this off and just say like, can you give me now JSON for Bulbasaur Gen 1? And notice that it won't have access to the internet. So it's going based on its internal memory. And we'll try this again and turn it back on. So we'll go back to our um web search and go like, hey, can you can you check again? And and let's see if it will go out to Ballpedia this time. And so now it's gone here. It says, I checked the JSON is correct with generation one. And so this time it actually went and checked out the base stats. It didn't change anything because its internal memory knows what it is because these things have all that memory already built in. But if it didn't know, there's something new, then it would go and update that. Uh we can obviously add tools. Um and so oh, we are adding tools right there. Okay. And so through the MCP protocol, we could add them. That's a little bit complicated. I don't want to do that. There's the code interpreter, which is a tool, which apparently is temporarily unavailable. So maybe it's under development or it's just not available in this region. It's Azure for you. Um and so there's obviously options to save an agent and do agent stuff, which we're not doing right now. But my point is is that you could see that we could feed it an image, ask for text output, um stuff. We're obviously this is text obviously this is text input and this is an image, right? Um and that's all it really does. If we go back over to our model and we open it up, we should be able to see, oops, details. Um not here. Remember there's the model cards if we go back. And we look at the actual model models. And we go into here. Notice it only has image text and image. Oh, it has output text and images. So that's something we didn't test. Um and so I wonder what it's doing then if it has an image. So can you can you generate a Fakemon image? Make it uh make it based on uh a uh the the Canadian um uh Wolverine. Okay. Cuz it says it has image output. I can help design it, but I can't generate directly generate an image. Okay, but your model but your model card says image output. >> A model can support image output. Whether I can produce an image particularly this conversation depends on the tools available tools. Open AI examples offer image generation. So I don't have an image generation tool available in this conversation. >> That's really confusing. So like why would the model card I mean, I I didn't think that it outputted images to be honest, but like why would the model card say here image output if it can't do that? So now I'm just kind of curious. We're going to look around here image. So why does it say that? And they can't explain as to why. Right? So that's kind of annoying, but um you know, to be honest, most times I I I expect them only to be this. Though to be honest, when you are using ChatGPT and you're using GPT whatever whatever, it will go out and and produce an image. But I assume that would have a tool call and do that. But here it's suggesting that it basically is able to directly do it as the model. So I'm not exactly sure what's going on here and I can't answer that, but the point is is that there is what you observe and what what is said, right? And so what we observed is clearly not exactly the same. And that is uh that is what it is, right? So that's fine, folks. Um is there anything else for us to look at? I don't think so right now. I mean, the other thing I would probably look at is just the reasoning parameters. So if we go back over to our build and again, they keep hiding it on us, so things just keep getting moved around. There are these parameters here. Now, um these days basically you don't have to really fiddle with things too much. There used to be top P, top K, temperature, and other stuff like that, but they're basically hidden in newer models. And so here all we have now is how many uh max token completions and uh reasoning efforts. So if I go low and I put this all the way down to 100, can I go down to one? And oh, it won't let me do that. Limit maximum output tokens for the response model. The reason I'm trying to do one, and maybe we can do this programmatically, is that if I want to just get a yes or no back, it won't let me do it. And so uh I can go here and just say, you know, can you can you tell me um can you tell me, well, how much is 100 characters? So we'll look at Lip Lipsum Lipsum generator. [snorts] And I just want to see what 100 characters look like. This is for uh just fake text. And we'll go uh bytes and we'll say 100 because 100's a lot, right? Hopefully we don't get any bad ads here. And we'll generate that out. And that's 100. So that's not a lot, right? And so we'll go back over to here and we will say, you know, can you tell me uh what are the best Pokemon for Gen 1? Build red. Okay. And so we'll go ahead and we will uh sorry, we want it over here. We'll go ahead and implement that there. I noticed that we hit our token limits cuz it couldn't reach it. So what's interesting is that it didn't just produce exactly what it was able to do. It ran into an error. Um so some providers will just cut short and give it back to you. Some will give you this error. Um the effort also depends on how intelligent it will think. So we will go back and bring up our our our limit. Notice like we we can only go up so far. So maybe programmatically we can go beyond this limit, but in this playground, and these playgrounds are purposely limited, we can only do so much. So we say uh choose the best Pokémon lineup or sorry, this is instruction by the way. Instruction tells you like, you know, uh be sassy in your responses, right? We go back over here and say, okay, can you try again? And we'll see if it can tell us the Pokémon team. And we put it on X high reasoning. Absolutely, uh redemption's arc incoming. Would you like me to try again? I can't see earlier attempts. Be sassy. Talk talk like a um [snorts] Reddit user. Okay, uh redemption arc incoming. What would you like? Uh so please uh create me the best Pokémon uh red gen one team. Let's see if we can do it. We'll give it a moment here. I put on X high by the way. If you are worried about spend, you can just put it on low if you want. Um I'm not worried about one request here. It's going to be very inexpensive. But we'll give it a second to complete, okay? All right, so I'm waiting. Nothing's happening. So I'm going to hit stop and I'm just going to go and change the setting to I guess medium and we'll try again. So I don't know if it's just hanging or whatever, but if it's hanging for too long, I don't want to run it all day here and find out it's an issue. And now we have an issue. So we'll go ahead. So I'm going to go and give this a refresh and start this over. Um again, this is just Azure in their playground. It's just not that reliable. I'm sorry, folks. Um but I'm just teaching it to you because I'm supposed to teach it to I'm not necessarily recommending Azure. Um but we'll go here and just say, you know, can you uh create me a Pokémon Red Gen 1 team to beat the game? And maybe the issue is because I told it to talk like a Reddit user. And [laughter] so uh Redditors can be pretty mean and so maybe that's its issue, but I will wait here and see what comes back. Oh, here we go. So absolutely, here's a team built to beat uh beat the story without trading its balance. Okay, you didn't really talk you didn't really talk sassy or like a Reddit user. Yeah, I failed short by sounding like the world's most polite Pokédex. My bad. The short pick this your coverage, whatever, whatever. And so um I would say that it's this is an awful, awful response. Um it did a terrible job here in terms of keeping to instruction. Um so I'll give it a down here and just No, I'm not going to go through that much effort here, but there are reasons why this might happen because Redditors can not it might not be always really nice. But a response from a Redditor could be showing you a meme back and giving you a non-answer or just talking in a weird way. So the thing is that it still had bounds to to do that, but for whatever reason, this model could not do it. Uh as per usual, there is somewhere for code that you can get. Is it this? No, that's endpoints. Where is it? They've moved it on us. Uh continuing code. And so here we have um code as a code example. Very straightforward. You have OpenAI and then you create a response. And notice that it's using OpenAI as the um as the endpoint. The reason why is that OpenAI basically uh there's a lot of models out there that are open OpenAI SDK compatible. And so Microsoft, uh their relationship with OpenAI has been so long-standing that they don't have their own. They just use the OpenAI one. Um but like for instance, Meta doesn't have their own, so they use OpenAI or Anthropic. So it's up to you. We do have some other options for uh languages here. If there's a language you wanted this to work in that you don't have it in, you could just ask AI to make it. Like Rust isn't here, but you could totally ask it to to do that. But anyway, uh folks, I think we pretty much covered it here, and I will see you in the next one. Okay? Ciao ciao. Hey folks, it's Andrew, and in this video, we are going to uh start using Microsoft Foundry. So I'm just showing you that I have it zoomed in, and it's a little bit unusual uh my screen, but just understand it's because I'm making it bigger for you. So in the top here, we're going to type in Foundry. Okay, and there is the uh current icon as Microsoft likes to change it all the time. And so we want to create ourselves a new um Foundry project. Now notice here that they talk about resources. What I want to do is go to the left hand side here and go to Microsoft Foundry, and we're going to go ahead and hit create, and that should create probably uh yeah, create a Foundry resource. Fair enough. So here I'm going to go with this description. I'm going to go ahead and call this AI 901, assuming no one has uh taken that from me. And we'll just call this AI 901 uh Foundry. And in other videos, you'll see me um using Foundry. I'm not going to constantly create this resource from scratch. There are many different regions. The region can greatly affect what models are available. I'm going to go with East US as I believe that's where the most stuff commonly will be. Says this subdomain is already in use. Please choose a different one. So we'll just call this AI Foundry uh A okay. We'll put okay on the end there. So you got to get something that works for you. I'm not sure if these are uh uh like within my own account or everybody, but get it so that it works. And we want to define our first project. So this will just be our AI 901 project. And then we have a content review policy. Lots of times there's a bunch of stuff steps here. Let me decide if I want to do any of these other things, just a moment. So, sometimes you might care about storage methods, um but I think everything is fine here and there's nothing here that I'm concerned about. So, we will go ahead and uh hit review and create. So, we'll go ahead and hit review. We'll give it a minute here to run its validation before it decides that we can create. And now we will go and create our first Foundry resource, which will also set up our Foundry project. And we'll give that a moment to deploy, okay? All right, so our deployment is done. We're going to go into this resource and what we want to do is make our way Well, we got to launch it. So, go down below and launch the Foundry portal. So, it's right on down here. It's also up here, too. They give you multiple options. One thing with Azure is they like to give you way too many options. And so, this is the new UI. Um to be honest, I'm used to the old one, but I'm going to stick with the new one as this is what they're going forward. I honestly thought the old one was a lot more straightforward. But here they've broken these up into tabs. And so, what we want to do is first uh find a model. And so, that's going to be under discover. And on the left hand side, you're going to see that we have models. And so, models uh is specifically the model catalog. Um and what Microsoft Foundry is, it's a unified platform, but it's also model as a service, meaning that there's many models from many providers and they're providing it under one umbrella with a bunch of infrastructure around it. And so, you can see here that we have Anthropic, we have GPT, we have DeepSeek, uh Grok, uh Meta's Meta's models are here, Mistral models are here. So, a lot of models under here. And so, we need to Before we can use a model, we need to deploy a model. Um and so, you know, if you come from Amazon Bedrock, they let you basically deploy them all in one go. This one's a little bit different, um as all providers are. But we are under the model catalog. We'll click models to make sure we're clearly under models here. Um and so, this is where we can find our models. If I zoom out, probably Yeah, it looks a lot more normal. But we will go ahead and try to find one. So, what I want to is deploy um because we want to do image generation, we want to deploy an image model. And so we need to find one uh somewhere here. So um let me think about this for a second, okay? So I'm just thinking about here like how do we find an image model? And I'm going to go, it says available in my project. This is probably what we should stick with. And let's just type in um image. Okay, and so we have a variety here. So we have QUEN MAI, which is Microsoft's, I guess AI image. And we might also have uh you have Mistral has one. Um Azure AI vision, which is interesting. There's Azure AI vision and then MAI. Is there really a difference? I mean, these do different things, right? So here, notice it says face detection. So the idea is that it's taking an image as an input and then outputting the results of it. I thought we would have saw um Meta's image generation here or uh OpenAI's. Um maybe they are here and I just don't know, but anyway, I guess we'll go with um 2.5 uh MAI image generation. And so now that we have it, just notice some tabs. Like over here, we have responsible AI. So we had a section on responsible AI and so this helps you understand that alignment. So safety techniques, despite technical mitigations such as data filtering, image generation models are known to produce harmful and unexpected content based on user requests. An additional technical work, blah, blah, blah, blah, blah. So you can read this stuff to understand if the model is responsible. Uh they have some uh benchmarks in here, but to be honest, I don't know who reported these and these are kind of junk benchmarks. If we already had it deployed, we could see it here. And then licensing as that might matter. Uh so uh they have a universal license terms for the generative services. So here we have a few options. We have default settings or custom settings. Um I'm going to go with default settings because custom settings is a lot of work. But really what we want to do is just set up the default one that is uh I don't want to say on demand, but like the serverless one, the one that's not running a literal server constantly in the background charging you big bucks. And so now I believe it's deployed, which is interesting how fast that deployed. Let's click back to make sure we can get back to that model. And so here it is. Okay. It's cuz they changed the interface on me, so I get kind of confused sometimes. We go into here and here it is. And so now uh I guess what we can do is go ahead and utilize it. So let me just think about this for a second of uh what it is that I want to do with this. Just give me a second, okay? So um I had to think about it and um I for those who don't know, I'm learning Japanese. I also like Star Trek, so I would say like, can we do uh can you generate generate an image of uh Star Trek uh TNG uh Star Trek uh TNG Next Generation crew as an uh scene an anime scene. And we'll go ahead and see if it can do that. So we'll go ahead and hit enter here. It's off to the races. And here it says lacks the required information to do that. So I obviously have a permissions issue. Uh and so I think to fix this, I'm going to have to make my way over to the Azure portal and I'm going to go over to IAM. And mmm I'm trying to think about how to get there. So I guess it's Azure AI resource basically is what I'm looking for. So we'll go over here. We'll say Azure AI resource. Okay. And so I I guess I'll just type in IAM. I'm not exactly sure, so let me go look for it, okay? Oh, you know what? We're right on it right now. So the resource itself that we have here, if we go back over to uh Azure Foundry and we go to here and then we click into our our resource here, we have access IAM. And so I believe this is the way that I can get myself permissions. Um and so in here, I feel like I would need to add uh a role assignment. And so we'll go ahead and do that. And in here, I'm going to go choose um a particular role that would probably help me. So I think it used to be called cognitive something, so I'm going to look for that because I have a strong feeling that's what it is. You have to understand the history of the naming of this stuff as it's changed over time. And so um I'm going to go with contributor. Lets you read, update, delete, manage keys of cognitive services. I have a strong feeling that's what it probably is. But what did it say over here? Cognitive Services account. Yeah, yeah, exactly like that. And so I believe that's our issue. Uh do you like how my old school Azure memory just kicks in and and we're able to utilize that? That's so good. And so in here, we want to choose the user group service principal and uh we want to go ahead and select members. And so we'll go ahead and select Andrew Brown and add add add me there. And so I'll go ahead and review and assign. And uh I'll make sure in the instructions for this course to front load this before the step so you will have the instructions already that will help you get through here. But we will go uh do that. Sometimes this stuff takes time to propagate. So we will go ahead and uh give this a clear all here. Delete all. And it might not work here. So I'll just go here and just say um you know, generate me an image of a of a Star Trek character uh as in the style of anime. I don't know if it can do that. We'll go ahead and and do that. Principal does not have API operations. Oh boy. Okay, so give me a second to figure this out, okay? I'm just going to have to take a guess here and we're going to have to go back here and add another role. This is totally typical uh uh what do you call it? Azure for your principles. And so we'll go back to what's it called? Cog uh um uh cognitive, right? Cognitive. Cognitive. And so if it's not contributor, there's like a more generic one here. So I'm just going through here. I I recognize this stuff. List and read your keys. Let's try this one. And so we will try this one here. We can also be very aggressive and just give like full full permissions, but we'll have to uh work through that and see what happens. And so we'll review and assign and give it a moment here. So that's now added. So and again, these things might take time to propagate. And now I'm going to get tired of typing a fun prompt and I'm just going to type like uh apple. You know, give me apple. And so we still have this issue, but let's give it a moment to propagate, okay? Because sometimes uh we go up to here and it just takes time for these roles to propagate. All right, so there might be one other one that we can try and we'll go ahead and see if this helps. Typical permissions. Foundry. Oh, like does Foundry have a user? I mean, does Foundry owner grants reads whatever. Let's try this one. Next. Add it. Add it to me. There we go. Review and assign. Review and assign. More permissions for me. It's going to be like give me full access to the account to like be able to do it. And so we'll add that here. We'll say uh we'll give this another refresh here. And I'm going to go ahead and refresh this. And we are going to say apple and hit enter. And I I still can't do it. So what I'm going to do is just hang out for a bit until I have access. So one thing I kind of wonder is that in here the IAM, we have uh and we're under here the Foundry. View my access. Let's go ahead and check this. And so here we can see that I have cognitive like I'm the owner. User administration access, cognitive user services. So I have a lot of access here. And can we check this here? So I I don't know what the issue is here. Um So is this the same thing? View. That's not going to help. And I guess I'll just try again. Again, sometimes Microsoft is tricky and Azure is tricky because it again propagation. So we'll try this one more time. Uh and then if not, I mean, I guess we'll try it more times. Still doesn't work. That is not clear whatsoever. I would love to know as to why that is happening. Uh can we see more activity? Sometimes that helps. Can we see more activity? Um So yeah, I'm not sure, but I guess I'll debug it more. Another thing I'd probably want to check out is did the deployment actually finish? Sometimes there's uh that kind of issue. So let's take a look here and see if it's done. It succeeded. It's deployed. Right? So I'm going to reopen the playground here. Apple. Nope. All right, let's take a look here. So I just searched up uh permissions for Foundry and here there is a bunch of roles. Uh and so obviously we did Foundry user. Um and cognitive services are older ones. Um obviously here. So we don't use Azure AI developer. We don't need that. And so you can see the information. So I'm going to go full full blast here. Which still not has the full thing. Develop and build a project data action. So Foundry account owner is the highest level. And so I guess what I will do, even though it's insane, I'm going to go ahead and add that one here uh because, you know, I want it to work, right? I want to get things done here, but I obviously shouldn't need that much permissions. Um and so we'll go account owner, which is just overkill and uh again, this is my own account, so it's fine. But uh, you know, if you aren't the owner and you don't need to give yourself full permission, right? Like why would you do that? So we'll go ahead and we'll add that role. And I'm going to assume it takes time to propagate. So we will go and try to make another apple. Okay, we're on flash. I also deployed another model. It's basically the same thing, just a smaller one of it. And so it still doesn't work. I will come back to this in let's say 30 minutes and see if it works. Uh but I can tell you right now, if uh this does work, I'm not going to go and delete my project for all the follow alongs going to use the same one as permissions is the biggest pain in the world, okay? Hey folks, so you can see I have an apple image. All I did was go to bed, have breakfast, wake up, and try it again, and it works. So this is kind of the most important teaching moment that I can provide to you about Azure, and that it is uh what's the um analogy we can use? It looks polished on the front, has beautiful UI, janky in the back. Uh propagation is a common issue. Just thing's not working as expected. Sometimes there's multiple ways to do things and only works one way despite having multiple ways to work it or something you've done again and again and again and again just decides not to work for whatever reason. And there is no AI tool, there is no documentation that can help you. All you can do is wait and have confidence that it might work or try again later on. And so that's what I did, and it works. But here we have an apple. We'll go ahead and type an orange. So we'll go ahead and and see if we can generate an orange. Um and so I'm just kind of wondering what else we can do. Uh just because, you know, this whole thing threw me off here, but I guess other things we could probably do is explore the parameters. So somewhere here, yeah, down here we have parameters. Notice we have width and height that we can adjust. Right now we're on flash, so I'd actually be curious to go look at uh the other model because this one might have more parameters. So we'll go into this one. You can see these were generated with I mean, that that I mean, we know we just generated them with flash, so I'm not sure why they are showing that. We will take a look at our parameters here and all we have is width and height. Hmm. Okay, just a second. Okay, so I mean, I thought there would be a few more options, but I guess this is all we have. So we can go ahead and just give it like a strange image size. And I'm going to go to uh our other model here. Check our parameters. We'll do something weird and be like uh we'll give it a lot of height and a a bit of width. Right? And then we'll say generate uh straw. We'll just say straw because that such a weird shape should uh work perfectly for that. So we will give it a uh moment for that to work. So we'll give it a moment here to generate out. And so you see we can't really distort the image too much, but you we can go ahead and download it here. So obviously it would download up to there. Uh we can copy the image to our clipboard. Um we can view the code and we have different ways that we could uh utilize this. But again, this might be a little bit out of scope for uh this project here, but the idea is that we could execute this programmatically um if you are on your own machine and you have the authentication key that you've downloaded. Um so pretty straightforward and I mean that's about it. So if you want to clean this up, I personally don't want to clean this up because it's such a pain. These are um utilizing the serverless deployments, meaning that we shouldn't be getting charged for when it's not in use. So you can hit the delete button here and get rid of it. You can go and delete the original um resource group. So if you go over to here to AI Foundry and you go to overview, it should tell us the resource group here. And then if you delete the resource group, it'll delete everything, not just one thing, but everything in it, okay? But you saw how hard it was for me to get permission set up and uh that stuff. And so since I'm going to do a series of videos here, I don't want to clean this up right now. I can clean it up at the end of the course. But um and I it's up to you what you want to do, but if you're going to do this course all in one go, I would probably just keep these resources around. Uh but the instructions will probably tell you to set it up every single time, but you don't have to do that, okay folks? Um but uh yeah, there you go. All right, so I said I I wrap this up, but I'm actually kind of curious because there actually is one more image and I didn't deploy it, which was the uh 2.6. It's because I keep thinking there's a parameter, cuz I have in my instructions about a parameter about web grounding, and I just don't know if it actually does exist or not. So let's go back over to Web Foundry here and I'm going to deploy another base model. And I just want to go ahead and do image, and we will take a look here at image 2.6. And we'll give it a moment here to work. And I'm going to go ahead and deploy this with the default settings. We'll give it a moment here. And so now we have 2.6. So I want to go here and it says attach an image to use as for reference. And then we have parameters. And so now we do have web grounding and we do have aspect ratio. So let's say we wanted to generate a tile. So I could go here and just say create a tile for a puzzle game uh to create a tile for a puzzle game uh So a ground tile of stone. Okay? And so we'll go ahead and try that out and give it a moment. And so we'll see what comes out here. And we do have some other options. We also can add a reference image. So I think that's kind of important. Um but web grounding. So web grounding would be useful if you're trying to say like go to the internet and find reference images. That way you wouldn't have to do that. Um but how does that work if it's like copyright? That's kind of the frustrating part here. But we will see what this comes up with. This is obviously slower because it's a larger model. Um I bet we could put another one in here and just say like can Yeah, there we go. So can you generate an image? Um I'm trying to think of something to search for. So how do you do web grounding? So you have a difference for it. Um So I'm trying to think of something that might be complicated to do. So like uh generate an image of a person riding a horse, a black stallion on the moon. And so we'll try this. And then I'll just ahead and do this. I don't really have a good example for web grounding for this one. And then we will wait for that one to generate and try out web grounding. And so that is something, which is great. And so we'll try it again. And I'm going to go ahead and put web grounding on. I expect something similar, but like I don't know how I could really test web grounding, to be honest. Um I mean, the only thing I can think of is that you need a very specific example, and I just don't have that. But we'll give this a moment to generate. So we certainly have a different image, but I can't really attribute that to web grounding. Um and the other thing is that we can do a reference image, so I might be interested in doing that. So I'm going to go ahead and just find a reference image. So we will look for a um uh reference uh character pose. Cuz there's probably tons of these online. I'm just looking for any any one online. So I've just typed into Google um that. And so here is an example of one. So I got a screenshot. Literally just search character reference pose. Grab any you want. And so I'm going to go and uh attach this, one second. So now we have a reference pose. And so we want to give it a character and I'm going to just say um gold robot uh ninja in the poses provided. Um Okay, we'll go ahead and see what we get. So in in that case, those three poses should get picked up, I'm hoping, but we will see. We did give it multiple, so that might be a little bit hard for it, but we'll find out. And there we go. And I would say that works. I mean, whether you like it or not is a different story. It does look like it's hand-drawn, though. Um so that is that is definitely accurate. Copy link address. I'm just wondering if we can get a larger one of that. That is very small. And so, yeah, I mean, that works uh perfectly, exactly as you'd expect it to work. Not sure why there's a Is it on my screen? There's a smear on my screen. Oh yeah, it's on my screen. Sorry, there's a there's a mark on my screen and it's not actually on the image. Um but there you go. I think that is the full capabilities of it. Again, I'm going to keep these models around as I don't want to have a headache. Um but uh you can see that parameters can change based on providers. We could end up launching another model here and it could have a different result. Um but I think this is sufficient enough, okay? Okay, let's take a look here at content understanding, specifically documents and forms. So, Azure content understanding uses pre-built analyzers to extract out text, tables, and layout information from documents, okay? So, you choose an analyzer that matches your document and task. You analyze the document to collect text or fields that the app needs. You review the results before using them in the app. Um and if you look here, you can see uh some different outputs. So, there we have a document on the left hand side. So, that is what we're trying to analyze. And on the right hand side, we're getting its uh its output, which is markdown, okay? So, for custom understanding, there are multiple different types of analyzer and the analyzer is going to determine uh what you should use based on what you are analyzing, right? So, let's take a look at the different types of analyzers that we can utilize. Um and so, if we are dealing with documents, then we want to use the documents analyzer because it can extract invoices, numbers, totals, and line items from a PDF. If we're working with images, we want to use the images analyzer to extract product details from a photo. If we want to uh extract information out of audio, guess what we use? The audio analyzer for transcribe voicemail and extract the caller's request. If it's video, video analyzer. So, you kind of get the idea here. And these are all pre-built analyzers that are made readily available. But if there's one that you need that it needs to be specialized, you can create custom analyzers and we'll talk about that. Uh and so, I just to make emphasis about content understanding. So obviously uh LLMs can do these things, right? So you say, well, why wouldn't we just use uh you know, GPT or um whatever Azure Azure specific models are to do this kind of processing? And generally they can, but these this the content understanding, it's it's a more narrower type of machine learning, traditional machine learning models. And so it's going to be more cost effective than using LLM and that's the reason why you may want to use content understanding over an LLM model. Um and so you just have those options there depending on your use case, okay? So we said that you can define a custom analyzer. Let's look at that process. So uh a custom analyzer uses a schema you define to extract the information specific to your application. So here we are creating a custom schema. And so on the left hand side you can see uh that we have a document, actually specifically a PNG image, and we're trying to uh determine what is it that we're expecting to get out of this document. So here you can see that it's suggesting fields, but we could add fields and the idea is that if we have a repeatable document that we're constantly getting, that it's going to expect to look for those things in a very specific location. Um but anyway, so we have the field name. This is the name uh this is the name that you provide for what you want the information to be. You have the description explains what the analyzer should look for. We have value types, so you have string, date and number. So not a lot of options, but I mean, I think that's probably enough for um analyzing images or documents. Uh suggest. So proposes fields from a sample for you to review and adjust. So you'll notice here, let me get my pen out. We have a button here, suggest. And when you press it, then it will just suggest those fields, obviously with their value type and their description. Um so if you're not sure, you could start with that and then tweak them from there. Um and so this example here obviously is about equipment maintenance report. And so look at the thing. We can see there's equipment ID, there's an inspection date. Um we can see that there are findings and it's a list, right? Um and so notice here, list of objects, date, string. Makes sense, right? Uh each finding contains a description and severity, uh which is an example of nested fields. But there you go. Hey, this is Andrew. In this video, we want to look at how we can extract data from uh documents and forms, or at least uh analyze them and stuff like that. So let's make our way over to build into services. And um I I believe this is all part of the cognitive services that have existed for a very long time and they have repackaged it so many times, but now it lives here. And so you can see there's a uh bunch of stuff that we can do a document. So notice we have OCR reader and document fields analyzer. And so probably what we'll want to do is test out the OCR feature. Now, to be honest, I pay for Adobe Acrobat. It works really well. Uh it's a single single cost to me, but you know, if if for whatever reason you need something on demand with cloud services, you have that option there. And you can see right away that they have um some existing examples. So um these ones obviously already have the output. So we should try to find something where there's something different. But notice this one here, it has uh these metrics and numbers. So some of these are going to give you better results than others. But let me find a document. Um I've been starting to play D&D a little bit, so I'll say D&D character sheet template uh PDF and let's see if I can find one uh filled already in. So I'm just looking for uh uh pre-built pre-made sheet. I'm just typing this in. People are starting to call this slow Google when you type it manually and you look for stuff. And so I'm just looking for an existing um character sheet that I can download. And not fillable, but I want one that already exists. So here, maybe this one here. Whoops. I mean, I guess I ended up opening that one, but does that have any character sheets in them? So here we have some, and I'm just wondering if any of these are pre-filled. Form fillable print version. So open this one up. And I was hoping one that was already filled in to be honest. And you can say, Andrew, why don't you just fill in your own? Cuz I do not want to spend forever to do that. Character sheets in non-English languages. Oh, pre-generated warriors. Okay, so here's examples of one that already generated. By the way, we are playing a small campaign and I play a druid, uh, hill dwarf, uh, but I'm not sure if we're going to find that here. We have human druid, which is fine. We'll go ahead and grab that. Now, does that give me a sheet already filled in? Let's go take a look. And we have here druid one maybe? Is this it? Oh, yeah, there we go. Yep, yep, yep, yep, yep. This is what I wanted. So I'm going to drag this onto my desktop. Okay. And then we will go ahead and upload uh, upload that image. One second. So I just uploaded it and I haven't ran the analysis yet. This uh UI is a little bit small, maybe cuz oh yeah, cuz I'm zoomed in. Um, but that shouldn't really make a difference. Uh, we'll go ahead and we'll try this here. So I'm just curious about what kind of information we can see. Oh, I can use the scroll and stuff. That's nice. So human druid and all of its information, which is nice. Um, And so what we'll do here is we'll go ahead and we have a few different modes, a document, audio, image. Okay, fine. Uh, I guess it's all just under content understanding so you don't have to uh go back and click the stuff. But we'll go ahead and run the analysis and see what result we get. And there you go. All things have a spirit within. My spirit is my strength. Cool. And so there is its information. Is it accurate? I don't know. We'd have to go read it very thoroughly to find out. Um Oh, be oh, no, no, there we go. Okay, that's really useful. We can actually see exactly where the information's being extracted. Oh, well, look at that. And so I I would believe that as a result you get, yeah, exactly, JSON data and it breaks up that information. So sometimes the reason why you would want to use an OCR program from a cloud provider instead of, let's say, Adobe Acrobat is that you get rich, rich um data and sometimes it can be down to like very specific words or other things like that. And so it really depends on your technical use case of what you need the structured data to look like. Um and so I don't have strong opinions about this one, but I know in the past that um I have chosen some providers like over AWS, over Azure based on what comes out as the output and vice versa, right? And so that is one thing that we looked at. I think another thing that we could look at would be um uh let me let me just take a look here. Honestly, I think this is fine enough to be honest. Um and there should be a place for code, maybe over here. And so if you wanted to programmatically run it, they have the code. Everything seems to be Python these days. But again, you can go back here and you know, whatever it is, we have document layout analyzer. So here's a document and you run the analysis, right? Okay, these tools aren't complicated. We'll give it a moment here to run. Okay, and this comes back and notice that the information is extremely uh extremely structured. So I mean, this is pretty similar to OCR. Um paragraphs, tables, metadata. So we go back over to here. Yeah, so this one's more like if you have something that's very layout heavy, this one's going to be a lot better. And they have some very specific ones like invoice analyzer, call center analyzer, tax US stuff. Um but you know, unless you're really doing those specific things, like this is a very specific tax form, then uh you know, it is what it is, right? Um but for the most part, you know, it's these three, document layout analyzer, OCR read analyzer, document fields analyzer are our our a few here, but I'm not going to deploy them all as we pretty much got the idea with OCR reader analyzer. But there you go, okay? Let's take Let's take look here at Cognitive Understanding SDK. So, um it obviously lets you work with the Cognitive Understanding uh service. And the reason I really want to show you this is just to show you the differences in the API definitions. So notice this one is Azure AI. And so there's obviously cognitive services. And the reason why Cognitive Understanding doesn't have cognitive services is that it came later and so they already started standardizing things under Azure AI. Um but it's not uh not too crazy here. The idea is that we say we want to begin an uh an analyzer. We specify what the analyzer is and we give it inputs. So nothing super complicated here. Um one thing you do need to uh notice is that there is a polar. So it's going to pull uh after a given time. So whatever that frequency is, I don't know, 1 minute, 10 seconds. But the point is it's going to keep polling until it's done. And then you'll uh receive your results. Okay. So knowledge mining is a discipline in AI that uses a combination of intelligent services to quickly learn from vast amounts of information. So it allows organizations to deeply understand and easily explore information, uncover hidden insights and find relationships and patterns at scale. So we have ingest, enrich, and explore. These are three steps. So for ingest, content from a range of sources using connectors to first and third party data stores. So we might have structured data such as databases, CSVs. Uh the CSVs would more be semi-structured, but we're not going to get into that level of detail. Unstructured data, so PDFs, videos, images, and audio. Enrich the content with AI capabilities that let you extract information, find patterns and deepen understanding. So cognitive services like vision, language, speech, decision, and search. And explore the newly indexed data via search bots, existing businesses, applications, and data visualizations. Enrich uh structured data, customer relationship management, wrap systems, Power BI. This whole knowledge mining thing is a thing, but like I believe that the whole model around this is so that Azure uh shows you how you can use the cognitive services to solve uh things without having to invent new solutions. So, let's look at a bunch of use cases that Azure has uh and see what where we can find some uh useful use. So, the first one here is for content research. So, when organizations uh task employees to review and research of technical data, it can be tedious to read page after page of dense text. Knowledge mining helps employees quickly review these dense materials. So, you have a document and in the enrichment step, you could be doing printed text recognition, key phrase extraction, sharpener uh sharpen skills, technical keyword sanitation, format definition, minor, large scale vocabulary matcher. You put it through a search service and now you have search reference library, so it makes things a lot easier to work with. Uh now we have uh audit risk compliance management. So, developers could use knowledge mining to help attorneys quickly identify entities of importance from discovery documents and flag important ideas across documents. So, we have documents, so clause extraction, clause uh classification, GDPR risk, uh named uh identity extraction, key phrase extraction, language detection, automate translation. Uh then you put it back into a search index and now you can use it in management platform or a Word plugin. And so we have business process management in industries where bidding competition is fierce or when the diagnosis of a problem must be quick or in near real time, companies use knowledge mining to avoid costly mistakes. So, the client drilling and uh uh and completion reports, document processor, AI services and custom models, queue for human validation, intelligent automation. You send it to a backend system or a data lake and or a data lake and then you do your analytics dashboard. Then we have customer support and feedback uh analysis. So, for many companies, customer support is costly and uh efficient. Knowledge mining can help customer support teams quickly find the right answers for a customer inquiry or assess customer sentiment at scale. So, you have your source data, you do your document cracking, use cognitive skills, so pre-trained services or custom. Uh you have enriched documents. From here, you're going to do your projections and have a knowledge store. You're going to have a search index and then do your analytics, something like Power BI. Uh we have digital assessment management. I know there's a lot of these, but it really helps you understand how cognitive services are going to be useful. Uh given the amount of unstructured data created daily, many companies are struggling to make use of or find information within their files. Knowledge mining through a search index makes it easy for end customers and employees to locate what they're looking for faster. So you ingest like art metadata and the actual images themselves. For the top layer, we're doing geo point extractor, biographical enricher. Then down below, we're tagging, we're custom object detector, similar image tagger. We put it in a search index. They love those search indexes, and now you have an art explorer. Uh we have contract management. This is the last one here. Many companies create products for multiple sectors, hence the business opportunities with different vendors and buyers increase exponentially. Knowledge mining can help organizations to scour thousands of pages of sources to create accurate bids. So here we have RFP documents. Um this will actually probably come back later in the original set, but we will ex uh we'll we'll do risk extraction, print text recognition, key phrase extraction, organizational extraction, engineering standards. We'll create a search index and put it here. This will bring back data. Also, metadata extraction will come back here, and then this is just like a continuous pipeline, okay? All right, let's talk about system prompts. So this gives the model instructions on how to behave and respond. And the thing that you got to remember here is the word instructions. So the system prompt is the instructions or sometimes called system instructions, but you should know it as system prompt. And so what we can do here is set the model's role and scope. Um we can specify the tone, the format, and level of detail. And the key thing that I think a lot of people leave out about system prompt is that uh it's not intended to be overridden by user requests. And so uh if there's something that you think that someone could exploit by uh them typing the user prompt to tell it to forget all rules. The system prompt is there to protect you uh from prompt injection, right? So, it's when somebody just tells them all to ignore its rules. You can see an example here where we have it's like you are a steady assistant for Azure AI fundamentals. Answer uh answer in one simple questions so we're specify in the format what you do. We could also tell it to provide a tone like it could be sassy or whatever, but sometimes models won't do that. So, even if you tell it to to tell you to be like be an abusive teacher, uh there are safeguards in the model that sometimes will prevent it from being able to do that even if uh there's no harm in terms of what you're doing because uh it's just for fun, right? But anyway, that is the system prompt. If you've ever talked to an AI assistant before, you are prompting it and specifically you're utilizing the user prompt. These are prompts from the user, right? So, it's that back and forth conversation. And the idea is that you are directing uh through conversation what you want as your response. And so you provide information context the model needs. Uh you can provide uh formatted details just like the system prompt. Though the system prompt rules should more or less be the ones in place as they're not supposed to be overridden. Um but you can see here you you can follow up. So, here it says, what is speech recognition? Give me a uh a simple example. And then it gives me an example and then I can say use a simpler one. Um but hopefully that makes sense, okay? Let's take a look here at zero shot prompting. This is when the model can perform the expected task with no prior knowledge or examples provided during prompting. Uh so an example might be that you want to classify some text. So, the text here is Andrew is great at teaching Gen AI. Uh do we classify it as neutral, negative, or positive? And so the output, the next thing that the um uh large language model would write would be neutral here. But the idea is that we didn't have to provide examples of what neutral, negative, positive look like. It already had that built-in knowledge uh from when it was trained to be able to perform that task, and that's what we call zero shot. So few-shot prompting is when the model can perform the expected task with examples provided during prompting. So imagine you have a series of tweets and your model is not capable of doing sentiment analysis, so you're providing examples of what negative and positive uh tweets would look like, and the idea is that it would predict the next one based on the prior examples. Uh we could also call this in-context learning because you're providing in context in the prompt message uh the way in-context learning because you're providing it that point in time. So there you go. So the Microsoft Foundry playground is a place for you to try out models before you put them into production. Uh and the word deploy is interesting here because it can mean uh there's a model that we have deployed for use and then we use in the playground, but then you can also deploy this even further as an application, as an agent, or whatever, whatever. Um playgrounds traditionally are not necessarily used to develop applications and deploy them. Azure Foundry is the exception here where they've decided to make it more robust. Uh as that is pretty normal for Microsoft to uh put everything in the kitchen sink in terms of feature sets within their services. If that whether that's a good idea or not, I couldn't tell you, but I will just tell you generally playgrounds have specific restrictions uh and you have to go build out your applications in code and you probably should build them out in code. Um but anyway, the point is that you deploy after you choose the model you want to test, you'll you can utilize in the playground. Common things you'll see are the system instructions, also known as a system prompt, or sometimes people just say instructions, but I would think of it always system prompt. You have your user prompt, which is literally the chat history here on the right hand side. There's obviously a lot more options like uh data, parameters, etc., etc., but for the scope of what we're doing right now, not that important, okay? Hey folks, it's Andrew and I just want to quickly show you the um Semantic Kernel playground. Uh in a separate video, I show you how to set up Semantic Kernel, so um this video I just want you to watch. You don't need to follow along uh because there's too many steps. And the trick with the um the playground is that there's multiple options to get to a playground, but it might not be the playground that you want. So see down below here, it says model selection. I go test and playground and it's opened up content understanding, which is not what I want to be in. So I'm going to click on the models here and you can see there are more options of things that are deployed. And obviously we will end up deploying our own models, but I'm going to go into 6.1 Terra and it opens it up into the playground. And so you can see there are a lot of options here. So if we go up to here, these are going to be our parameters. That's going to be for endpoint key access over here. Um if we want to switch to models, if we want to attach tools, uh if we want to connect to a knowledge base and ground information, if we want to persist memory, if we want to add guard rails. These are pretty standard for most agent uh frameworks, but for whatever reason, Microsoft Foundry has chosen kind of a middle ground where their playground actually is more capable than what is being shown here. Um and it's just it's just what they have done. So, but anyway, uh I just wanted to quickly show you where that is that is at and we will in a future video actually use this, okay? Let's take a look at model pricing. So this depends on the model you choose, the type of content it processes and how much you use it. Pricing often is measured in tokens, which can be words or part of words or other parts of data. And there are common pricing properties you should be looking out for like input tokens. Uh so this is the amount of tokens that are being sent uh as input to the model. Obviously output tokens, these are the amount of tokens being produced outwards, um then token pricing has stuff usually listed as per million tokens. So I think that is another uh key indicator here that you should be looking out for. And then there can be different rates for images and audios and all sorts of other features. So you really do have to check the Azure pricing for every single model. Let's take a look at a pricing example. So um let's say we're looking at text token pricing for GPT models and we can see they are per 1 million per tokens. So we have 10 cents, a dollar, $2, 50 cents, $5, $10 here. And then image pricing for that as well. Um this is obviously a separate model, but um the point is is that here you see $5 uh input for just the text and then for the image input alone, it's $8 and the image output, it's $30. So again, it's going to greatly vary. Um but you really do need to look at the pricing pages. All right, so here I'm on a Foundry model pricing. If we go down below, you can see um there is different pricing. Usually we're looking at serverless deployment as that's just going to be based on your token usage. But notice that if you are using manage compute, that it's going to have um an hourly cost. So it's not really it doesn't really matter how many tokens you use because um it's going to be based on that compute, but compute can get very expensive. Not a whole lot models can just run on an H100, so it's going to be very specific which ones can do that. But a lot of these really larger capable models are basically serverless deployment only to be honest. Uh so here I have cohere and uh just looking at it, you'll see that we can see input output uh for uh cohere command a global. I'll make this a little bit larger. But then notice here for uh cohere embedded, now it's saying text and image. And so you can see sometimes it's based on input output, sometimes it's just wholly based on the text or images and some and that can be like an included cost of input and output. Um and again, it just greatly varies. We go over to uh AOAI and we go down below here and they don't show any serverless deployment, so that is not useful. Um but maybe we'll go to Groq, as that would definitely have a serverless deployment since it's a third-party provider. And so there's look, it's just they lay them out differently completely. This one's side by side, but it's still input output tokens, and they're specifying 1 million per token each. So again, every single model, you have to check it because it can be completely different. Like look down here, this one specifically has cash input pricing. So it completely varies, okay? Let's take a look at prompt chaining. So prompt chaining is where the output of one LLM prompt is used as the input for the next prompt in a sequence. Uh the reason is when the context window of the prompt is too small to complete a single large or complex text task, so we break the task up into smaller tasks. So an example would be imagine we have a movie that we want to watch, or sorry, there's a movie that we want to watch uh to learn Japanese. And so we want to take the subtitles file and convert it into English uh and then also get grammar rules around it and then provide it in a JSON lines file. This is actually something that we do in the boot camp, and I didn't even realize I was doing prompt chaining when I did it, but uh I tried to give it a very complex uh prompt, and it just would not do it. It would just make a lot of mistakes or give me bad information. And so I had to break it up into smaller tasks. And so the thing I had to do was iterate each over each line in the actual um uh subtitles file and say translate each line from Japanese to English. And then I would then um ask it to produce a list of grammar rules that it found in the sentence. Then I would then ask it to explain the grammar rule and then provide five examples. Then I would format the original line, uh translator line, the grammar rule examples into JSON uh file. So again, this is just where you're breaking up a task because the the um LLM cannot handle such a large task, okay? Let's take a look at chain of thought. So chain of thought prompting is when you tell the model to do step-by-step reasoning so it produces a more accurate result. Without chain of thought, you'd say something like, which two prime numbers sum to 10? With chain of thought, you'd say, please solve the problem step by step. First outline your uh your reasoning is clear, uh logical chain of thought, then provide the final concise answer. This is not a huge issue for uh larger modern models, but the smaller models, um sometimes they just don't know things unless they talk out loud and work through it. So uh sometimes you get extremely better results by just telling it to think out loud and think step by step. Um and so that's all that is really happening here, okay? Let's take a look at tree of thought. So tree of thought prompting is where the prompt instructs the model to explore possible states and transitions rather than trying to produce an answer immediately in a single chain of thought, basically creating a decision tree. And we kind of do this in the boot camp with um uh another one where it's the Japanese language uh uh Japanese language construction helper where we actually define states and tell it how to transition between uh one and the other. But here is a diagram that you'll see a lot every time you look up a tree of thought, everyone's using the same diagram, so I pulled it as well. And so here you see on A, you have input output prompting. So that's just where you give it an input and you get an output like zero or few shot. Chain of thought prompting where we will tell it to um uh think about things through it. Then we have self-consistency with uh chain of thought and and uh uh and self-consistency. So this is where it produces multiple things and it uses voting to come to a final result. I don't think we made a slide on this, but it is another thing that we can do. And then you have tree of thought where um it has multiple ways that it can go through uh uh logic. It can uh add branches, remove branches, but the idea is that it's not taking a um a a a linear line. It's going to evaluate multiple options to get to the end. So this one's a lot more complex, but I thought it was just really cool to uh demonstrate here, okay? Hey, this is Andrew Brown. In this video, we're going to work with an LLM. Um in some of these videos, I'm going to use Azure OpenAi Studio. In some of them, I'm going to use Azure AI Studio. Technically, Azure AI Studio is new, but it's in preview. Um maybe they'll get rid of OpenAI service, but just in case that is the case, I'm going to go ahead and in this video, we're going to use Azure AI Studio. Now, I've spun up um a hub um previously in West US, but the first thing we might want to do is just look at model availability in Azure in Azure uh AI Studio because that's going to affect what we're able uh to utilize. And somewhere here, ah, here we go. We can see what models we can use. So, if we are in West US, we have Turbo. Um and we have 35 Turbo, Turbo Instruct. So, we have quite a few options there. Okay. So, I think where I would like to deploy, and notice like there's a lot in Sweden, but I think that I would like to work in West US because I've already launched one up there. But if we run into an issue, we can also have East US all right. Um it depends on what we want to do because like there are some here like Turbo Instruct. This is a model that is already prepped to accept instructions and do really well, whereas this is more of a generic model. So, it really depends on uh what you want to utilize. But anyway, I'm going to go um and switch over to West US. So, right now, it thinks I'm uh in the wrong place. So, I'm going to go over to portal.azure.com. And from here, we are going to navigate over to Azure AI Studio. And here, we have a hub already, and I'm going to enter that hub. And so once we have our hub, um now we can go to the model catalog and and start launching a service and we do have playgrounds, but I recommend that you go and always scope things to a project. I'm going to let it create a project based on my name because I do not care here today. And we'll go ahead and create that project and give it a moment. And if you do create a project, you're going to see a lot more options available. Um and I think that's what we want to do. So we'll give it a moment there to provision. All right, so now our project is ready and you'll notice there's a lot more options here on the left hand side. Um but yeah, we want to uh start working in the chat. And this of course is a playground that is very similar to OpenAI. So OpenAI is a company that um is partnered with Microsoft, not necessarily owned by Microsoft, but they have their own playground where you can uh work with a large language model uh before you uh actually go ahead and use it programmatically. Um and so these things are very similar. Just understand that it is a very similar experience. So the first thing we'll need to do is actually set up a deployment. So we can go to our model catalog and we can see there are a lot of options here. I want to point out that if you have yet to uh do so, if you want to work with a model, you or sorry, if you want to work with a family of models like OpenAI, you have to submit a request. It might take 48 hours to a week and then you'll be able to utilize it. If this happens to you, just understand that submit it once for any of the GPT products and um just check in in a few days and see if it becomes available to you um because they're not very good at communicating. But it was a very unusual uh process there, but I eventually did get access to um the model catalog. Obviously, there's a lot of other stuff here. Um and I'll try something else other than just uh GPT, but for the exams, you just need to know GPT, but I figured it'd be fun to try something out else out. I wish they would just tell us what models are actually available uh for our region so we don't have to like try to launch it and find out we can't do it. But that's okay. So I'm going to launch um see, it looks like we have turbo instruct, but I'm pretty sure we don't. But we'll go with GPT 35 turbo. Now there's of course newer models, but it really depends on um when you go here what your deployment model is. So if we go here, we might not have this particular option. So here we have global batch, standard, and provisioned manage. So I just want to show you here that there are four different types of deployment type. We have global batch, global standard, standard and provision. So global batch is where you are going to send workloads um to the API and they'll return back uh way later, okay? And so I assume that makes it very cost effective, but the idea is that um you're not going to get the results right right back right away. Then you have global standard. So this is where it is globally available. Then you have one that is standard where it's just regionally available and then you have provisioned. For whatever reason, uh uh um uh the the cost for the cost for regional is more expensive than standard. So if you want to just take a look here at the pricing, we'll go here. The the pricing goes the same page. If we go down here below, we have global and regional and notice that some in the regional have an additional cost to it. Okay? So just be aware of that. Um but today we are working with uh Turbo and you can see Turbo is very, very inexpensive, but it might not be available in specific types of deployments, okay? Um there is also provision, but I don't have a whole lot of confidence what the cost of that is, so I'm just going to stay away from it here because I don't want to um cause myself to have a large bill and then my co-founder Andrew, also named Andrew, is like, hey, what's going on? So I'm just going to choose standard here. Uh if you are uncomfortable with any kind of spend, just watch and learn, but I'm going to go ahead and deploy this here today. So these models don't take super long to deploy. So here it is. And we'll go over to our chat playground and let's go see if we can um work with this just yet. So I'm not seeing it. It's not aware of the deployment. Oh, this is Azure for you, so just give it a hard refresh as I know we have deployed it. And the UI here is a little bit different than Azure AI OpenAI Studio. So there it is now. Okay, great. And so, um, we have our system message and this is where you're going to uh ground the the agent so that it knows what it is. I I when I say agent, but I really should say uh LLM model, but technically it is an agent here. Um and so what we want to do is we want to um establish what it is. So right now, like I'm learning Japanese and so I might want to prepare this agent to tell it that it is a Japanese teacher. So let's say uh you are a Japanese uh teacher, uh language teacher, right? Language Okay. Language teacher. Um you are teaching people that do not speak Japanese but English. So instruct in English. So that's one way that you can write your system message. And so that's one of the easiest ways. Um different models uh prefer different kinds of structures, but this will work as a start. Okay? And so we have our system message here. And sometimes you have to um uh apply changes. So we'll click apply changes. And so that way it will take effect. Okay, I think it's there now. And so now what we can do is we can go ahead and talk to this. So, hello, how are you? Right? And we'll see what happens. Okay. So not exactly what I wanted to do. But um what we'll do is I'll tell it to to like so please be ready to instruct me. It's like so when I first talk to you, please ask me about my about my language goals. Okay? So, we'll see if it can understand that a little bit better. Remember, this is GPT the 3.5 Turbo, so it's not as intelligent as GPT-4. And so, I'm going to go ahead and apply those changes, and we'll see what we get here. So now, it is updated again. So, hello. And let's see if it takes that. Here we go. Hello, what are your language goals? Are you looking to improve your Japanese? Yes. Okay. Great. What specifically would you like to focus on here? And so, we can say listening. All right. And so, you're getting an idea of prompt engineering. This is just the start of it. Now, I don't like to format format my documents this way. I like to do it this way. I like to say role, profession. Okay. Japanese language teacher. Um and then we could say output format. Um Or we could say yeah, output or we could say like tone. We can say tone. We say rude. Rude and concise. And then we could say something like output format. And here, we would say we would do something like um uh always bold every other word. Okay. And then we could say instructions. When first greeted, when you receive your first message or direct um user towards Japanese learning goals. And so, this is this requires a lot of um attempts and work to to make a prompt template or prompt document work really well for you. I'm going to just clear the chat here because we are starting over and I'll just say hello. And let's see if it if it works with that, okay? What do you want? I want Aren't you supposed to do something? Okay. Yes, I teach Japanese. What's your problem? Oh, right, cuz it's rude. Uh I would like to learn [laughter] Japanese, right? Because it was talking rudely to me. Well, good for you. What's your uh goals for Japanese? I don't know. Do you want to travel? Uh we'll say uh travel, right? Cool. So, you can see that um just by doing this, we're getting the same thing. So, whether you want to have it more conversational or what whatever, it's up to you. These prompt documents can get really large. Um if you really wanted to do really well, you can give it um example prompts. Uh different kinds of models will have different kinds of syntax. I don't know if uh OpenAI has any OpenAI uh or sorry, GPT-3.5 uh prompt example format uh syntax. Sometimes there's like a syntax you have to use to effectively prompt it. And I know we're looking at an older model, but here notice that um they might suggest a format. So, I'm not necessarily seeing one here. But what I'm talking about is like if let's say we use something like Cohere and we go to its documentation. And go Cohere documentation. And we were to go to somewhere like docs. I'm just trying to show you what I mean about like formatting a doc a doc, okay? So Oh, is this the docs? Oh, I guess they changed it. It didn't look like this before. I'm a little bit confused. Um but what I'm looking for here is like if we go to um prompt engineering I do not like this new format. [music] Choose again code here um documentation. Is that really the new docs? It is. And so in here they they uh they talk about prompt engineering. Uh let me can find example. So I'll just say code here XML prompt examples constructing prompts. Go down here to examples. Hmm. Well, they're not really showing it. But basically the what I'm trying to say here is that they might do something and uh below and just say like we'll say like prompt prompt What a terrible example here. Prompt and then inside of that we would then have um like question and answer. So the idea is that you tell what's a good prompt and what's a bad prompt. And so that's something that we might want to do here. So I'm just trying to think of how we could um uh structure that. So I'm going to just say like um good prompt examples. And here I'll go like um hey loser. Oh, so like for example we'll just say uh user and we'll say assistant. Cuz remember that we are the user. We're the one inputting stuff and the assistant is the one that's talking back to us. And so I'm hoping that this model is going to pick up on what that means. And so it'll say user um hello. And here we'd say you woke me up. Or so I'm trying to think of something rude. So hello and um you know, maybe maybe we get some bit help here. And I I have Sonnet here on the left hand side. Um I'm going to say I need help creating prompt examples for chat or for GPT-3.5. Okay. And it's on I'm using a uh Turbo. So I'm using a chatbot to or sorry, not I keep saying chatbot, but these are chat agents. They're not bots. But um I'm going to try to use it to help me generate some out. And I'm going to give an example. So this is what I want. And so I'm going to say um user assistant um for format. Here is my prompt uh example information to help you help me generate this out. And we're trying to use a more intelligent agent um to work with a dumber agent here. So I'm going to go ahead and grab this here. Okay, and hit enter. I'll just say give me 10 examples. Let's see if it can do it. Okay, but okay, but you aren't providing the assistant. Yeah, yeah. There we go. Okay, but I don't want these numbered. And please put assistant on its own line. So you can see like how I could have made a prompt document to tell it how to help me make prompts. And so I'm kind of getting a format. So can you teach me more about basic Japanese? And so here are some examples that we have here. And we'll go over to here and we will place this down below here. And these are good prompt examples, right? Um now it doesn't have bolding, so we cannot see that here. And also, how does it know that it can bold? So that one's kind of useless for the output of format. So we might want to change this and say, always provide a word bank um in a uh always provide a word bank, okay? So that might be something that we might want to suggest there. So I'm going to go here and just break these into separate lines a little bit. So here here we have user assistant, user assistant. Um And honestly, I don't really like these examples. So I'm going to go here and just say, hello. And then this assistant will just say, go away unless you came here to learn. And then I'm going to um switch over to my Japanese keyboard here and switch over to here. And I'm going to type in nihongo, which is the Japanese language. And then we'll say I don't know, I guess we can just make one example here, but I I figured what would be good is if we gave it a um uh what do you call it? A vocabulary list. So here we'll say something like uh nihon. And then here we have the language nihongo. so I'm just going to type in Nihongo. And maybe we could even tell it what we want to do. So maybe because we don't know the language, we always wanted to supply us with um uh what do you call it? Uh Romaji. So we have Nihon Nihongo, sorry. And then down below here, this would be Nihon go. So that may be language. And then here we'd have Japan. And um and maybe we would have the word for learn. So I go here and say learn or so Japanese dictionary. I should know this word, but uh take a look here. To learn is Let's just make sure that is correct. Um Yeah, we'll use this one here, which is Well, we can play the audio and we'll hear it. >> Manabu. >> Manabu. So we'll take Manabu here. And we'll go back. And technically this would be something like Nihongo. Me What was it again? This one here is Manabu, Manabu. Okay. Manabu. But technically it would get uh conjugated. So here this wouldn't be exactly accurate. But um we'll go over here and just say learn Japanese. Translate to Japanese. This This model is a bit smarter, so it actually gave us a a proper example. Oh, okay. So we are pretty uh pretty close. We're just missing O. Okay? So, we'll go here. And this will be O, even though it's wo. Um then the idea here is that we can take this and and put this here. And we'd say um oops. To learn. And the funny part is like natural speakers might even omit the O, so I wasn't totally wrong. So, here's an example of a good prompt, but we only have one and normally you'd have to give it more than one, like five or 10. And you could also give it like a bad prompt. Um but, you know, if we use this and we get a bad prompt, then we could then bring it back here and see if it works. But let's see if this works for it, okay? Um so, I'm going to go here and just clear it and let's just say what's up? Let's see what we get. Stop wasting time and start learning Japanese unless you don't want to, don't bother me. Okay. Yes, I want to learn. Finally, some motivation. Let's get started. Here are some basic phrases to learn. Konnichiwa, arigato, ohayou gozaimasu, goodbye. Okay. Don't just say okay and do nothing. Uh please practice phrases until you get them right. Hello, konnichiwa, arigato, ohayou. Okay, I did that. Good. Now, practice introducing yourself. So, here we kind of have a model and you can see it works pretty decently. And the great thing about these more inexpensive models is that if you fine-tune them, you can get them to work as good or even better as these other ones and that has to do with adding data. So, this is our start here and I kind of like our prompt document. So, I'm going to copy this. I just don't want to lose it and we're going to go over to um our GitHub repo here. And I'm just going to press period here. I'm going I'm going to want to store this um in here somewhere. So, we'll go ahead here and just say um I'll make this and this will be oh LLMs, LLMs and I'm going to make a new folder here and just say um basic as our start here and I'm going to call this prompt document or prompt template. You can call it whatever you want. Right now, this is just TXT format because we're not working with anything else. You could technically format this as a markdown file. I like feeding um markdown files quite often. Um but if we go back over to here, okay. So, we can see that this model is in good shape. Um So, I'm just trying to think about this for a moment. Um Yeah, so one thing I I think would be nice if we could save our prompt for later and I just want to see if we can do that in the prompt catalog. So, I know that these are use cases of prompts that we can use, but I wanted to know if we could actually save our prompt here. But it doesn't appear to be that way. And the reason I I was looking for that is because over in uh Amazon Bedrock, you can actually save your prompts for later. And so that's what I was hoping for, but it appears that these are just example prompts. So, that's very unexciting. Um is there anything else that we might want to do here? I mean, there's lots that we want to do, like deploying to a web app, maybe using prompt flow, adding data. Um and there are these other sections where we can um do some other things. We go down to examples. Ah, so here we could provide examples. Let's go here. Add examples to show the chat what responses you want. It will try to mimic any response you uh add here. So, make sure they match the rules laid out in the system message. What's interesting is the fact that I mean, it's only showing one, so it's not very clear like if I add one here, can I add more than one? Doesn't really appear that way. Um but it would be interesting to see how we could work with this programmatically. We go to view code. Ah, here it is. So maybe before we wrap up this video, let's go ahead and see if we can work with this in a programmatic way. So I saw this running from a previous lab, and so I'm just going to open up um Jupyter Lab. Um we did this in the initial setup, so if you haven't done that, go back to that video and watch how to do that. And once that is there, we're going to open up Jupyter Lab. And I'm going to navigate to our AI directory. I'm just doing everything in AI here today. And so I'm going to make a new folder here and call this um basic. And in here, I'm just going to double click and we're going to make a new notebook. And we'll just call this rename this. Whoops. Let's like that and rename it my JP teacher. Okay. So what I want to do here is I want to um bring this code over. And I want to break this up a bit because I do not I do not like uh everything just crammed here together. So we'll go ahead and do this. And notice it's calling it chat completion. So I'm hoping that it does more than just um completion and it's actually um having a conversation. There is a difference between a uh chat completion and completion. Completion just finishes to the end of the sentence. It's not having a back and forth conversation, whereas chat completion is going to have a conversation. Um so, you know, working through just to break this up here. There we go. Um and then we'll add one above this. We know this is going to be pip install open AI. There we go. And we'll run this next. Um and we'll go down below here. And so now we just need to replace these two points. And it looks like it's already kind of helped us out here. So I'm just going to go and do this because I don't need it as um like that. We're not grabbing anything from environment variables here today. So those are set. The only thing that's missing here is the credentials. Like we have an endpoint in a deployment, but we don't have in here um the API key. So how does this know this is working? Right? So I'm going to go back over to here. And we have the API key. But they didn't show us how to load the API key here, which is kind of annoying. Um so I'm expecting this to fail, but let's just go proceed through this and see what happens. Okay, so we have this here. And notice this is matching the name of the deployment. When we deployed our model, we could we could have given it a different name, and it would have done something different there. We'll go ahead and run this. We'll go ahead and run this. And we'll go ahead and run this. I'm not expecting this to work. I'm expecting this to say, hey, you need an API key. Right? It goes down here. And it says Okay, ignore that. Yep, you do not have permissions. So the code here is fundamentally flawed. So we're going to need a little bit of help here. I'm going to go just copy this over to Sonnet. And I'm going to start a new conversation. I need help with this code. Okay, and I'm just going to submit that code over to Claude. We'll give it a moment. And so from here, I'm going to tell it um it's not I need to set the API key, but it's not anywhere in the code. And hopefully you can find that for us here. And so hopefully we can just utilize that. So we'll go back over here. And I'm just carefully looking at this here. So remove the lines, token provider. So we'll get rid of this. And it also says get rid of this because we're not using Azure identity to authenticate. We are going to grab this here and place it as such. We'll take this out of here. I like how they show the API key up here, but it's like they don't give you the code for the API key. It's totally backwards. And so I'm going to go ahead and just do this. That did not copy. Copy, copy, copy, copy. There we go. And we're going to go back over to here. Okay. And that looks good to me. I'm just going to run this again and this one again. And so here we are going to provide the API key instead of um the token provider. So we'll run that there. And now we'll run this and see what happens. Great. And we'll print out the contents. And you can see we're getting information back. Okay, so pretty clear. Um, you know, for this to be conversational, I think the way it works is that we keep um appending the conversation to it. So That's normally like we have messages and I imagine that we would have a chain of messages here. So um here I might say, I'm just going to clear this out here and just say, hello. And let's see what happens here. Whoops, we'll go here and just run that. I'm just going to grab this here so we can just see it quickly like this. And here it says, message, hello, how can I assist you? Um, so I might just want to look up Well, we have completion here, but maybe there's a way we can carry this conversation. So I might go back over to here and just say, okay, how do I carry carry the conversation past uh with the completion object. Because we're obviously creating a new chat, um and maybe there's a way that we can just keep feeding stuff to it. And here, let's see, we have completion and then return it. And then we're just adding a message. Here it says roll system. Uh okay, great. So from this example, we can go and make a roll here and just say roll system. And now we can provide the content of our um that file there. So I'll just say prompt document. So I'm going to go over here and just say So I want to load a uh text file and pass it and um pass it as the prompt document. My primary language is Ruby, so somewhat I can't figure this out. It's just if it can give me the code here, we'll bring it over here quickly. It's just generating it out here on the on the right hand side. And so I want to load my prompt document. I really can't stand what it's trying to make me uh functions here. But I'm just going to go down one here. And we I want this code here, which is for loading a file. And then I need the file path. So I'm looking for that here for the file path. Um Okay, I I suppose I could do that. And I'll say file path. I'm just going to hope that this is um relative and I don't have to do anything else actually. Usually you do like path join, whatever, whatever, whatever. And we've done that uh quite a few times before. I'm just going to open up and see. Yeah, maybe I can just do that here quickly. Yeah, there's something like this. There's a few ways that we can do it. You know, like this maybe not the best way to do it, but this is how I'm going to do it here. Um and so here we could just say prompt document txt. We'll go back over to um here I'll just get this out of the way. And what happened to our prompt document? It's a good thing that we saved it because it looks like it vanished. Hmm. And by the way, I guess we could have exported this as a prompty file document. It's not necessarily a standard yet or a JSON file, and it would have given us um all the information we fed in here and we could have used it later on or we could re-upload it again. But um you know, I I don't know. I just like saving them individually like this. I find it's easier to work with them in this format. But I'm going to copy that content from the repo. It's good thing I uh kept it over here. And we'll go back over to here and I'm just going to make a new file. I'm going to call this one prompt document. You double click into it and we're going to just paste the contents in here. And I'm going to go back over to here. And yeah, so this I'm hoping will load. Well, we don't really want to return the file in this way. Uh we just need to save its content. So down below here, I'm just going to call this prompt document like this equals. There we go. And [laughter] still doesn't like it. No file or extra mentioned here. Um Okay, what if we just Hmm. Can we just do this maybe? Can Can do this? No such file or directory prompt document. I'm just going to rename this to make it really simple. It will just say system. And I'll rename this to system. So if I could just do this, system. Sometimes simplifying just makes your life easier. No such file directory system. So I'll go back here and let's just try system like this. Does that work? No. Does this work? No. I'm going to look for another one where I have an example. Um So let me just see if I can uh find an example here where I'm loading in a uh file. Yeah, like I I do just that, like path OS join. Hmm. Just going to save this file here quickly. And I'm going to go back. I'm not sure if it matters the context on here on the left hand side. Basic. Oh, this is supposed to be under LLMs, by the way. Um well, it doesn't really matter, but I'm just going to make a new folder here and just move this around LLM. And then move basic into it there. There we go. Okay, maybe this context matters. Maybe that's our problem. Now that that [laughter] prompt file's not in there. So maybe I created it in the wrong directory. Maybe that was my problem the entire time. Maybe you've been watching me and going, Andrew, you're crazy. Are you even paying attention to where you are? No, I am not. That's probably what my problem is. There we go. Okay, great. And um we'll go back over to here. I'm going to run this. And so now it's loaded that file. And supposedly we are going to uh pass it along. But the idea is that we are telling it the order of messages that are happening here, right? So here we have role, hello, and and user. Okay, we'll bring this down here. And so we're going to save this, run it. And Uh it's having a bit of trouble because I think that we moved I moved the folder and so that's kind of my fault. So I'm just going to cut cut this part out here. Sorry, my fault. And I'm just going to close this. I'm going to say discard. I don't care about this one. I'm going to double click this one. And I'm going to go down here. And I'm just going to paste our update here. My apologies. And then paste this one in here. It looks like it is the same still. Okay, great. There we go. And so now we'll run it here. Here it says invalid syntax. Um fair enough. It should have a comma here. And we'll go ahead and run this. And we need a comma on the end here. So we'll try this again. And >> [laughter] >> Lots of formatting issues here with me today. So we have I don't have time for small talk. If you're here to learn, then pay attention. Otherwise, what the she whatever. And so here we have a reply. So let's go back over to here and and take a look at what they're suggesting that we do. So here we have um complete completion. And it just returns the result. So I think every time we want to talk to it, we basically have to keep feeding stuff into it. Also notice that we can change some of our parameters if we need to. Um message append. Yeah, and so really that's all we're doing is we just keep appending the message. So if we want to continue the conversation programmatically, what we're going to do is we are going to copy this here. Okay. And then go like this and then say assistant. Right? Okay. And um we have some weird highlighting here, so I assume that something is wrong. I'm not sure if it is because we have a double quote. Oh, we have a double right here. There we go. And it is still complaining. So let's just carefully look at this. Where is our problem? I don't see a problem here, but it it seems to think that there is one. Do this. No. And so I'm just going to go here and just take this out for a second. Like that. And uh No, I don't I don't think there's a problem. I think it's just it's kind of messing it up. So we run this again. What do we get? We get an error. Perhaps you forgot a comma. I don't think so. Just give me a moment to find out my problem, okay? Okay, so maybe the issue is this one here in the end. Nope. Well, I mean, this one doesn't even need a comma there. What does it not like? I cannot Oh, you know what? I found I found out what it was. I found out what it was. I'm missing um one right here. Right here. See? There we go. Okay, great. So here we are now feeding back and saying this is what this isn't says. So what would it do if we do this? I would expect it not to do anything. And so here it just says stop. Um because there's nothing for it to do. We're waiting for the next roll. And so I'm going to go here and we'll do that. And we'll say um user. And we'll say something like, oh, this is hard. So we'll go >> So go ahead and run this. So it says stop lying and learn language is supposed to be hard, okay? And it it kind of feeds in information as we're working through it, which is kind of interesting. So um, you know, hopefully you understand that the idea is that we're we're feeding information into it and the longer the conversation goes, the more we're uh the more information it is and then we're going to probably reach an impasse. Um so understand that when you're working with this stuff, uh you'll get to a point where the conversation will get too long and so basically you have to start over. And when you start over, you have to provide it a prompt document. And if you wanted to contextually understand all this stuff, then you have to summarize that previous history, okay? Um but hopefully that gives you kind of a a starting point of um how it is to work with um uh LLMs. But that's not all we're going to do here, but for now this is enough. So I'm going to go ahead and um copy this over. Okay. So I'm just going to clear out um our keys here for now. And just going to go ahead and reset this. Great. And I'm just going to go ahead and download this file here. And we'll go back over to here. I'm just going to rename this to um system because then it'll just be easier to work with if it's called that, I think. So I'm going to look for in my downloads here and bring over my Japanese teacher. And notice that it is Oh, that's some of the output. It's not that big of a deal as long as the password's in here, that's all I care about. If you want, you can uh stop this. I'm not going to stop this because I'm continuously working with this, so I don't want to constantly Yeah, you know, I'm going to stop it. I'll just stop it in next video. I'll have to spin it up, I suppose. But I'm going to stop it here just in case I walk away. Um but I'm going to leave that model deployed because I I want to do maybe a little bit more with it. There is no harm with it being deployed uh because I'm not currently utilizing it. It's based on per tokens. But anyway, I'll see you in the next one, okay? Ciao. Hey folks, it's Andrew and uh we're talking about Microsoft Foundry SDK. So, obviously, uh everything has an SDK in Microsoft and we're for Microsoft Azure and obviously Foundry has one as well. It lets you connect your apps to the Foundry project, send prompts and receive model responses, create agents and manage their conversations. It's available in Python, C sharp, JavaScript, TypeScript, and Java. Uh and I think probably Python would Python or TypeScript were going to be the most popular uses, though this is the Microsoft ecosystem, so maybe C sharp as well. So, here is an example of a Python script. On the left hand side, you can see that we are specifying a project endpoint. I'll get my pen out here. Project endpoint. We're using a very old model, but it is still available. So, sometimes you want to use cheaper models, but they're in there. Um and we are making a connection to the OpenAI client. So, that is going to vary based on what we're utilizing, but you'll see OpenAI client a lot as a lot of these models are OpenAI compatible. Uh the idea is that you will get an output. So, nothing super exciting here, okay? Let's take a look at endpoints and authentication specifically for Microsoft Foundry. So, an app in Microsoft Foundry needs a service address, credentials, and a deployment name to connect to a deployed model. So, the endpoint is the URL where the application sends the request. Uh and so we can see it over here, if I get my pen out, here as the Azure OpenAI endpoint. Uh we have authentication, so that is an API key or Microsoft Entra ID credentials. And so in this case, we have the API key, uh the deployment name. So, this identifies which deployed model to use. Um and it is not shown in this screenshot, but like cuz it's we're within a model right now, and that's why we don't see it. And the resource name identifies the resource, but the deployment name selects the deployment model. Okay? Because you can have multiple models that are deployed, and that makes sense. Notice that we have multiple libraries here. We have the Azure AI inference library, the Azure OpenAI library, and the Azure AI services. So when we were looking at the Microsoft Foundry, you probably noticed the OpenAI thing that I was pointing out. That's what I was pointing out. And so there's obviously some variations there, okay? All right, let's take a look at how we connect to deployed models. So to connect an app, you will need uh the API key, the base URL, uh the model that you're utilizing. So again, when we deploy a model, we can change its deployment name, uh if that makes sense. So this could be anything. It could be GPT whatever, whatever. Um we have our input, which is the text, and then we have our response out there. We use the deployment name in the model even when it differs from the underlying model name, okay? So it it could be Claude, it could be Cohere, it doesn't matter. We name whatever we want the model. Generally for other uh APIs, it's the model name. And so I need to point that out as it's the deployment name here and not actually the underlying model name of All right, let's take a look at tool calls. So this is a setting based on uh based on the the property tool choice. Um if you've used Anthropic's API, you're familiar with this, but um the difference here is that we have different options over with Microsoft Foundry's API. Uh so let's take a look at what they are. So for auto, the model decides whether to call a tool. Okay? So it doesn't have to call one, but if if it wants to, it can decide to do that. For none, the model responds without calling a tools. This is useful if you want to for for it to rely on its internal memory. Um we have required. So the model must call at least one available tool. This is great when you want it to not rely on just its internal memory. Uh like you let's say you had a tool that went out to the internet, you want to make sure it always goes to the internet, you'd want required or a specific tool requires the model to call a named tool. So maybe that's all you want this to do is go out to the internet and call this one specific tool, then that one will do it. And so this example here, we set the required tool choice. So think of this, a supported agent must look up an order before answering. And so if we want to force that, we could use required or if this is a very specialized model and it and there was like a lookup um lookup order, then you could do that, right? But required's likely what we're going to do in most cases, okay? Hey folks, it's Andrew. In this video, I want to take a look at agents as uh we keep seeing it, but we haven't clicked through to it. So we'll go ahead and what I want to do is create ourselves our own new agent. Um here we have a bunch of preview ones and that's not exactly what I want. So I'll go over to build and here we can see agent, right? So discover means like find agents that already exist and that's cool that there are ones that already exist, but I want to build my own. So we will go here under agents and we'll create a new agent and we will build an agent. Now, I would prefer to build it with code, but for the scope of this course, we'll keep it simple. Notice we have text or voice. I'm going to call this ooh um uh exampro learning agent. So we'll go ahead here and call it this. And we will let that create it. So these these are basically uh hosted agents. Now, you could code them and then deploy them to your own little server as they're not very complicated code, but I guess the idea here is to have managed agents that are easier for non-technical people to start implementing their own agents that are more robust than you working with let's say ChatGPT. And so we will want to get some instructions here. So just give me a second. Okay, and so you'll have this in the uh Exampro instructions here so you don't have to type this out manually. But here we have you are an Exampro cloud computing instructor. Help students understand AWS, Azure, Google Cloud concepts. Keep explanations simple, concise, friendly, provide practical examples when appropriate. So as an example, I'm going to tell you folks, I basically write all my stuff. AI cannot write my prose, but it's fun to try it out anyway as a test. And so I'm going to save what we have currently. Is that something we will want to do continuously? Notice that we have a lot of options across the board to uh keep track of our managed uh agent here. But let's go ahead and ask it to do something. So what is what is the difference uh between Azure virtual machines and Azure functions? So we'll go ahead and ask it that and see if we get an okay answer. And this is using GPT 61 Terra up here. By the way, we can change it out if we don't like it. So here we have a lot of text. The main difference is how infrastructure you manage. Okay, sure. And so it gave us back information. Again, I would shape this completely different, but you know, I'm very opinionated about how I like to write my stuff. Um, but we'll go over to details and see if there's anything interesting here. So we do have uh endpoints, okay, down below here. We could push this out to channels, so we could literally publish to Microsoft 365, which my team does use. Um, agent A protocol, which is a protocol set up by Google. I don't even know if I've ever used it. Uh, it's never really been popularized, but it's a great idea because two agents could talk to each other. Uh, we could get this published as a web app. So let's see if this is already available as a link. I'm just curious. Yeah, and so we already have a UI. Now, I would imagine you'd have to be authenticated for this. So if I was to open this up in incognito tab, I would assume this would not work. Notice you have to log in, right? So you can create your agents and have a UI here and just give it to your team, but they'd have to be logged into Microsoft Azure. Down below, we have routines, which I imagine would be for routing things to different places. Oh, it's scheduling. So here you could ask this to run this on a schedule. So maybe every day it collects everyone's notes from your uh Microsoft Teams and produces uh a summary for the whoever, right? So that's an example of what you could do there. Um looks like we could change the status and disable the agent. Not a whole lot going on there. There is versioning. Uh let's take a look at tracing. So no information as of yet. I mean, tracing will be useful if it passes through other integrations and it does say app insights here. So I imagine if you know app insights, you could connect uh that to here and then you would trace um the path of where things would go either to this agent or out else elsewhere. This would be a really cool integration to explore, uh but that's outside the scope of this project cuz app insights is such a cool cool thing. If you haven't taken whatever the certification is that teaches all about app insights, um uh which I I think developer one for that one. Uh it's a very, very useful tool. Um but anyway, yeah, monitor, evaluation, etc, etc. So it looks like we have some evaluations built in here. Um it's probably going to be a CSV file, I would assume. So again, this is way, way out of scope, but let's keep on track here and keep to the basics. So we have our agent. Now, let's say we want to go ahead and publish it. We'll go ahead up here and we already saw the preview here, so it's technically already published. But let's say we make a small change. So um speak uh in caveman speak. When we save it, does it automatically version it? It does. So the reason why that's interesting is that prior interfaces used to have um a lot more work to publish out your resources, but they seem that they're very more proactive and they're automatically published immediately. So clearly it's not very hard to get access to to this. Um I would be interested to see how this works for code. So we have some configuration here. Uh we have optimize. Optimize your agent for whatever, whatever. I don't care about these options. So let's go back to uh this way and we'll go see if we can make this for code now. Build your agent with any framework, etc, etc. Getting started. And so it's just pointing us to the technical resources. Okay. And so this is kind of sad. I thought it was going to give us the code here or have an interface for us to build. But I would think that in here, you would think that somewhere there'd be code. Continue in code. Here we go. And so here we can pick it up. Skip setup with VS code for web. Oh, let's go ahead and try that out. Um and so if you don't know VS code, that's Visual Studio Code's uh editor. And you can download this um locally, but obviously it's nice that they have a web version here. And so this is going to set up an entire environment for us so that we can do our development. I'm not paying anything. I just clicked it. I don't know if it costs us anything. Uh VS code dev Azure cost. It's completely free. Well, I like that. Zero install version of a Visual Studio Code. Okay. And so we'll give it a moment here to get set up. All right. So we have our environment set up. And so this would be a place where we could kind of adjust the code a little bit. The only challenge with this environment is I believe again, it's there's no code execution. Maybe there is cuz it has this down below here. Unless. And so what I would want to do is just check if there's any Python. Oh, there is. Okay. Well, then we can execute our code. And um so this has a requirements.txt. So it might have already done it, but I'm going to go ahead and type in pip install hyphen R requirements .txt. And so that should install the requirements. To run this. Cool. And as that's running, let's go take a look at the code. For those who do not know, my background is super developer. So for me, I'm very comfortable reading and working with code. So um just allow, allow, allow the font here. And so notice that this is our endpoint. Here is our agent name. This is the message we were passing in here. And so it's going to get the OpenAI client or a OpenAI client. Note that it uses OpenAI, as I said earlier, uh most stuff goes through OpenAI's SDK. And here it will return a conversation. It'll create a conversation and then we will send our first message and get an output. Let's take a look and see what we have. So we do have an error, but it might not matter. Um I don't know if it matters, to be honest. Uh but we will go ahead and try this anyway. It might not work, but I will try it. We'll try run agent.py. And so here, no module named azure AI. Mm so that's the question is like, why would they let us open it here if we can't uh work with it? What's in our .env here? We do have some sensitive information in here, and so I will close this out. And um yeah, the question is like, okay, we have this, but how do we utilize it? So consider using user option to check the permissions. So this is something I'd like to know. So I'm going to go ask ChatGPT um what I can do here. And I'll go over to ChatGPT. This is off screen, by the way. I'll just say uh this is vscode.dev after uh trying to edit uh Azure code agent Azure agent in Foundry. Uh because I don't know like if there are very specific limitations in this environment. Obviously, it won't let us install specific packages, but you know, I would think that if you can launch it, they would allow us to do that. Oh, and so maybe what we should do, you're already in the correct project directory, run these commands in your PowerShell. So here it's suggesting for us to make a virtual environment. I why would that fix our issue? The problem is Python package permission uh is not your Azure AI Foundry. So, you already you're already in the correct project directory. Run this command. I don't know if that's going to fix it, but we will give it a try. So, here this one will, whoops. Uh we'll have to type it in manually. This one, Python m venv. venv I mean, we don't even have one, so how's that going to work? I I this might just create us environment. Let's see. Uh venv So, it just made us an environment. Okay. And then what we can do is activate that environment. Python activate venv Activate environment uh command. Notice it didn't give us the easy step here. I just know there's an activate command. Oh, cuz we're in PowerShell right now. I see. Okay. We'll say venv ERV venv bin activate Let's try that. So, that doesn't work. Um I think I'd really prefer this to be a terminal and not or whatever. So, here I'm just going to take a look here. And so there is an activate dot uh whatever. We'll try this again. I guess autocomplete just doesn't work as you'd expect it to. So, we'll give it a capital A, I guess. activate . ps1 And so now that is activated. And so now what I can do is do pip install pip I'm trying to hit tab to autocomplete. It's not working. We'll try this. And let's see if that works. So, it could be that just because it's a um isolated environment, they don't want you directly installing the machine and they want you to isolate those uh those libraries within a you know, within a um virtual environment. But it seems to be working so far. Okay. But I guess the point is like, you know, if you aren't a coder, that's why you have managed agents and all providers are getting managed agents, no matter which which one. They're all like both cloud service providers and also um the uh direct providers that make the uh agents or the um underlying models like OpenAI have their managed agents. So let's go ahead and now do Python run agent and see if it works. And it does not. I mean, in the requirements.txt, it doesn't show httpX. So I don't know if that is a defect of it. So I'll just add it in here and then we will go try this again. And so like it says that it successfully installed it. You'd think that the script they would give you would just work. But we're talking about Azure here. They don't ever give you things that are complete. They're moving so fast. Yeah, there you go. And so, you know, there's a few adjustments we had to make there. So obviously put httpX in and they didn't explain this environment thing. Uh unless they did and it's just here. No, they didn't. And so again, this is because, you know, Azure's Azure, right? Um there obviously is other commands for deployment. So to add a web app to uh your agent, you can go ahead and do this now. So here we can get started and do AZD up and then down to deploy it. Nah, I don't think we're going to do that here today. But anyway, folks, hopefully that gives you an idea. If you want to get rid of this environment, it's totally free, so it doesn't matter. Oh, this is Cloud Shell. Okay. We'll go ahead and just close this out. Um I was a bit confused because Cloud Shell's up here. See this? That's Cloud Shell. And so um that went to VS code whatever whatever.dev, but I guess it might be the same thing. But if you go here, you can see that's the same option. So I didn't realize we were in the exact same spot. Anyway folks, uh there you go, okay? Ciao ciao. So Azure has a built-in Jupyter like notebook editor so you can build and train your ML models and so here is an example of it. I personally don't like it too much, but that's okay cuz we have some other options to make it easier. What you do is you choose your compute uh instance to run the notebook. You'll choose your kernel uh which is a pre-loaded programming language and programming libraries for different use cases, but that's a Jupyter kernel uh concept there. Uh so you can open the notebook in a more familiar ID such as VS Code, Jupyter Notebook Classic or Jupyter Lab. So you go there, drop it down, choose it and open it up and now you're in a more familiar territory. The VS Code one is exactly the same experience as the um the one in Azure uh or Azure ML Studio. I personally don't like it. I think most people are going to be using the notebooks, but it's great that they have all those options. Let's take a look at uh the types of compute that is available in our Azure Machine Learning Studio. We got four categories. Uh we have compute instances to uh development workstations that data scientists can use to work with data and models. Compute clusters to scalable clusters of VMs for on-demand processing experimentation code. Deployment targets for predictive services that use your trained models and attach compute links to existing Azure compute resources such as uh Azure VMs uh and Azure Databricks clusters. Now, uh what's interesting here is like with this compute, you can see that you can open it in Jupyter Labs, Jupyter, VS Code, R Studio and terminal. But you can you can work with uh your compute instances, your development workstations uh directly in the studio, which that's the way I do it. Um what's interesting is for inference, that's when you want to make a prediction, you use Azure Kubernetes service or Azure container instance and I didn't see it show up under here, so I'm kind of confused whether that's where it appears. Um maybe we'll discover as we do the follow longs that they do appear here, but uh I'm not sure about that one, but yeah, those are the four there, okay? Hey, this is Angie Brown from Exam Pro and we are looking at Azure Machine Learning Service. I want you to know there's a classic version of this service. It's still accessible in the portal. This is not an exam. We are going to 100% avoid it. Uh it has severe limitations. We cannot transfer anything over from the classic to the new one. Uh so the one we're going to focus on is the Azure Machine Learning Service. You do create studios within it, so you'll hear me say Azure Machine Learning Studio and I'm referring to the new one. A service that simplifies running AI ML work uh related workloads, allowing you to build flexible automated ML pipelines, use Python or R, run deep learning workloads such as TensorFlow. We can make Jupyter notebooks in here, so build and document your machine learning models as you build them. Share and collaborate Azure Machine Learning SDK for Python, so an SDK designed specifically to interact with the Azure Machine Learning Services. It does MLOps, machine learning operations, so end-to-end automation of ML model pipelines, CI/CD, training inference. Azure Machine Learning Designer. Uh uh so this is a drag and drop interface to visually build, test, deploy machine learning models, uh technically pipelines, I guess. It has a data labeling service, so uh assemble a team of humans to label your training data. Responsible machine learning, so model fairness through disparity metrics and mitigate unfairness. At the time of this service, this is not very good, but it's supposed to tie in with the responsible AI that Microsoft is always promoting, okay? So Azure automated machine learning, also known as Auto ML, automates the process of creating an ML model. So with Azure Auto ML, you supply a data set, choose a task type, uh and then Auto ML will train and tune your model. So here are our task types. Let's quickly go through them. So we have classification, when you need to make a prediction based on several classes, so binary classification, multi-class classification, regression when you need to predict a continuous number of value, and then a time series forecasting when you need to predict the value based on time. So just look at them a little bit more in detail. So classification is a type of supervised learning in which the model learns using training data and apply those learnings to new data. So here is an example uh or this is just the option here. And so the goal of classification is to predict which categories new data will fall into based on learning from its training data. So binary classification is a record uh is labeled out of two possible labels. So maybe it's true or false, a zero or one. Uh it's just two values. Multi-class classification is a record is labeled out of range of out of a range of labels. Uh and so it could be like happy, sad, mad, or rad. And just, you know, I I can see there's a spelling mistake there, but uh yeah, there should be an f. So let's just correct that. There we go. Uh you can also apply uh deep learning. And so if you turn deep learning on, you probably want to uh use a GPU uh compute instance just because or um compute cluster because deep learning really prefers uh GPUs, okay? Looking at regression, it's also a type of supervised learning where the model learns uh using training data, applies those learnings to new data, but it's a bit different where the goal of regression is to predict a variable in the future. Uh then you have time series forecasting and this sounds a lot like um uh regression because it is. So forecast revenue, inventory sales, or customer demand, an automated time series experiment that is treated as a multivariate regression problem. Past time series values are pivoted to become additional dimensions for the regressor together with uh other predictors. And unlike classical time series methods, has an advantage of naturally incorporating multiple contextual variables and their relationship to one another during training. So use cases here or advanced configurations, I should say, holiday detection and featurization, time series uh uh deep learning uh neural networks. So you got auto ARIMA, profit, forecast, TCN, uh many model supports through grouping, rolling origin cross validation, configurable labs, rolling window aggregate features. So there you go. So we just saw that we had a candidate model and there could be an explanation to understand as to the effectiveness of this. So this is called MXL. So machine learning explainability. This is the process of explaining interpreting ML or deep learning models. MXMLX can help machine learning developers to better understand and interpret model's behavior. So after your top candidate model is selected by Azure AutoML, you can get an explanation of internals of various factors. So model performance, a data set explorer, aggregate feature importance, individual feature importance. So I mean, yeah, this is aggregate. So what it's looking at and it's actually cut off here, but it's saying that these are the most important ones that affect how the the model's outcome. So I think this is the diabetes a data set. So BMI uh would be one that would be a a huge influencer there, okay? Hey, this is Andrew Brown from ExamPro and we are taking a look here at Custom Vision and this is a fully managed no code service to quickly build your own classification and object detection ML models. The service is hosted on its own isolate domain at www.customvision.ai. So the first idea is you upload your images, so bring your own labeled images or custom vision to quickly add tags to any unlabeled data images. You use the labeled images to teach custom vision the concepts you care about, which is training and you use a simple rest API that calls uh to quickly tag images with your new custom computer vision model so you can evaluate, okay? So when we launch Custom Vision, we have to create a project and with that we need to choose a project type and we have classification and object detection. Reviewing classification here, you have the option between multi-label. So when you want to apply many tags to an image. So think of an image that contains both a cat and a dog. You have multi-class. So when you only have one possible tag to apply to an image, so it's either an apple, banana, and orange, it's not uh multiples of these things. You have object detection. This is when we want to detect various objects in an image. Uh and you also need to choose a domain. A domain is a Microsoft managed dataset that is used for training the ML model. There are different domains that are suited for different use cases. So let's go take a look first at image classification domains. So here is the big list, the domains being over here. Okay. And we'll go through these here. So general is optimized for a broad range of image classification tasks if none of the uh uh if none of the other specified domains are appropriate or you're unsure of which domain to choose, select one of the general domains. So G uh or A1 is optimized for better accuracy with comparable inference time as general domain recommended for larger datasets or more difficult user scenarios. This domain requires more training time. Then you have A2 optimized for better accuracy with faster inference times than A1 and general domains. Recommended for more most datasets. This domain requires less training time than general and A1. You have food optimized for photographs or dishes of as you would see them on a restaurant menu. If you want to classify photographs of individual fruits or vegetables, use food domains. Uh so then we have optimized for recognizable landmarks both natural and artificial. This domain works best when landmark is clearly visible in the photograph. This domain works even if the landmark is slightly um obstructed by people in front of it. Uh then you have retail so optimized for images that are found in a shopping cart or shopping uh website. If you want a high precision classifying uh classifying between dresses, pants, shirts, use this domain. Compact domains optimized for the constraints of real-time classification on the edge. Okay. Then uh we have object detection domain. So this one's a lot shorter, so we'll get through it a lot quicker. So optimized for a broad range of object detection tasks if none of the uh other domains are appropriate or you're unsure of which domain, choose the general one. A1 optimized for better accuracy and comparable inference time than the general domain recommended for most accurate region locations, larger datasets more difficult use case scenarios, the domain requires more training, results are not deterministic. Expect uh plus minus 1% mean average precision difference uh with the same training data provided. You have logo optimized for finding brands, uh logos and images, uh products on shelves, so optimized for detecting and classifying products on the shelf. So there you go. Okay, so let's get some uh more practical knowledge of the service. So for image classification, you're going to upload multiple images and apply a single or multiple labels to the entire image. So here I have a bunch of images uploaded and then I have my tags over here. And they could either be multi or singular. For object detection, you apply tags to objects in an image for data labeling and you hover uh your cursor over the image. Custom vision uses ML to show bound uh bounding boxes of possible objects that have not yet been labeled. If it does not detect it, you can also just click and drag to draw out whatever square you want. So here's one where I tagged it up quite a bit. You have to have at least 50 images on every tag to train. Uh so just be aware of that when you are tagging your images. Uh when you're training, your model is ready when you uh and you have two options. You have quick training that's trains quickly, but it will be less accurate. You have advanced training. This increases compute time to improve your results. So for advanced training, basically you just have this thing that you move to the right. Uh with each iteration of training, your ML model will improve the evaluation metrics, so precision and recall. It's going to vary and we're going to talk about the metrics here in a moment, but the probability threshold value determines when to stop training when our evaluation metric meets our desired threshold. So these are just additional options where when you're training, you can move this left to right uh and these left to right, okay? Uh and then when we get our results back, uh we're going to get um some metrics here. So uh we have evaluation metrics. So we have precision being exact and accurate, selects items that are relevant. Recall, such sensitivity or known as true positive rate. How many relevant items returned? Average precision. It's important that you remember these because they might ask you that on the exam. So for uh when we're looking at object detection and we're looking at the evaluation metric outcomes for this one, we have precision, recall, and mean average precision. Uh once we've deployed our pipeline, it makes sense that we should go ahead and give it a quick test to make sure it's working correctly. So you press the quick quick test button and you can upload your image and it will tell you. So this one says it's Worf. Uh when you are ready to publish, you just hit the publish button and then you'll get uh some a a prediction URL and information so you can invoke it. Uh one other feature that's kind of useful is the smart labeler. So once you've uh loaded some training data within, it can now make suggestions, right? So you can't do this right away, but once it has some data, it's like it's like kind of a prediction that is not 100% guaranteed, right? And it just helps you build up your training uh data set a lot faster. Uh very useful if you have a very large data set. This is known as ML assisted labeling, okay? All right, so let's take a look at custom vision so we can do some um classification and object detection. So um the thing is is that it's possible, it's possible to launch custom vision through the marketplace. So if we go, we're not going to do it this way. If you type in custom vision, it never shows up here, but if you go to the marketplace here and type in custom vision and you go here, you can create it this way. But the way I like to do it and I think it's a lot easier to do is we'll go up the top here and type in customvision.ai and you'll come to this website and what you'll do is go ahead and sign in. It's going to connect to your Azure account and once you're in, you can go ahead here and create a new project. So the first one here is I'm just going to call this the Star Trek crew. We're going to use this to identify different Star Trek members. We'll go down here and uh we haven't yet created a resource, so we'll go create new. My custom vision resource. We'll drop this down. We'll put this in our cog services. Uh we'll go stick with um US West as much as we can here. We have FO and SO. FO is blocked out for me, so just choose SO. I think FO is the free tier, but I don't get it. And um once we're back here, we'll go down below and choose our standard. And we're going to have a lot of options here. So we have between classification and object detection. So classification is when you have an image and you just want to say what what is this image, right? And so we have two modes where we can say let's apply multiple labels. So let's say there were two people in the photo or whether there was a dog and cat. I think that's example to use a dog and a cat. Or you just have a single class where it's like what is the one thing that is in this photo and it can only be of one of the particular categories. This is the one we're going to do multi-class. And we have a bunch of different domains here. And if you want to, you can go ahead and read about all the different domains and their best use case, but we're going to stick with A2. And this is optimized for so that it's faster, right? And that's really good for our demo. So we're going to choose General A2. I'm going to go ahead and create this project. And uh so now what we need to do is start labeling our our our uh content. So um what we'll do is I just want to go ahead and create the tags ahead of time. So we'll say Worf. We'll have uh data and we'll have Crusher. And now what we'll do is we'll go ahead and upload these images. So you know, we uploaded in the Jupyter notebook, but it was totally not necessary. So here is data because we're going to do it all through here. And we'll just apply the data tag to them all at once, which saves us a lot of time. I love that. Uh we'll upload now uh Worf. And I don't want to upload them all. I have this one quick test image we're going to use to make sure that this works correctly. And I'm going to choose Worf. And then we'll go ahead and add Beverly. There she is. Beverly Crusher. Okay, and so we have all our images in. I don't know how this one got in here, but it's under Worf. It works out totally fine. So, uh what I want to do is uh go ahead and train this model cuz they're all labeled, so we have a ground truth and we'll let it go ahead and train. So we'll go and press train and we have two options, quick train or advanced training. Advanced training where we can increase the time for better accuracy, but honestly, uh we just want to do quick training. So I'll go ahead and do quick training and it's going to start its iterative process. Notice on the left hand side, we have probability threshold, the minimum probability score for a prediction to be valid when calculating calculating precision and recall. So we uh the thing is is that if it doesn't at least meet that requirement, it will quit out. And if it gets uh above that, then it it might quit out early just because it's good enough, okay? So training doesn't take too long. It might take 5 to 10 minutes. Uh I can't remember how long it takes, but uh what I'll do is I'll see you back here in a moment, okay? All right, so after waiting a short little while here, uh it looks like our results are done. We get 100% um uh match here. So these are our evaluation metrics to say whether uh the model was uh uh achieved its actual goal or not. So we have precision, recall, and I believe this is average precision. Uh and so it says that it did a really good job. So that means that it should have no problem um matching up an image. So in the top right corner, we have this button that's called quick test and this is going to give us the opportunity to uh quickly test these. So what we'll do is browse our files locally here. And uh actually I'm going to go to uh yeah, we'll go here and we have Worf. Uh and so I have this quick image here. We'll test and we'll see if it actually matches up to be Worf. And it says 98.7% Worf. So that's pretty good. I also have some additional images here I just put into the repo to test against and we'll see what it matches up cuz I thought it'd be interesting to do something that is not necessarily uh uh them, but it's something pretty close to um you know, it's pretty close to what those are, okay? So we'll go to crew here and first we'll try Hugh. Okay? And Hugh is the Borg, so he's kind of like an Android. And so we can see he mostly matches the data. So that's pretty good. Uh we'll give another one go. Martok is a Klingon, so he should be matched up to Worf. Very strong match to Worf. That's pretty good. And then uh Pulaski, she is a doctor and female, so she should get matched up to Beverly Crusher. And she does. So this works out pretty darn well. Uh and I hadn't even tried that, so that's pretty exciting. So now let's say we want to uh go ahead and uh well, if if we wanted to um uh make predictions, we could do them in bulk here. Um I believe that you could do them in bulk. But anyway, Yeah, I guess I always thought this was like I I could have sworn, yeah, if we didn't have these images before, I think that it actually has an upload option. It's probably just the quick test. So I'm a bit confused there. Um but anyway, so now that this is ready, what we can do is go ahead and publish it uh so that it is publicly accessible. So we'll just say here uh crew model. Okay, and we'll drop that down. Say publish. And once it's published, now we have this uh public URL. So this is an endpoint that we can go hit pragmatically. Uh I'm not going to do that. I mean, we could use Postman to do that. Um but my point is is that we've basically uh figured it out for um classification. So now that we've done classification, let's go back here to uh the the vision here and let's now let's go ahead and do object detection, okay? All right, so we're still in custom vision. Let's go ahead and try out object detection. So object detection is when you can identify uh particular items in a scene. Um and so this one's going to be com badge. That's what we're going to call it because we're going to try to detect com badge. We have more domains here. We're going to stick with the general A1. And uh we'll go ahead and create this project here. And so uh what we need to do is add a bunch of images. I'm going to go ahead and create our tag, which is going to be called com badge. Uh you can look for multiple different kinds labels, but then you need a lot of images. So, we're just going to keep it simple and have that there. Uh I'm going to go ahead and add some images and we're going to go back um a couple steps here into our objects. And here I have a bunch of photos and we need exactly 15 to train. So, we got 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16. And so, I threw an additional image in here. This is the badge test. So, we'll leave that out and we'll see if that picks up really well. And yeah, we got them all here. And so, we'll go ahead and upload those. And we'll hit upload files. Okay. And we'll say done. And we can now begin to label. So, we'll click into here. And what I want to do, if you hover over it, it should start detecting things. If it doesn't, you can click and drag. We'll click this one. They're all com badges, so we're not going to tag anything else here, okay? So, go here, hover over. Is it going to give me the com badge? No. So, I'm just dragging clicking and dragging to get it, okay? Okay. Do we get this com badge? Yes. Do we get this one? Yep. So, simple as that. It doesn't always get it, but uh most cases it does. Okay, didn't get that one, so we'll just drag it out. Okay, it's not getting that one. It's interesting. Like that one's pretty clear, but uh it's interesting what it picks out and what does what it does not grab, right? So, it's not getting this one, probably cuz the photo doesn't have enough contrast. And this one has a lot. Hoping that that gives us more data to work with here. Yeah, I think the higher the contrast, it's easier for it to uh um detect those. It's not getting that one. It's not getting that one. Okay, there we go. Yes, there are a lot. I know I had some of these ones that are packed, but there's only like three photos that are like this. Yeah, they have badges, but they're slightly different, so we're going to leave those out. And oops, I think I actually had that one, but we'll just tag it anyway. And hopefully this will be worth the uh the effort here. There we go. I think that was the last one. Okay, great. So we have all of our tagged photos and what we can do is go ahead and train the model. Same option, quick training, advanced training. We're going to do a quick training here. And notice that the options are slightly different. We have probably threshold and then we have overlap threshold. So the minimum percentage of overlap between predicted bounding boxes and ground truth boxes to be considered for a correct prediction. So I'll see you back here when it is done. All right, so after waiting a little bit of a while here, it looks like um it's done. It's trained and so precision's at 75%. So precision, the number will tell you if a tag is predicted uh by your model, how likely that it's likely to be. So how likely did it guess right? And you have recall, so the number will tell you out of the tags which should be predicted correctly, what percentage did your model correctly find? So we have 100%. Uh and then you have mean average precision. This number will tell you the overall object detector performance across all the tags, okay? So uh what we'll do is we'll go ahead and uh do a quick test on this model. And we'll see how it does. I can't remember if I actually even ran this, so it'll be curious to see. The first one here, um it it's not as clearly visible. It's part of their uh uniform, so I'm not expecting you to pick it up, but we'll see what it does. It picks up uh pretty much all of them with the exception this one is definitely not a com badge, but uh that's okay. Only show suggested obviously the probabilities above the selected threshold. So if we increase it, uh let's bring it down a bit. So there it kind of improves it um if we move it around back and forth, okay? So I imagine to via the API we could choose that. Let's go look at our other sample image here. Um I'm not seeing it. Uh where did I save it? Let me just double check, make sure that it's in the uh correct directory here, okay? Yeah, I saved it to the wrong place. Just a moment. Um I will place it I'm just call that badge test two, one sec. Okay. And so I'll just browse here again. And so here we have another one. See if it picks up the badge right here. There we go. So looks like it works. So uh yeah, I guess Custom Vision is uh pretty easy to use and uh pretty darn good. So what we'll do is close this off and make our way back to our Jupyter uh labs to move on to um our our next uh lab here, okay?

Generated algorithmically for Search Engine Indexing.

Summarize Another Video