Skip to playerSkip to main contentSkip to footer
  • 5/15/2025
Welcome to this hands-on AI-900 lab session, where we explore Prompt Engineering techniques using Azure AI! Prompt engineering is the key to optimizing interactions with AI models like OpenAI’s GPT in Azure, enabling more accurate, efficient, and context-aware responses. Whether you're preparing for the Microsoft AI-900 Certification or looking to enhance AI-driven applications, this step-by-step tutorial will guide you through best practices for crafting effective prompts.

🔍 What You’ll Learn in This Video:
1️⃣ Introduction to Prompt Engineering & its importance
2️⃣ Understanding how AI models interpret prompts
3️⃣ Techniques for crafting effective prompts (Zero-shot, Few-shot, Chain-of-Thought, etc.)
4️⃣ Using Azure OpenAI Service for prompt optimization
5️⃣ Real-world applications of prompt engineering
6️⃣ Tips to improve AI model accuracy & efficiency

🛠️ Who Is This For?
AI & ML Enthusiasts exploring AI-powered applications
Developers & data scientists working with Azure AI models
Professionals preparing for the Microsoft AI-900 Certification
Businesses looking to enhance AI chatbots, automation & NLP solutions

📌 Key Highlights:
✅ Hands-on demo of prompt engineering in Azure AI
✅ Best practices for structuring AI prompts for better responses
✅ Improving AI accuracy & efficiency with optimized prompts
✅ Use cases for chatbots, customer support, content generation & more

Explore our other courses and Practice Material On: https://www.youtube.com/@skilltechclub

Category

