- 5/14/2025
Welcome to this hands-on AI-900 lab session, where we explore how Azure AI Foundry combined with Prompt Flow enables Named Entity Recognition (NER)—a key Natural Language Processing (NLP) technique used for extracting specific entities like names, locations, dates, and more from text. Whether you're preparing for the Microsoft AI-900 Certification or looking to enhance AI-driven text processing, this step-by-step demo will guide you through everything you need to know.
🔍 What You’ll Learn in This Video:
1️⃣ Introduction to Azure AI Foundry & Prompt Flow
2️⃣ Understanding Named Entity Recognition (NER) & its applications
3️⃣ Setting up Azure AI Foundry for NLP tasks
4️⃣ Building a Prompt Flow pipeline for entity extraction
5️⃣ Fine-tuning NER models for domain-specific applications
6️⃣ Deploying and testing NER models in real-world scenarios
🛠️ Who Is This For?
AI & ML Enthusiasts exploring NLP with Azure AI
Developers and data scientists working on AI-driven text processing
Professionals preparing for the Microsoft AI-900 Certification
Businesses looking to automate data extraction from unstructured text
📌 Key Highlights:
✅ Hands-on demo of Named Entity Recognition (NER)
✅ Building and optimizing Prompt Flow for AI-driven text processing
✅ Using Azure AI Foundry to train & deploy NLP models
✅ Real-world use cases in finance, healthcare, customer support & more
Explore Our Other Azure Courses and Practice Material On: https://www.youtube.com/@skilltechclub
🔍 What You’ll Learn in This Video:
1️⃣ Introduction to Azure AI Foundry & Prompt Flow
2️⃣ Understanding Named Entity Recognition (NER) & its applications
3️⃣ Setting up Azure AI Foundry for NLP tasks
4️⃣ Building a Prompt Flow pipeline for entity extraction
5️⃣ Fine-tuning NER models for domain-specific applications
6️⃣ Deploying and testing NER models in real-world scenarios
🛠️ Who Is This For?
AI & ML Enthusiasts exploring NLP with Azure AI
Developers and data scientists working on AI-driven text processing
Professionals preparing for the Microsoft AI-900 Certification
Businesses looking to automate data extraction from unstructured text
📌 Key Highlights:
✅ Hands-on demo of Named Entity Recognition (NER)
✅ Building and optimizing Prompt Flow for AI-driven text processing
✅ Using Azure AI Foundry to train & deploy NLP models
✅ Real-world use cases in finance, healthcare, customer support & more
Explore Our Other Azure Courses and Practice Material On: https://www.youtube.com/@skilltechclub
Category
🤖
TechTranscript
00:00good morning good afternoon and good evening hi guys my name is maruti and i'm back with a new
00:16topic a new chapter on azure ai foundry i hope you have checked my previous videos and you already
00:22know the basics of what is azure ai foundry portal and what kind of things we can do it with that
00:28today we are going to talk about another part of that and actually this is actually a specific
00:34development tool so today's video is actually perfect for those who are trying to explore
00:40large language models and who are actually trying to customize and build a customized applications
00:46using a large language models the name of the topic without waiting for much time let me introduce the
00:52name of the topic which is prompt flow i'm sure if you are familiar with azure ai services this is
00:58one of the term which maybe you have heard of today we are going to learn it so i'm going to create
01:04prompt flow today i'm going to customize prompt flow with my kind of a logical code basically in python
01:10and then we are going to check whether it's working or not also this is going to be something which we
01:16will do step by step so let's get started before we start a lab we need to understand what is a prompt
01:23flow the definition says that prompt flow is a development tool which is designed to streamline
01:29the entire development cycle of ai applications powered by large language models and this prompt
01:35flow development tool is a part of your azure ai foundry portal is one of the element inside that
01:42so as i promise you every day we are going to see different different parts of azure ai foundry portal
01:47so this is what we are going to learn today now with prompt flow you will be able to create
01:52executable flows and you can link large language models with them you can configure prompts you have
01:58python tools to a visualize graph where you can actually visualize some kind of a step-by-step workflow
02:04and that's the reason actually the name prompt flow is coming from combination of prompt and workflow
02:11you can also debug you can share and iterate your flows with ease through team collaboration possible
02:17you can create prompt variants and evaluate their performance through large scale testing
02:24and you can also deploy a real-time endpoint that unlocks the full power of large language models
02:30for your application once that real-time endpoint is deployed you can actually incorporate that real-time
02:36endpoint api into your existing applications which you are developing so starting from large language
02:42model customization deployment and adding your own customized flow on that to deploying an application
02:49this is actually something which is going to provide end-to-end solution for you let's get started with this
02:54but before that let's understand what exactly we are going to do today because this is the first time we are
03:00using prompt flow in our channel i am trying my best to make sure that this particular lab this particular
03:06demo is going to be as simple as possible don't worry i'm not going to create very complex python logic
03:13inside this that is something which we'll do on the coming videos but right now if you ask me what
03:18exactly i'm going to do today i am going to use prompt flow for named entity recognition now let me explain
03:25first whenever you have a text maybe you're providing a prompt or few lines of paragraphs also in that
03:32and if you're doing this thing there are a couple of name entities which you can extract from that
03:36this name entities can be a person some kind of brand some kind of places or maybe some kind of a job role
03:44in our case we are going to take an example of a job role like you can see i have a prompt here in
03:50which we are saying some text in a preparation for the new semester the teacher is developing a syllabus
03:55now in this case which job role is involved in this text the answer is teacher now same like we can
04:02provide different prompts and i want that my model is actually going to be capable to extract the name
04:08entity recognition from that and this is what exactly we are going to customize if you are thinking
04:14that how exactly we will do this thing well name entity recognition is a concept which can
04:20be done with any kind of language models we are going to apply this kind of a flow logic you can
04:25see we have four sections here inputs then your llm tool which is actually going to associate your
04:32large language model with that then you have python tool which allowing you to write your own customized
04:38code on top of it and then you have outputs which is basically allowing you to configure what kind of
04:43output you're looking for in my case in inputs i'm going to provide two different inputs first one is
04:49entity type and the second one is that text the prompt which i'm going to provide inside that
04:54now obviously this entity type and the text will be my two input parameters which will be going to my
05:00llm tool where we are going to take care of name entity recognition in that we will use gpt35 turbo in
05:08this case so we are going to use gpt35 turbo model and obviously that is going to be provided with the help of
05:14azure open ai connection so basically this image is showing you the architecture of this particular
05:20sample which we are going to do after that we have python tool in which we can write some python code
05:25which is basically going to focus on cleansing of my particular entities and then once the cleansing is
05:30done with the help of python logic we will extract the output from this particular one and that will be
05:36nothing but the name entity which is connected with the text input which we have provided
05:42don't worry it's going to be easy when we do this thing step by step as you all know i always recommend
05:47this that you should also try this lab by yourself and you should have your azure ai subscription where
05:53you can work with this so i hope you have it without wasting time let's get started as you can see
05:59right now i am in my ai.azure.com which is my azure ai foundry portal in this portal i have successfully
06:06logged in with my account so all those things i don't need to waste my time in that
06:10the first thing which i'm going to do is i'm going to create a project now you already know
06:14the concepts of ai hub ai projects which are available inside azure ai foundry if you don't
06:20know i strongly recommend you to check out this video and that's going to give you a brief description
06:25of that right now i'm assuming you already know this i'm going to create a project which is maruti
06:32underscore n e r llm so i'm going to do name entity recognition using llm that's what i'm giving
06:39some unique number is associated with that which is fine in the customize section i can customize my
06:45resource group name my hub name so in hub name also i'm going to give maruti hub
06:51for ner so that is what the name which i'm giving location will be east us 2 i think let me change it
07:00to east us and then everything else is fine i'm going to click on next and create now this process
07:09is usually going to take five minutes because it's going to create couple of background services and
07:14these all services will be created in your azure portal so if you go to portal.azure.com this is a
07:20place where you'll be able to see all the underlying resources which are getting created with this
07:25as of now i'll just wait for this process to complete this is loading my page and yes i think
07:32my project is loaded the name which i've given is visible my endpoint and keys are visible project
07:38creation is successful now i strongly advise at this point that you go to portal.azure.com and just check
07:45whether your resources are successfully created or not in my case i'm very sure it's created because
07:51my subscription and all the privileges i have so i'm okay with that the next thing which we are going
07:56to do is we are going to use this project now in the left side section where we have my assets we have
08:01models plus endpoints now obviously right now we do not have any models and endpoints available here
08:07the first thing which we are going to do is we are going to focus on a particular model inside
08:11our model catalog and we will deploy that model so that we can use it so let me click on model catalog
08:19i am going to deploy one of the specific gpt model which is gpt 35 turbo so i'm going to search for gpt
08:2635 and i think from the list of the models which are so many i'm getting gpt 35 turbo 16k
08:34this is a perfect model for my today's sample so i'm going to start with this
08:38now maybe some of you are going to ask me a question why you're not using gpt 4 it is still
08:43available well the answer is costing sometimes we just need a small amount of work and for that we
08:50do not want a latest version of gpt models so you focus on cost you focus on performance you focus on
08:56other aspects of your model usage it's not always like you always going to go with the best model
09:01sometimes if you have a ordinary work or you have some kind of a simple prompting with that
09:07you can use any model with that i'm using this one gpt 35 turbo 16k there is a deploy button i'll click on
09:14deploy in the customization options of this model i think the deployment name is fine but in this section
09:25we will reduce the tokens per minute to only 5000 remember guys by default is actually 120 000
09:32we do not want that many tokens per minute for this kind of a lab i request you if you are also
09:37doing this kind of a model deployment this is going to impact on your cost okay so make sure that you are
09:43going to reduce your tokens per minute rate limit okay uh enable dynamic quota is also something which
09:50i'm disabling so at any point of time dynamically it's not going to increase my quota and i'm just
09:54going to click on deploy now whenever you're done with this this is going to show you that your model
09:59is successfully deployed now there are two ways to check this model deployment the first thing is
10:05you can go into open in playground and you can check whether this model is working fine
10:10with the chat playground or not now because this is a chat specific gpt model i'll click on open in playground
10:19initially in this particular chat playground we are just going to check
10:23whether this is working or not so we have an system message available here is saying that you
10:29are an ai assistant that helps people to find information now let me ask a question here that
10:38what can you do so i'm asking this question to this particular
10:44chatbot what can you do and maybe because it's an ai assistant okay it's going to show me
10:49that i can assist you in finding information a wide range of topics some of the things i can do
10:54include is this this this they're giving me six seven options in that and yes this is what this ai
11:01assistant can do now i'm not really interested in trying different prompts right now because as i said
11:06our goal is to use prompt flow for customization so that's what exactly we are going to do also i'm
11:13going to show you that when you have created your deployed model we just deployed this model before one
11:18minute maybe there are chances that your deployed model is not going to be allowing you to connect
11:23with the prompt pro immediately so it can take five to ten minutes to configure that now let me show you
11:29exactly what happens if you try to connect before this 10 minutes time let me go back to the left side
11:35section where we have prompt flow you can see this is a prompt flow icon i'm going to the prompt flow so
11:41basically we have created the ai project we have created our model deployment also so gpt model is also
11:47deployed now we are going into the prompt flow and then here i do not have any particular prompt
11:52flow right now so i'm going to create a new one when i click on create there are plenty of options
11:58which are available so you can create a standard flow you can create a chat flow you can create an
12:03evaluation flow also now what are the types of these three things you'll see that thing basically this
12:08is explaining here the standard flow are going to hardness the power of llm where customize python
12:14core and more to craft your tailored prompt flow is going to be available you can taste the flow
12:20using custom data set also and seamlessly you can deploy as an endpoint for an easy integration of
12:26your application this is what we are going to use today the other flows we will try later on in some
12:31other labs and videos also there is an explore gallery option here we have a gallery where there are
12:38so many samples which they have given these samples are actually going to load a lot many complex prompt
12:44flows with that so i suggest you first you learn the basics and then only try this complex prompt flows
12:50otherwise you're stuck with the issues in that let's start with the standard flow and i'm going to click
12:55on create it's asking me one option here it's asking me folder name now remember this they are going to
13:02create a new flow and they are saying the flow code files are stored in a specific folder within your
13:08workspace file share storage now you know that there is a storage account which got created with our ai
13:14project and this storage account is having a file share for this particular workspace this folder name
13:21can be customized according to your preferences so whatever name you're giving here is going to be
13:26created in this location so basically in your prompt flow folder it's going to create this kind of a
13:31folder name in which your actually flow data is going to be stored because i'm going to do name
13:37entity recognition i'm going to give a name of my folder entity recognition and then i'm going to
13:42click on create but let me tell you if my deployment of the model is not ready right now this is going to
13:49show me an error so let me click on create let's see if it is working or not this is a very common issue
13:54if the deployment is done recently it won't work you have to wait for some time and then only you'll be
13:59able to create a new flow so it's going to create a folder but the deployment of the prompt flow will
14:04not be successful now if you are facing this issue just wait for some time and retry after 10 minutes
14:10it will work fine let me see what will happen to my prompt flow you can see i got an error and this is
14:17a very common error which is clearly telling you the same thing what i was telling you they're saying that
14:22okay you have a cloud dependency permission this resource was recently created wait for 10 minutes for
14:27role assignment to propagate so basically what they are trying to explain is when you have created
14:32this particular resource then some then some kind of a role assignment has to be working in the
14:37background because right now your ai project and the prompt flow is going to use that storage account
14:43which you have created in the azure portal this particular role assignment is actually going to
14:47take 10 minutes of time and that's the reason even though your model deployment is done your project is
14:52created i strongly advise you or they also request you that you wait for 10 minutes and then you try
14:58so this is the time i'm going to pause this video i will come back after a few minutes and then i'll try
15:03to do the same thing again and i think that time it will work so let's check that after a few minutes
15:10okay i have waited for some time now it's the time i'm going to close this pop-up which was showing
15:14error i'll again try to create a standard flow and this time i'll give a name entity recognition and i'll try
15:21to click on create it's showing me the folder name already exists because yeah they have already
15:27created a folder so let me put one at the end of this and i'll try to click on create once again
15:33this time it worked fine because i waited for 10 minutes now this is a key right now hopefully
15:39microsoft will reduce this time very soon but as of now it is like this my new project entity recognition
15:45one is actually successfully created it's loading the content of that and this user interface is very
15:53important for you to understand that is the reason we are doing a very hello world kind of a sample
15:58right now so it's a very simple prompt flow which we are creating because right now i want you to
16:02understand this user interface here now this development environment is having four sections first inputs
16:09which is here outputs which is at the bottom then we have something which is eco which is this one
16:16this is actually that particular node which is helping you to write a python code inside that
16:20and if i scroll down there is something called joke which is as of now just a simple joke kind
16:25of an element which is here but this is actually my llm element so this is the one which is going to
16:30connect with my llm now as of now this graph which they are showing you if you try to compare this with
16:35the previous slide which i have shown you it's very simple graph which they have created now i do not
16:40want one input i want multiple inputs actually and if you see right now in the input section we have
16:46only one input which is topic now this is a simple hello world kind of a sample so let's try to create
16:51some initial input configuration first so in my input i do not want topic instead of this i'm going to
16:58specify entity type and this entity type is of type string and we are going to specify this entity type
17:05is actually job title i'm going to add one more input because with entity type job title which i
17:12want to extract i want to put some kind of a text also so this is going to be text and i want to provide
17:18some kind of a text in the input right now which is this i'm just specifying the software engineer is
17:26working on a new update for the application basically here the job title is actually software engineer
17:32which is my name entity which i want to extract from that okay that is fine output we do not want
17:39to configure right now input configuration is fine we have two inputs entity type and text so we are good
17:44with this now after this let's directly configure our llm because this is a joke which is an llm right now
17:51i do not like this name so i'm going to rename this i do not want joke i want the name of my llm is going
17:57to be ner which is name entity recognition underscore llm this is going to be the name of my llm so
18:06ner llm is actually something which is here so llm node name is what we have renamed right now
18:14exactly below that we have a connection section in the connection i have my connection this is a azure
18:20openei service connection which is already visible in my connections if i go into my management center but i
18:26have this connection this is the only connection which i have so i'm going to choose this and then
18:32it's asking me what kind of api you want now we can have chat api we can have completion api i'm going
18:38with chat what kind of a deployment name you want to choose here now obviously we have one deployment
18:43which is gpt 35 turbo 16k so i'm choosing that temperature is fine one everything else is fine i do
18:51not want to change anything but this is a connection which is helping me to connect with my
18:56azure openei service now if you try to recall the structure which i have shown you we have configured
19:02input with the two different inputs inside that we are configuring the llm tool node which is ner llm
19:08which right now i'm doing actually and we have specified the api connection with the help of azure
19:14open the connection so these things are actually something which we have done now obviously i have
19:18to configure my llm tool and my python tool for cleansing and that's what we are going to do next
19:23this particular llm tool is actually right now having a simple joke kind of a logic i do not
19:30want this so i'm just going to get rid of this instead of this i have this prompt available with
19:35me and if you want this prompt you can just find the link in the description you will find a step-by-step
19:41lab which is available in our git repository and using that one you will be able to follow all the steps
19:47so this is my prompt which i'm providing here basically for a system we are specifying your
19:52task is to find entities of a certain type of from the given text content if there are multiple entities
19:59please return them all with the comma separated like entity one and to do entity three and you should
20:05only return the entity list nothing else so the output of this is going to be only entity list
20:10nothing else which we are specifying if there is no such entity please return none
20:16and then in the user section we are specifying entity type and the test content so this is what
20:20user is going to provide as an input and the answer is going to be an entity format this is
20:25like a one-shot learning which we are providing in the user section and this is my system message
20:29which i have customized this now if you already understood how you are going to use chat gpt models
20:35with your chat prompts and the system message in my previous video i hope you're able to understand
20:40what i'm trying to do in my llm configuration once this is done it's the time we have to just click on
20:48start the compute session now you can see on the right top corner we have this button which
20:52is start the compute session so i'm going to click on save i'm going to click on start the compute
20:58session which is actually going to start a serverless compute associations with this so it's going to take
21:03some time this can also take around four to five minutes depends upon the resources which are
21:07available in your subscription so i just clicked on this one this is showing me green tick here that
21:12yes compute session is started then i'm going to do the next step in this okay my compute session is
21:18running right now it's showing me a green tick here i waited for a few minutes and it got configured
21:24now it's the time we have to click on this next step which is validate and pass input now as
21:29per this configuration which we have done for the system and user message we need to have two
21:33different inputs associated with that while the default one is showing me only one so let me click
21:37on validate and pass input this will actually check the configuration which you have done inside this
21:42box so remember this is a very important button if this cannot validate and parse properly then it
21:48won't work further so let me click on this and let me see if i'm facing any issues and errors in that
21:53now it's it's all good for me it's showing me green tick validation and passing input completed
22:02successfully i have two different inputs entity type and text we know that thing i have to connect this
22:07now even if you see right now we are not able to see any values here and because of this there is no
22:13input linked to any are now so this is something which we have to do i'm going to specify that the
22:19entity type is going to connect with inputs entity type which is my value associated with that and
22:25then the text is something which is going to be my inputs text so these are the three different
22:29parameters which we have two from input one is output we are specifying and linking this thing
22:35and once you link this then only this is showing you the colored blue color arrow here that now your
22:40inputs are successfully connected with your ner llf this is how this particular prompt flow or i can say
22:47prompt based workflow is going to look like now we are good up to this point we are 50 percent done
22:53with this logic let's go to the next one which is allowing you to write a python code in that which is
22:58eco let me scroll little up this is my eco now i do not like this name eco so i am going to change
23:05this name to cleansing because this is basically going to help me to cleansing of this particular prompt
23:10code let me get rid of this default content which is there i do not want this python code instead of
23:17this i have my python code which i'm going to use here yes i have copy pasted my python code now as you
23:23can see here i'm first trying to import typing and prompt flow which did the help of this particular line
23:29so if you see i'm importing list and this particular import tool so basically prompt flow is that tool
23:35and typing is nothing but a list kind of a thing so these are the python packages which we are trying to
23:39import here then we have add the red tool which is actually going to help me to declare the logic
23:44for this tool in which we have a function called cleansing this cleansing function is going to take
23:50my entities with the string format with maybe list of the entities can be there because as we discussed
23:56it can have multiple entities also inside that and then it's going to split it's going to remove the
24:01reading and trailing spaces tabs dots whatever is there with that it's going to take care of that thing
24:06and that is what this cleaning logic is doing now obviously i did not need to explain this two three
24:11lines of code it's simple logic which is dividing that text into parts and then cleansing that and
24:16then creating a separate entity part from that this is all good this is simple logic of python the good
24:22thing is this section is allowing you to write whichever python logic you want so no restrictions you
24:28can put whatever logical code inside that if you're good in python you can implement this as you want
24:34totally customizable if this is done again let me click on validate and parse input because you can
24:41see cleansing is now not having any connection with the output in the right side part let me link that
24:46so i'm going to specify validate and parse input for this one so first we are configuring input uh how
24:52exactly cleansing will get the input so it's going to get the input from ner llm let me create some space
24:58here so this two parts we have to connect first and then output of cleansing will be given separately
25:04uh it's asking me validation and parsing input completed successfully this entity string are going
25:09to be coming from where i am going to say this entity strings are going to be coming from ner llm output
25:15so basically the output of ner llm will be provided into cleansing as an input and that's how the workflows works
25:22so this is going to be like output of ner llm will be provided as input into cleansing and then once you're
25:30done with all this the only last and final part which is now remaining is this output section now this
25:37output section is having some dummy joke kind of a output inside that we do not want that
25:43so i'm specifying the name of this is going to be entities so these are going to be the list of the
25:49entities or maybe one single entity inside that and the value of that is going to be coming from
25:55cleansing output and when we do this thing this is how the workflow should look like
26:00now because of the order the output is showing on the top i think the correct order of this
26:05is output should be at the bottom so this is my correct flow inputs then ner llm name entity recognition
26:13and then cleansing and then we have outputs which we have just now configured
26:17if you understood this flow it's a very simple prompt flow which we have created it can be as
26:22complex as you want and this logic also can be anything you want but yes because we are first
26:28time learning from flow we have just done this thing this way now this is the time we have to
26:33check whether these things are working or not so i'm going to click on run this run is going to run
26:37my prompt flow if everything is fine it's going to execute this and it's going to show me proper output
26:43and logs connected with this let's wait for some time on the top is showing me running so i have
26:48to wait for some time it's going to take some time to run this yes it's showing me variant zero run
26:54completed which means my first execution of this prompt flow is successfully executed
26:59in this particular prompt flow graph also you can see it's showing me green ticks with the completed
27:04which means that it's successfully done now somewhere when you run this thing if you're getting
27:08some errors or some validations or some issues instead of green tick you're getting some yellow
27:13warning mark or some red cross on that then it means your logic or certain things are not proper in
27:18those nodes uh right now i'm just going to scroll down to this left side section forgive me this is
27:25a little tricky i'm not very good with this scroll it's super tiny yeah now it's showing me that this
27:31input here provided entity type job title and the software engineer kind of a thing in the output it's going
27:37to show me that they have executed this we with completion tokens too and the output is software
27:42engineer basically this is the entity which they have extracted if i want to see the trace information
27:47or the logs associated with this those things will also be visible here now let's say i want to change
27:53this input slightly and i want to add more than one entities inside that so let's say i'm going to say
27:58the software engineer is working on the new update for the application
28:04and
28:08coach maruti is
28:14helping him
28:21learning new concepts
28:23steps now remember software engineer and coach both are actually my entities which are there now
28:31this is the text which i'm providing here let me click on save
28:37let me click on run now let's see this time it is able to find two different entities or not
28:43now remember this is all based on your logic and the customization which you're doing
28:48again it's showing me variant zero run completed so this run is also successfully executed i'll scroll
28:53down and this time if i check the input is showing me that this input is actually here
28:59and then if i click on the output it's showing me that output is having two entities software engineer
29:05and coach so basically they have taken the input and they understood that this is actually the
29:10entity which we are trying to associate here as a job title now this is really amazing tool if you
29:17just use your basic python logic you will really enjoy this thing i hope you understood this particular
29:22lab and you like it thank you so much i'll see you tomorrow happy learning
Recommended
20:09
|
Up next