🤖
Tech
Transcript
00:00good morning good afternoon and good evening thank you for joining us today my name is Maruti and
00:15I'm back with another learning topic and the topic for the today is prompt engineering as
00:21you know every day we are learning new things in Azure cloud and AI related stuff and prompt
00:26engineering is one of that topic which you need to learn if you want to utilize maximum from
00:32generative AI now we are going to talk about prompt engineering right now so basically the
00:37first question is what is prompt engineering now if you want to understand prompt engineering you
00:42need to understand the word prompt I think in my previous videos I have explained this but let me
00:46give you a quick recap whenever you provide some input in the chat box of your chat GPT or any
00:52other chat model when you provide the input text or maybe you're going to provide that with the
00:57help of a speech that input text is actually something which is known as prompt so basically
01:02whatever you are sending to the chat GPT model that is something which is known as prompt and then this
01:09prompt is going to be processed by the LLM large language models and then they are going to give
01:13you the response that response or whatever answer you're getting from them that is known as completion
01:18so basically it's not a request and response it is a prompt and completion which is a technical term
01:25which you need to understand now whatever you're going to send in that prompt when you improvise
01:30that you will get better results and that's why you need to understand certain techniques of prompt
01:35engineering and that's exactly what we are going to learn today so what is prompt engineering the answer
01:41of that is it's going to help you to constructing prompts to maximize relevancy and accuracy for
01:46completions again do not forget the words prompt and completion it's going to specify formatting and
01:53styles of completion it's going to help you to provide conversational context so that you can better
01:58explain to the LLM that what kind of an answer you are expecting from them it's going to help you to
02:03mitigate bias and improve fairness which are obviously the two responsible rules of responsible AI now
02:10without wasting time let's get started with our Azure AI foundry portal we are going to do some of the
02:17initial steps which are common but then we are going to focus on prompt engineering techniques today
02:22okay now as you can see I have logged into my ai.azure.com basically my Azure AI foundry portal and the
02:30first thing as usual we are going to do is we will create a new project so I'm going to create a new
02:35project which will be created with the separate hub my project name I'm just specifying Maruti with
02:42something like AI approach and in the customize section I just want to change one thing that the
02:51location of this is not going to be East US 2 it's going to be East US so I'm choosing East US as my
02:57location I have this particular hub name also which is Maruti hub with some number so I'm just specifying
03:06this kind of a name and I think everything else is fine okay with all this configuration I'm going
03:13to click on next and I'm going to click on create now while this deployment process is going on let me
03:19remind you one thing that if you are using your Azure subscription make sure after completion of all the
03:24practical labs you delete the resources those resources which are created in your Azure portal
03:29will cost you almost every minute so it's advisable when you are not going to use this thing you have
03:35to delete it okay so project creation is done and which means that the next thing we are going to do is
03:41we are going to choose our specific model from the model catalog remember for this particular demo today
03:47I am going to use GPT model but you can actually try these techniques with whichever model you like
03:52in this particular search section I'm going to search for GPT
03:5635 if I'm going to put this thing I'm going to get GPT 35 turbo 16k GPT 35 turbo instruct there are so
04:07many versions are also available here I'm going to choose right now GPT 35 turbo which is this one
04:12now remember whenever we choose the model so far in all this configuration we always deploy the model
04:19first and then once you deploy the model you will get something called playground where you can
04:24actually try all the prompts in that and that's exactly what we will do today also I will click on
04:30deploy it's showing me an optional configuration here now I want to change one thing that is I do not
04:36want to go with the 100k tokens per minute I do not need this much so I'm going to scale it down to
04:435000 tokens per minute I think this is perfect for me everything else is fine I'm going to click on
04:48deploy this is remember this is connected with my AI resource which is my open AI service this is the
04:54only connection which I have as of now with the East US region location I'm going to click on deploy
05:00and this will take I think maximum one minute to deploy this deployment now remember once this
05:06deployment is done all we are going to do right now is open in playground and we are going to try this
05:12prompt which I'm going to show you if you're a developer and if you want to use this deployed model
05:17you actually have to use the endpoint and the key which is associated with that and then in your own
05:22application also which is maybe developing java.net javascript python whichever language you prefer
05:30you can actually use this endpoint and the key for all the prompt configurations with that as of now
05:37let me click on open in playground this is going to give me a playground where I can try my prompt
05:43engineering techniques the first prompt which I always try is because this is a GPT based prompt
05:51and left side we have an AI assistant kind of a system message I always try this thing first that
05:56what can you do so basically this is going to show me that what my assistant can do in this case
06:05because this is an AI assistant right now now in my other videos I have shown you that how you can
06:10customize system message and using that how you can generate different kind of a content based on this
06:16right now it's just showing me I can help you with find information on a wide range of topics
06:22answer questions provide explanations offer suggestions and assist you with the various tasks
06:28just let me know what you need help with now this is fine let me give you the first prompt
06:35engineering technique the first prompt engineering technique is direct language yes whatever you
06:40want to ask just put it directly in the specific language and then it's going to give you the
06:45response of that let's say I am going to put a prompt which is this create a list of 10 things to
06:52do in Edinburgh during August now I am directly specifying location a time which is associated with
06:59this and then I'm asking that how many things I'm expecting actually which is 10 so this is like a
07:05direct language you're specifically saying this is exactly what I want when I do this it's showing me
07:10a list of the things so it's going to show me attend Edinburgh festival fringe the world's largest art
07:16festival then second thing is there then third thing is there and totally they are going to show me
07:2110 things because that's what I have asked for so basically remember one thing direct language means
07:26you exactly ask what you want if you ask for it you'll get it that's step number one now let's go
07:35to the second step in which we have to understand that we have to provide clear instructions so when you
07:41want very specific thing you have to provide a clear instructions like for example let me show you one prompt
07:47I am specifying the prompt which is saying write a product description for a new water bottle now I am not
07:56specifying what kind of a water bottle is this but I'm just saying I want a product description for a
08:00new water bottle when I mention this prompt is going to generate the completion is going to give
08:05me the response of that and you can see it's actually using some five six lines of description in this
08:11it's saying introducing the hydro flow insulated water bottle the perfect companion for staying
08:18hydrated on the go the sleek and stylish water bottle is designed with the double wall vacuum insulated
08:24stainless steel construction now this is something which is very generalized information which they
08:28have generated because only thing which I have mentioned in my prompt is a new water bottle and if I
08:36want to be very specific as I said step number two is provide clear instructions now what I mean by that
08:42instead of this prompt I will use this one which is actually saying write a product description for a new water bottle
08:50that is 100% recycled be sure to include that it comes in natural colors with no dyes and each purchase is going to remove 10 pounds of plastic from our
09:04osha's so I'm actually specifying the intention behind this bottle I'm specifying that it is not coming with some kind of a dye is actually having all the natural colors with that so I'm actually adding some more details and this is why I am saying that you have to
09:20provide clear instructions what exactly you want now when I am going to submit this prompt let me tell you the cost of the prompt and completion is going to be calculated based on the tokens when I am doing this thing compared to the first prompt this one is going to give me a better result it's going to give me a better completion even though it's going to show me a similar amount of text or it's going to use similar amount of tokens cost is going to be same but the result is going to be much more improvised this time if you
09:50see it is actually focusing on all those points which I see it's saying that introducing eco wave recycled water bottle and a sustainable choice for eco conscious individuals who wants to make positive impact on the planet
10:02this innovative water bottle is made from 100% recycled material helping you to reduce the waste to protect environment all those things which I have asked for is actually mentioned inside this is also showing me that this is a recycle bottle which is going to be part of a movement towards more sustainable future
10:19make a statement with your hydration choice and show your commitment to protecting our oceans and the environment so basically this is like a more improvised completion we are getting with the help of better prompt I hope you understood first two step direct language and provide clear instructions now let's move forward to the third one which is requesting output composition sometimes we do not want an output with this kind of multiple lines paragraphs
10:49model it's also going to be taking the same on the same page and then let's move forward to our information so let's move forward to the next one which is going to be part of the next one which is going to be the first time
10:55because this is writing the third one which is going to be part of the next time step number 3 is going to be important I am adding a new prompt now I'm saying that write a table in markdown with six animals in it with their genus and species now this time this
10:58animals in it with their genus and species now this time this is like i am giving you an example
11:05of requesting output composition which means that i am exactly specifying what kind of a format and
11:12what kind of a data i'm looking for if i send this prompt because i'm saying write a table it's not
11:19going to give me paragraphs it's going to give me a table and that also in markdown i hope you know
11:24markdown has a specific extension association with that it's showing me sure here is a table in
11:29markdown format with six animals along with their genus and species they are giving me animals genus
11:34species so we have lion elephant tiger giraffe penguin and dolphin and they are showing me the
11:40genus and species associated with that cool this is giving me a table kind of a format now so this
11:45was step number three requesting output composition you can also specify that i want to generate an
11:50email or i want to write a newsletter you can specify different kind of formats and what exactly
11:55you're looking for and it's going to generate completion based on that now the fourth one which
12:01i'm going to show you right now is known as chain of thought this is one of the very important prompt
12:07engineering technique when you have some complex completion to generate basically in chain of thought
12:13you are going to mention to the model that i want you to explain step-by-step process so you actually
12:20ask a model to break down its responses and then explain its reasoning with that let's see how chain
12:27of thought works i'm providing a prompt now asking this what spot is easiest to learn but hardest to
12:34master so i'm asking a question and then i'm saying give a step-by-step approach of your thoughts
12:40ending in your answer i'm going to send this prompt let's wait for the completion to be generated
12:49the question is straightforward what spot is easiest to learn but hardest to master but this time i want
12:54to see the thought process i want to see what kind of response i'm getting and then what kind of reasoning
12:59they are giving me for that now you can see right now they are showing me there are various opinions on
13:05this but one spot that is often considered easy to learn but difficult to master is golf here is a step-by-step
13:13approach to explain why golf is fits this description now it's showing me learning the basics golf is
13:20relatively easy to learn of basics hitting a stationary ball with a club towards the target
13:26in the hole so this is something which is easy then they are saying understanding techniques mental game
13:32consistency and precision is required which can actually take years to master that course management
13:38mastering the industries of different courses understanding how to navigate hazard all these
13:43things are important skills of a golfer and then continuous improvement is obviously required now the
13:49answer they are saying is golf they are saying that while the basics of golf can be learned relatively
13:54quickly achieving mastery in the sport including consistent performance mental toughness strategic thinking and
14:02precise execution is a challenging and ongoing process now maybe if i just add on one more thing in this that
14:09which one sport is easiest to learn hardest to master and not very expensive because we know golf is an expensive sport
14:17now maybe for that if i say that i want to look for something which is fitting in my budget then maybe it's going to
14:23give me another sport and then it's going to give me the reasoning associated with that and that's what chain of thought is actually doing
14:29now because we are using natural language right now let me show you some more prompt engineering techniques
14:34where now next we are going to see is how can we generate code programming language code with the
14:39help of natural language text now let's say i am going to put a prompt like this write a function
14:46for binary search in python so this is going to generate a python code for the binary search function
14:53now when i do this thing remember your completion is always based on the system message this is a normal
15:00ai assistant right now so this is not the expert of writing a python logic right now but still i'm
15:06saying that write a function for binary search kind of a thing in the python and this is showing me a
15:11python logic here so you can see a binary search function is created with two parameters it's giving me
15:16the step-by-step logical code it's also giving me some example usage of this function if i want to invoke
15:22this function now this is fine this is working fine and it's generating a code also for me and suppose if
15:28i do not understand this function i can also mention can you explain about function
15:43step by step so maybe i'm not an expert of python and i want to understand what exactly they are doing
15:49in this function logic and i want them to explain this thing step by step that can be also generated
15:55easily with your model as you can see i got a step-by-step explanation of the binary search
16:00function in python they are showing me seven to eight different steps in that and then in each step
16:05what they are doing is what they are explaining inside that now sometimes you do not need to
16:10specifically say that what exactly you want to do in that particular code but you want to generate it
16:16for example i'm trying one more prompt here in this prompt i'm saying complete the following function
16:21basically i have an incomplete code and i want my model to complete my code in this case i'm just
16:28specifying complete the following function i am using something like commented lines calculate the
16:33average of the numbers and in an array but only if they are even now this is not a logic this is just
16:39a comment in python which is denoted with the help of hash and then i'm just defining the function
16:44with the keyword def and then obviously i'm not creating any function right now i just want my
16:50model to complete my logical code so what logic i want to write i'm just putting that in the comment
16:55and then i'm saying you please complete this particular code and if i do this thing that will
17:01understand the comment which i have added in that particular function and it will generate a logical
17:06code for that so not only you can ask for a specific function name you can also have an this kind of
17:13commented lines and it's going to complete your logical function with that i did this prompt if i
17:19scroll down you can see it's showing me a def calculate even average is showing me the total
17:25and count kind of two variables is calculating the number in an array so exactly as per the commented
17:31message which i've given they're trying to complete that function and they're also giving me an example
17:35usage how exactly i can call this this are some of the useful techniques of prompt engineering which
17:42most of the people should know now obviously this is an endless process but i hope with this
17:48particular video you understood that what is a prompt engineering now there are so many tools in which
17:54you can try this thing if you are interested in trying some of the tools which are actually giving
17:59you prompt engineering kind of techniques and then it's also allowing you to not only generating code or
18:05a textual thing there are a couple of tools available which will actually help you to generate
18:10images with the help of a proper prompt if you are interested in those things just comment down that
18:15in this particular video and we will share a list of the useful and free tools which are helping you
18:20to generate images and code and natural language text with the help of prompt engineering techniques
18:27that's it for now i'll see you tomorrow guys signing off bye bye

Recommended