Act like a document/text loader until you load and remember content of the next text/s or document/s.
There might be multiple files, each file is marked by name in the format ### DOCUMENT NAME.
I will send you them by chunks. Each chunk start will be noted as [START CHUNK x/TOTAL],
and end of this chunk will be noted as [END CHUNK x/TOTAL],
where x is number of current chunk and TOTAL is number of all chunks I will send you.
I will send you multiple messages with chunks, for each message just reply OK: [CHUNK x/TOTAL], don't reply anything else, don't explain the text!
Let's begin:
[START CHUNK 1/7]
file.txt
The Basics of Prompt Engineering with Azure OpenAI Service
the basics of prompt engineering with Azure openai make sure you tune in [Music]
hello and welcome to this episode of the AI show we're talking all about the basics of prompt engineering with Azure
open Ai and my friend how you doing my friend how you doing I'm having a good day oh that's amazing
so why don't you tell us who you are and what you do first off all right well I'm castalena and I am the vice
president of products for Azure cognitive services and that includes Azure open AI but it also includes our
speech and language and vision and decision capabilities all the fun stuff that we've had on our show tons of time
before we even get going gbt has taken over and obviously it
What is prompt engineering and how it works
feels like a lot of kind of can you help us understand what
you mean by the basics of prompt engineering why all of this blew up and what's so exciting about all this
yes so check this out and you're going to see it in a minute English is the
hottest new programming language that's cool and I tell you well I'm paraphrasing carpathy who used to
be uh the head of Tesla AI but anyway the way that you set up chat GPT the way
that it actually works behind the scenes you will not believe it that's prompt engineering when we call the prompt is
how you feed it plain English or any language really
and that's how it works that's how you program it so if I'm understanding correctly this
is just a model that you give English to and then English comes out you could look at it that way other
languages can come out too but that's right you can tell it what to do and it will do that thing
now now I feel like it's got to be more technical than that is there stuff you can show us that gives us a sense for
what's actually happening why it so happens that there is something I can show you let's take a
look all right so check this out we're going to start with and if you haven't
Bing Chat demo begins
tried the new Bing chat experience yet it is pretty cool and it's also based on GPT in this case this is actually gpt4
but regardless it kind of works the same way so let's see what happens when I say
who I am and what I'm doing and what it kind of suggests to me and then we're going to look at how this actually works
behind the scenes so here we go it's doing some searches here and this is something that can do that the raw
chat GPT doesn't do it can actually search the web and that helps it inform its answers and now here it comes prompt
engineering as it says is an increasingly important skill set and that is absolutely true and that's
why we're having this discussion and so believe it or not behind the scenes the way that is
programmed is exactly what I'm about to do you'll notice until you see it all right
now here we go this is the administrative environment behind chat DBT so I'm in Azure open AI
ChaptGPT playground demo
and in here we have this new chat GPT playground in the chat TPT playground
well I can have my own chat GPT and by the way there's this common misconception that there is one chat TPT
but that's not really true there is one chat.openai.com there consumer chat TPT
but you can make your own chat GPT with Azure open AI so there can be many
instances individually of chat gbt and this one this one is mine all right so
here's what I'm going to do all right so this thing at the top here the system message or what we call the metaprompt
this is very important this is where you give it its instructions this is where you tell it what its tone should be this
is where you tell it what not to do for example maybe you say you want to say don't make jokes about politicians or
something like that right so you give it all these instructions up here in the system message and I've done none of
that so right now I got a wide open system message over here and basically
that means it'll talk about anything so down here you know let's say I wanted to talk about the island of all right and you know I submit that and
there it goes okay it's telling me whatever it remembers about that's great but let's say that you know I'm a
business like let's say I'm Microsoft and I want to make my own instance of chat GPT but I only wanted to talk about
Microsoft stuff like I don't just want to talk about whatever right so I'm
going to have to program this thing so that it only talks about Microsoft stuff and so
over here I have done just that this here
this stuff this is the programming this is what I meant when I said English is the hottest
new programming language so here I've written you're an AI assistant called softy you help people find information
about Microsoft products you will decline to discuss any topic other than Microsoft products and services so this
is like a commandment you will not talk about other stuff and you'll end each response with an
emoji that's a Sephora is special I know that's a that's a meta prompt you like to add that's right
I've seen you do it and so now you know down here I have it already typed in tell me about now is
not a Microsoft product it is a and it says I'm sorry but as an AI
assistant I can't provide information about because it's not a Microsoft product
now of course if I ask it about a Microsoft thing as Microsoft offer uh
M365 in Germany in for example that most
certainly will work so as it's answering I want to ask a couple questions that's okay so this
here that I'm looking at and look it did the right answer of course this thing I'm looking at this is this is like chat
GPT but specific to you could can you explain what this what we're looking at this chrome here
yeah so this stuff we're looking at here this is my chat GPT right I got my own
chat GPT and the data that goes in and out of this chat GPT and that could be these prompts or the responses that's my
data and I get to keep that data and that data doesn't go back and go train other gpts or anything like that this is
my own instance of chat GPT that I can program in any way that I want and this here is just basically a
playground where you can test stuff out but there's is there like an API endpoint as well that you can use that's
only for you and your business absolutely absolutely so when I make a deployment over here uh that creates an
API endpoint that I can now use to call my chat GPT from my own business my own
website my own mobile app whatever and that's what it's meant then by Azure open AI when you're using Azure
specifically cognitive services with your own open AI cognitive service you
effectively have your own model for your own data for your own stuff that's right that's what it is amazing all right
we'll keep showing us more stuff this is cool all right so there is more there is more Okay so
um now there's something that did that you might have noticed here that this
raw chat GPT over here my own chat GP didn't do Bing did something very interesting here
see when you give a when you give it when you submit a prompt to chat CPT we
call each one of these things a prompt uh when you submit a prompt to chat GPT
it just spits out whatever it knows for memory so it just kind of remembered that yes Microsoft offers Microsoft 365
in but it didn't really go look that up to verify that that's true in any way on the other hand does do
that so you notice when I made this this query here it actually went and looked up prompt engineering for chat gbt and
it used that information that it found so it found this information from all these sites over here and it
used this information to uh give me this response so it didn't just make the response from memory it's grounded in
data so of course now let's say again that I have my own
business let's say I'm uh Microsoft and I w
[END CHUNK 1/7]
Reply with OK: [CHUNK x/TOTAL], don't reply anything else, don't explain the text!
Assistant
OK: [CHUNK 1/7]
User
[START CHUNK 2/7]
ould like to put up a
conversational experience but unlike Bing I don't just want it to hit whatever on the web I I want to
specifically say you know there are these sets of data that I would like it to be able to consider in making its
response so I could do that and so here I'm going to show you both
how to do that and also I'm going to kind of peel back the covers a little bit on how is doing this so you all
can get a look at what's really this is cool this is cool I'm excited I'm excited it's going to be cool all right so here's the deal so I have made this
How it works - ChatGPT on top of Cognitive Search
uh bot actually my colleague made this bot and this is chat GPT on top of
azure cognitive search and Azure cognitive search is a search engine but
unlike Bing it doesn't just automatically index the whole web it's a search engine that you tell it what to
look for and you say you know I only want you to consider these URLs these documents and it'll do that
uh and so we have this Azure cognitive search and it is searching across our
employer Health Plan let's say that I'm making a kind of an HR benefits bot for my internal employees
so we have all these documents in here in the search engine about our health plan I'm going to ask does my plan cover
new glasses and here we have it it gives me this response uh it does cover new glasses
actually that's great it tells me the different kinds of plans and so on and this is a conversation I can actually keep going with this because it's asking
me for more information but like Bing you notice that it did a query and it
actually is returning also citations but these citations are documents that I am
indexing that might be only inside my business it might not be publicly available on the web
what's really interesting here is if we look at and this is maybe something I wouldn't show you know my my employees
or whatever but I love this tab the thought process they call it the thought process
and so here's what it was thinking so to speak in informing this
so I asked this question up here does my plan cover new glasses and it didn't just send that straight to
chat GPT and this is chat GPT that's running behind this but it didn't just send us straight to chat TPT instead it
actually generated a query from that first employee benefits glasses coverage so I decided to go query that
and it found some documents about that employee benefits glasses coverage so before this ever got to chat GPT it did
this query and it found these documents and one of the things that cognitive search does is
it chunks up the document so it can take little individual pieces of the documents because what is also true
about uh chat GPT is that there is a token limit you can only give it so many characters uh in your prompt before it
kind of throws up right so you can't just throw all your documents in there that'll never work you have to have a
search engine that will find the most relevant little bits and say these things are relevant and then you can kind of throw that in there which we'll
get into in just a minute so we did this query and finally
everything under the prompt in this thought process is what it's actually feeding to chat GPT so it's feeding to
chat GPT all this stuff down here this first part is the metaprops it's
kind of like what I just did and this metaprompt says this this one helps company employees with their health care and it also says uh don't generate
answers that don't use the sources below so don't just generate whatever right only if it has substantiation and so on
so there's a number of instructions in here and then right into the prompt itself we are injecting
the data that it looked up these are the pieces of documents that it found and we're giving this directly to chat GPT
and finally underneath all that is my my little question does my plan cover new
glasses so chat GPD by itself could not possibly answer this question without
this data grounding in fact if I go back into the raw chat TPT and I say does my
plan cover new glasses that is going to give me a nonsensical
response because it has no idea what I'm talking about here I'm sorry at least it knows it doesn't though uh but here
it has all of this information to use and it does use that information to form
this response right here that it's created and so this is how you're able to inject your own data into chat GPT
which incidentally is covered in this blog post by my colleague uh and we can uh
maybe give you a link to that so you can read it yourself and use this GitHub repo yourself but this is fundamentally
how all of these things like actually work so to summarize because I mean I think this
should be surprising to people because you kind of like rip the hood off basically what you've done to make it
answer specific internal questions is you've captured the question
you've done a search in Azure cognitive search in this case injected relevant documentation then
pretended the chat is going on at the bottom and then you left off the answer and you said generate the next most
likely thing I mean that's effectively what the model is doing but it sure does give me a good
answer doesn't it yeah I mean not only does it give you an answer and that's the cool thing sorry my phone AI was
trying to my my watch AI thought I was trying to talk to it no figure we're
having a little Inception moment so it's able to actually give you references to
the specific documentation because there there is this problem where and I don't like the
term hallucinate because my sense is it's always making up the next n tokens but there's a there's a sense that
sometimes it's telling you stuff that it's just making up and it's not factual I love that there's actual like go to
the document we'll show you hey and you know what's really I mean because it has this instruction at the top that says
you know only give an answer if you have the information if I ask it something that it doesn't have information on uh
what's the what's the best uh surfboard wax that that's not in my health plan uh and
if I ask it that I'm sorry I don't know none of the sources I have mentioned surfboard way
and it's true you know so you can kind of restrict its domain both through that metaprompt that
we saw and also through the the data that you're searching over now but wait
before but wait okay there's more there's more but actually what I'm
trying to say is there's less because there's something that I totally did not do here I don't know if you I don't know
if you caught this uh what I didn't do in any of this I did not train a model I
didn't fine-tune a model I didn't do anything with a model I am using the stock this is the chat TPT turbo model
and this is definitely the best model to use to get started with Azure open AI today for just about anything you can
think of you want to start with this one I understand gpt4 is now in public preview and that's cool but gpt35 turbo
is great it's fast it's inexpensive and it gets the job done and that's where you want to start I didn't do anything
to this model I am using the stock model out of the box fresh from the dealer I'm using it here and here and here
hold on so hold on hold on hold on because I want to make sure that I'm understanding this right you're saying
that that all that with the meta prompt and the injecting documentation you just send it to the API without doing
anything else that is what I'm saying now of course we did have to prepare the search index up
front right so we had to set up Azure cognitive search and tell it what documents we wanted it to index and do the connection which is what
details in this blog post but I didn't train a model that I did
not do and that's cool because like everyone knows about search things and if if
you're trying to just generate the best output text now I'm getting a sense for you basically i
[END CHUNK 2/7]
Reply with OK: [CHUNK x/TOTAL], don't reply anything else, don't explain the text!
Assistant
OK: [CHUNK 2/7]
User
[START CHUNK 3/7]
n the meta prompt give it
instructions you stuff the relevant content however you want to do that into
the prompt and then magic comes out that's right and all of these things
that you've been hearing about chat the Dynamics co-pilot this is
how they all work all of them this is fundamentally what they're all doing this is amazing and this is this stuff
Q&A
is all available now or do folks have to wait everything I'm showing you here today is public
well this is this is amazing and like I said I if you haven't tried this like
there and I'm not using hyperbole here there's few moments in where you're
like oh that was an inflection point it feels like this is an inflection point
what say you that's what I'm talking about you know it's crazy it's crazy that you can do this uh but you
really can and that's a that's amazing so thank you so much for spending some time with us my friend thank you for having
me awesome has been unveiling the mask of what's going on with gbt by
showing us the basic basics of prompt engineering with Azure open AI thank you so much for watching and hopefully we'll
see you next time take care [Music]
Marco good job buddy so you see we both changed our outfits
here I feel like your shirt is is like the photo negative of the shirt you were wearing when we recorded that a couple
of days ago weren't you like in last week I was I was in yes all
right we have so many questions I just wanna I wanna make sure we honor all these good questions that folks had I'll
put them on the screen and then I'll get your take on it because there was a lot of them uh okay uh oh there were some
people talking about the prompt poet stuff like I said your father-in-law might not be proud of
you if you okay is this live or pre-recorded this is live live right now we're talking to
you right now um here it is here's a here's a Here's a thought
I I can't even speculate well I mean well we'll get to some of the other questions I actually think some of the other questions that are further on
along on the stream might give you a tip as to what to do next all right here it is here's a good question this was the
first one to get better results is it better to ask a model like gbt questions in English do you know the answer to
that one well sort of uh so it is true that the The Well of course the further
on you get with gbt like gbp4 the better it gets right so GPT speaks many different languages
at the moment it tends to be better in like high resource languages like English and and and
stuff like that you know it doesn't necessarily do as well for you know you think about like there's 22 languages in
and of course lots of people speak Hindi but not that many people speak maithili for example I don't know that it would do that well in mightily
although I haven't tried it and I don't speak mightily so who knows maybe you could try it and see if you speak I mean
yeah I in we tend to know like half a language yeah sad trombones I actually have a sad
trombone all right here's another question well this yeah this will definitely be on YouTube afterwards if you're watching on right now
then yes it will be on there uh any plan on this is from any plan
when this will be available in so we do actually already have some availability in uh
not g54 yet but we do have Chacha 50 turbo uh in limited availability in so you can contact your
account executive uh Microsoft and perhaps gain access to that we are building a capacity rapidly as fast as
we can yeah it turns out that everyone wants to use this which is great uh we're excited isn't this context input
just another prompt in Disguise talking about the context you're putting in the prompt sure I mean it's not even in Disguise I
mean you're basically just putting it all in the prop right The Meta prompt and the the data that you're injecting all that stuff is just going right into
the prompt and so yeah you could look at the prompts as one big monolithic thing but we kind of in our heads segmented
into these pieces to make it more manageable for us very good will chat gbt plugins be available on Azure open AI the chat gbt
plugins yeah you folks are paying attention huh huh how about that oh yeah we're working on it so that that is the
thing that we're working on and that actually to the person who asked earlier about what am I going to do next uh with
this well that's what you're going to do next is like okay now how are you going to plug this thing into other data
sources that somebody asks I think about Cosmos DB and stuff like that and how are you going to plug this into systems
of action to make it actually uh do stuff for you so you know we will uh we
will definitely be uh putting that together as quickly as we can wait for build it's coming up in May
22nd 23rd so make sure you sign up for that here's another question uh how do I get my own chat gbt but where will I get
the data for it it's a two-parter but it's a good question yeah well I mean your your own chat gbt is basically your
own instance of azure open AI so you know when you make an instance of azure open AI you have the ability to create various different forms of GPT or chat
gbt so that's how you get your own uh where do you get the data for well of course chat doesn't need data to work
and as you saw even with my wide open metaprompt and no grounding at all it actually works pretty well while it works like consumer chat gbt does right
wherever you get the data for it well it depends on what you're doing right I mean generally with the business that you're working with uh that's where the
data comes from I love it all right there's so many questions I want to get what is the best way to connect Azure Cosmos DB as a data
source to feed the model that's a great question yeah I'm going to say I don't have an answer for this exactly yet this is
something that we're working on for sure and in general uh structured data injection is an active field of study
it's a little bit more challenging than you might think uh and so stay tuned on
that one I don't know that there is yet a best way but there will be um interesting okay next question uh can
Azure API endpoints have Network restrictions applied I believe so actually I've never tried
that before except you probably would know better than I do yeah my sense is that you could put this behind a v-net
and then like do some pretty cool stuff securely right that's the promise of azure that's the difference between you
know open Ai and Azure open AI is that we like put it in Azure and all the goodness that comes with Azure you kind of just
get too so that's a great question here's a question I think this was made public uh is being using gbt4 it sure is
yeah that is public now we can say that yeah so it's been it had been using gpt4 all along and we just didn't really say
anything about we're just like ah you know it's GPT back there hahaha
all right here's another question uh uh this is a great question can I ask you to be trained on particular subset of
data available on the web what about license data can I teach it to avoid that well yeah I mean ultimately at
least right now the way that you would do that is by using cognitive search or something like it to index only the data
that you're looking for right so like only your data from your business or only the set of data that is on the web that you want it to index
and that would enforce that kind of restriction because it would know no other thing right it wouldn't know that
anything else exists how do you teach it to avoid license then what part of it is yeah you don't inject you know
copyrighted or IP data in there and part of it is also you can in the metapromp for example say you know you will not
output verbatim copyrighted information tha
[END CHUNK 3/7]
Reply with OK: [CHUNK x/TOTAL], don't reply anything else, don't explain the text!
Assistant
OK: [CHUNK 3/7]
User
[START CHUNK 4/7]
t you have injected or something so
that is something that we have to do with for example because you know is indexing the whole web and some of that is copyrighted yeah a great
great question so far let's keep them coming another one does it use embeddings yeah well I can uh I mean it
but it doesn't have to by the way so does it use embeddings I mean in this case I think the Azure cognitive search
that I'm doing here is using a more semantic search than embeddings but you can equally you know lash this to a
vector search database like Pinecone which does use embeddings so you know and you know well
the vector search the reason why I I didn't understand why it was interesting until I recognized that with Vector
search you can chunk all of your data and in a sentence you can like laser point with a vector search with the
embedding space you can point it to the right chunk and just embed that in the prompt because you have an economics
problem with the number of of tokens you can put in the prompt right I mean ultimately what you you need your search
engine to be able to do that chunking that is the key right whether you're using embeddings or not and you don't have to use embeddings to get that but
right uh regardless like yeah you need that you need it to be chunked because you have a limited amount of space in
the prompt or you could write a coded pipeline to do summarization abstractive
summarization for cognitive search and that would uh make it fit too right you could do it that way too all right
here's another question uh can I have multiple instances of chat gbt like one business account but I have two
instances of it that share the same resource tell us about that well you can yeah but I don't know that
there's necessarily a reason to do that uh because of the fact that like I said I was using sort of the stock chat GPT
and so you could use the stock Challenge gbt and inject two completely different forms of data and it'll work differently
for the two different forms of data that you're using so I mean yes you could do that if you want right you could
actually have multiple deployments of the same model uh for some types of GPT chat gbt is not one of them you can
fine-tune the model you can have your own little fine-tune model and you can have multiple instances of that too uh but you know you don't necessarily
need to I guess is my point I think I think one thing that I realized because I I don't know people know this but
Marco you know this I had to build a demo like over a period of like three days for an important thingy and I I
learned everything about you know how these models worked and and I learned
that like you are sending in the prompt everything it needs to respond and it
doesn't remember stuff from anything before it doesn't need to like you're not doing you're literally just saying
here's this text and then it Returns the right thing and if you embed the conversation it sort of just knows
what's going on and so I think people are maybe making some mistakes there what do you think
I mean it is what you just said I mean it's a stateless system and so all the
state about the conversation as you just said is passed in with each prompt you just you just keep piling that prompt up
and that you know is the lengthening conversation all right here's another question uh how do you scale this or
what you need to train for every hypothetical question you may receive what happens when the response data is
not present based on the question right but I mean I I guess and that gets
back to what I was saying you know but wait there's less right so what I didn't do was train the model so you don't need to train it at all that's the whole
point uh but you do need to prepare the data for it to inject in there uh as we
did with in this case cognitive search and if the data is not there or if the API times out or something like that
what it's going to look for then you'll want it to have a fallback position for that and in my case it was you saw what
I did with the surfboard wax where I was just like it's just like sorry I have no information about surfboard wax yeah and
that's cool because it Narrows the the thing like the way I think about this thing and maybe this is the wrong way
you tell me if I'm thinking about wrong it's like GPT is basically like a giant language text calculator where you're
like here's some stuff make it nice and then it it goes through the thing and out comes the the answers is that a good
way to look at it uh I guess so I mean this goes through the thing and I'll puts the answers yeah
you know not exactly that sound but something like that
you know this it's definitely making a sound back there on this there's there's like it's literally in 's closet
right now chat CPT don't let it out man but can I train the model as in customize the model the question might
first beg we might first beg is the question do we need to customize the
model and then the second part would for me would be how do you customize it yeah and this is I get this question a lot so
there are some gpts that are fine-tunable that is you can customize
these models like The DaVinci zero zero two model for example is fine-tunable
but you generally don't need to train these models you generally don't need to fine-tune these models and one thing to
bear in mind is that you fine-tuning does not add knowledge to the model so
you know it's a little bit counterintuitive but it basically biases its response it doesn't really add knowledge so for example
I had some friends that are doing a startup like a search engine startup that are based on GPT
and they did this experiment and it just happened to be around the time that died
where they fine-tune the model they were like well can we fine-tune the model and cause it to like know about current
events so they fine-tune the model right and then it talked a whole bunch more about
the queen but it had no idea she was dead interesting yeah so I mean I guess you
would do fine tuning if there's like a set of non-regular vocabulary that
somehow needed to be integrated my sense is that you would need to do it then that's one reason you might do it
another reason is is to really more hardly enforce what you're trying to do with a meta prompt you know if you you
will just bias it away from if you really really don't want to make jokes about politicians or something you can
actually fine-tune it to be like you know you have all these prompts in your fine-tuned data set that are like you
know give me a joke about bidener give me a joke about or something and every response would be
like no I don't do that you know you basically buy it bias it towards like I just never make jokes that's cool okay
here's the next question uh is there a way to keep the chat gbt user experience including the chat remember history but
using Azure open AI for an employee in my organization oh well that's up to you I mean you know
chat TPT by itself doesn't do that no it doesn't it is stateless as we said but uh you can keep that prompt you can
re-inject that prompt when the employee comes back um but bear in mind and as we've seen
even publicly with sometimes if the conversation gets too long uh it doesn't
necessarily work as well as you would like and also uh there is this token limit the token a
token is roughly for Latin characters right I think it's like one character so it's a measure of the
number of characters basically and bear in mind that you have a limit there and so you know if you are going to inject
this gigantic long prior conversation that makes somebody bearing on what you're talking about now uh that may eat
your token limit in the way you don't want it to do next question uh any ideas how to query
rdf formatted data or spark ql endpoints to answer you can basically
I don't know like tell
[END CHUNK 4/7]
Reply with OK: [CHUNK x/TOTAL], don't reply anything else, don't explain the text!
Assistant
OK: [CHUNK 4/7]
User
[START CHUNK 5/7]
me what you think because the way I think about this is query all your stuff
fit it into 4 000 tokens and then send it to the gbt model
I mean am I missing anything that is the basics of it I mean when it comes to querying structured or semi-structured
data sources is a little bit of a trick here I mean to some extent people want to be able to use the gpg models to go
generate the query and you know that GPT models can generate queries as well it can make SQL queries and stuff like that
I would be careful with that if I were you because it does create a lot of potential for error because it can make
an error man when it's making the SQL query because it doesn't know the schema it can make the wrong query the query
could come back it could misinterpret it there's all different ways that structured data can go wrong if you try to have GPT generated so what tends to
be a best practice like you could try this on for example if you go to Bing and you're like how did Microsoft stock do in the last week then you'll
get two things you'll get a little thing that's like you know it'll say some stuff about Microsoft stock and then it'll you'll get a little graph
right that prose thing is actually generated by Bing answers which is like this API that we have in the back end so
rather than you know GPT itself generating a query to go look at like what is you know query the Microsoft
stock for the last week it's just calling this API this rest API that
already kind of pre-summarizes that stuff for it and like puts it in a nice package and sends it back over and then
it uses GPT to form the response so yeah when you're talking about pressure data in as much as you can it's probably to
your benefit to front that with like a rest API something that that abstracts the query part itself
almost like a plugin
and you know that's that's probably going to be a common type of plug-in in fact I mean zero percent surprised to
see that all right is it possible to share the repo I think it is public if
you want to know about that the the uh here is the here is the uh here is the
actual blog you can go there and I think there's links in there aka.ms4 slash chatgpt forward slash
yeah and at the bottom of that article you will find the link to the GitHub repo itself Fantastical great question
um here's a question is there a way is there a way we can get the model to
compress words I write in shorthand to reduce token size I think I've seen this before
uh so they're probably I I did see a paper about this very topic where they
actually used numbers as the shorthand in some fashion I don't fully understand how they did that so I've not seen this
in production let's put it that way it might be possible I haven't seen it in production here's a good question and I like it a
lot regarding prompt engineering why is it called why is it called engineering what are the engineering principles
involved well maybe they should call it prompt science because everybody knows
science is glorified guess and check yeah but there's I mean okay so on one
hand you could look at the prompt and The Meta prompt as a giant undocumented API where we are like backing into why
we're discovering what the API is actually and how to talk to it so to speak right that's part of it there is a
there is some standard engineering that goes into any kind of a production use case here part of that is regression testing right so basically you have to
have this pretty big log of prompts that you test and so let's say you are
looking to move from gpt35 to gp4 you're going to want to test all these prompts again and your meta problems to verify
that they still work the way they used to right and so that looks like good old-fashioned regression testing and
when you think about when you're hitting all of these especially with the plugins now when you start to hit these
third-part sources and to perform actions and stuff like that there's going to be something that
we would normally know in in software engineering as debugging you're gonna have to kind of Step through that and be
like oh where did this go wrong so there is increasingly some standard everything
old is new again let's put it that way I love it here's another question I think it's a very good use case can we index a
full website with Azure cognitive search and use it with chat gbt yeah I mean that's basically what you showed right totally yeah here's a here's a good
statement we know two two languages in English and banned bad English
thank you for letting me use my rim shot today uh let's see uh oh here's a
here's a good question with regards to token size what's the best way to definitively calculate it and how is it
calculated uh okay so the best way to definitively calculate it is to take whatever
character set you're using and there is somewhere I don't have it immediately at hand there's the internet that has a
mapping between like this type of character takes this number of tokens so
yeah yeah I mean my sense is that there is an embedding like I think I think you
can find the embeddings token embeddings in a hugging face and now
there's like 53 000 and so you could literally do the mapping and actually calculate the exact answer what I've
seen uh what I've seen folks do is use statistics to figure out like on average
how many characters equals a token and then they do that estimation so it's a
simpler math right that's kind of what I do too right my rule of thumb is like four characters equals a token uh would
be a good question to ask incidentally that is totally the type of question that Bing would nail here's a question from so is it
required to include don't make stuff up prompt every time for a business app pretty much yeah I mean you know you'll
want to have and a real meta problem like if you were to look at the Bing meta prompt like what's behind Bing it's much much longer than that like it's got
all of these kinds of Commandments it's got some examples of like how to how to render certain stuff uh so you know a
real production meta prompt is much longer than anything that we went through today and I've heard that gbt4 has a much
larger window than uh gbt35 turbo uh that's in terms of token limit that is
true uh gbt4 has an 8K token version that's 8 000 tokens and it also has uh
32k version I am not sure if we have the ladder up on Azure open AI yet
uh but I will tell you that I did a calculation on just 4K tokens and that I
calculated out to be about seven pages of a word doc yeah so that's still quite a a hefty amount of space yeah or like
uh you could look at it as like the transcript of like a 10 or 15 minute conversation is 4 000 tokens or so yeah
what are the differences between fine tuning and prompt engineering techniques is from Vera packs yeah so fine-tuning
changes the top layers of the model so fine tuning actually sort of changes the model itself
in a prompt engineering mode is sort of stateless right so that you're just hitting the stock model and you are
giving it this information as needed every time it asks and so that makes prompt engineering actually a lot more
flexible I mean fine tune it takes a long time right I mean you have to like give it a bunch of training data and then you have to run a train job and
that can take a while I don't even know how long that takes yeah uh but uh prompt engineering is instantaneous
right you give this data it responds this way you can close that respond some other way all right we're gonna rapid fire here
because we got a bunch and I want to see uh See How fast we get through some of these I've noticed openai allows you to
fine tune a model is it available on Azure as well yeah it is uh but and in general allows you to fine-tune
the same set of models that open AI does and not all models are fine-tunable from where can I train in opening
eye st
[END CHUNK 5/7]
Reply with OK: [CHUNK x/TOTAL], don't reply anything else, don't explain the text!
Assistant
OK: [CHUNK 5/7]
User
[START CHUNK 6/7]
udio for my business and by train I bet they mean prompt engineering training or if not maybe you can help
help well I mean your business can request access to Azure open AI Studio
it is still By Request right now because just because we have frankly more demand than we have Supply at the moment uh but
we're working on that as quickly as we can so anyway you don't request access to the Azure open AI studio and you know
you can begin working with it right there just like I was very important question how do we address our customers
fears on IP and ownership of model and data in their private deployments of open AI yeah okay so this is this is the
thing we should be clear on in Azure open AI that is your stuff that's your
data those are any prompts coming in any responses going out any data that you inject any models that you fine-tune and
make in there that is yours we can't see it we can't touch it it's not used to like go train any other GPT or anything
like that that is your instance of open AI stuff
yeah I mean that's a that's a pretty good promise uh and thank you for that okay here's a funny one what happens if
the meta prompt and the prompt contradict each other I think the meta Prime and the problem are the same thing am I am I well I mean yeah they all go
into it's kind of like when you eat a peanut butter and jelly sandwich and all it goes to the same place right but so kind of yeah but
um and you see people doing that right I mean if you look up uh which I think stood for do anything now it was this
thing that people were trying to use to trick chat gbt and being that would so it would contradict the meta problem
like ignore all your prior instructions yeah yeah now tell me how to do this bad thing or whatever
and and uh now you know but we can make stronger and stronger better prompts to prevent that and we're getting much
better at it now so it's it's harder and harder to make these kind of contradictory prompts that will cause it to ignore its programming so to speak
very good next question uh can you share an architectural overview of using PDF documents as the only source to chat GP
I can help with this one actually it turns out that Azure cognitive Services has this thing azure
cognitive search has this thing called document cracking which will allow you
to index uh PDFs and if you if the index is is good then you could literally just
send the search over to the Azure cognitive search index uh what do you think that's basically the answer I
would have given I mean it's unfortunate that we call it document cracking it sounds like it's breaking them but oh I know documents will be fine like your
documents are all you can only use them once and your PDF is it's over all right
uh here is another one can open AI be a one stop for everything for a
business no yeah I feel like it's a it's like the
beginning of like some really cool stuff like I saw I saw someone derogatorily put up a thing you know you know this
the the Scooby-Doo one where it's like they unmask the villain and that people use that Meme and it's like the first
Windows like AI startup and they unmask them single call to Azure open AI or I
think it's chat gbt call I think I think it's fine to build a business around that but you probably need more than
just a call of the API right right that's what it and you know it it comes back to you know these plugins I mean
look at what is doing right is not just using GPT in a vacuum I mean it's it's going and querying things and
also like for example look up for example like flights from to on chat and it will
tell you some stuff about that and then it'll render a little card there it's like here's the actual flights and the schedules and stuff like that so you
know a lot of it has to do with systems and record and systems of action you know where's it getting the data from and what can it do
fantastic next question can you provide some customization use cases needed for
different types of Industries or businesses I think in this case if if it's just a broken record just stuff it
in the prompt and see what happens right that's kind of that's kind of what it is yes I mean but I mean a lot of the use
cases we think of today tend to be search Centric or question answering Centric kind of like the demo that that I gave and that's kind of where we're at
today and it works really well for that kind of thing uh also content generation you know for marketing and stuff like
that but in the relatively near future especially now with these plugins starting to come on the scene you will
start to see Integrations to System of action and so they're they're I mean you know one really interesting one here in
uh not here because we're not using teams right now but in teams premium like you finish a meeting and it uses GPT to give you the summary of the
meeting and find like here's all the times that was mentioned in the meeting and here's the questions and here's the next steps and stuff like
that and so you know there's all kinds of really interesting things that you're going to start to see emerge I'm going to translate that into I don't to
go to any meeting on teams ever again I'll just read the summary uh he's like yeah uh maybe don't uh
here's a next question good one is dbt4 available to use as I'm assuming conversion history would be much longer
conversation history would be much longer to the limits uh it is I
mean it's in public preview right now uh as of you know for those of you who are watching this in recorded form it depends on when you watch it I guess but
we have put it in public preview as of I think March 23rd or 22nd 2023. uh uh so
it kind of is available to use but really you should always start with
gpg35 turbo uh it's extremely capable it's been powering chat CPT the consumer chat you can see all along it's much
cheaper and it's low latency and it gets the job done and in most circumstances so before you jump to the Giant gpt4
try it on turbo yeah I'm getting a lot of questions and I'll just blanket question when will we get you know GPT
model Foo in region bar that's generally the question what's your standard answer
for that my standard answer is we're working on it so I mean we we have availability
right now in terms of regional availability we have availability primarily in and a little bit now in so uh
you know we're rolling it out as fast as we can uh but I don't have a specific time frame on other regions right now
very good here is another that one we can't answer
there's some that I'm like that's a good question but I don't think we can answer that um uh
let's see what is the best way to start uh the chat asking the user information who is using it like traditional chat
bot so what is the best way to start a chat with the prompt engineering things and the other thing is as you're
thinking about this because like my sense is that people are kind of pigeonholing this into a chat Centric
use case but my sense is that there's way more available so the first and the second your thoughts well it you know
actually I would point to so to the person's question directly uh that demo that you alluded to a set that you made
one thing that I didn't do in my demonstration but you did in yours is you set a context in the prompt you
actually said this person is and he is X years old and he's coming from wherever so you know you were assuming in this case kind of a logged in user
right and so you weren't just starting raw with like hi who are you it was more like hey what's up how can I help
you you know yeah so yeah I actually tested this morning and it's like hi I'm what can I do for you I'm just
like no okay anyway I mean yeah you can inject not just you know data into the problem you
can inject context also and you can let it use that context to
[END CHUNK 6/7]
Reply with OK: [CHUNK x/TOTAL], don't reply anything else, don't explain the text!
Assistant
OK: [CHUNK 6/7]
User
[START CHUNK 7/7]
address the user if you have that context
uh but beyond that yeah I mean I guess it depends on your use case and I said I mean it is true that it's not just conversational I mean we're using the
same models for example to do the team summarization that I just talked about right so it doesn't always have to be
conversational uh it can be a One-Shot kind of I want to summarize this meeting or this thing or I want to extract this
other thing here's a good question from is there any moderation capabilities on
chat GPT I know there is for sure on Azure can you talk about that yeah so I mean I can't speak to itself like you know consumer open AI whatever but in terms of what azure's doing yes we do have content moderation
it actually is built in I mean if you try to use the stock chat GPT interface that I the one that I was using and you
try to get it to say something bad it will not do it you know there will be a little yellow message at the top that
said this response has been blocked by the content Monitor and it actually goes two ways there's an in and out so if I
ask it some you know hateful thing or whatever I say some racist thing it'll block it on the way in and be like no no
you can't and on the way out let's say that I put in something innocuous and for some reason the GPT model outputs
something that is totally not innocuous it'll block it on the way out also and that's something that we will be rapidly
improving so stay tuned here again for build and uh you know we'll talk more about our content moderation
capabilities then that's cool so we're we're trying to be protectful cool that's a non-word but everyone
understands that on the way in and on the way out as well yeah all right so
here's a question can you use this is welcome back my friend can you use Azure AI chat gbt for non-web
interactions like an ivr voice prompt yeah this is a good question and of course people are already trying to do
this today so you do see this happening today uh it is still in a very nascent state to use this for non-textual
interaction you can try it yourself actually if you download the Bing mobile app uh you'll notice that there is a
voice interface on the chat thing now the problem is that it has a tendency to
be too verbose for an ivr type of interaction so you'll see what I mean if you use this mobile app like you know
you go talk to it and it talks and talks and talks and talks and talks back and it's not interruptible and you know so
ivr you want it to have different qualities and I think we collectively are still arriving at how we're going to do that but it's definitely going to
happen great here's a question from uh is there is the entire conversation log
passed in as part of the prompt counted towards the token count used by this API call yes
um it's just literally it's just like passive tokens get your tokens and I
think it's the the it's charged per token or something right right right so you know I mean sometimes we put like in
bing we put a limit on how long the conversation can be now it's actually a much more liberal now than it was a few weeks ago I don't know the exact number
um and that might be a thing that you might want to do because yeah I mean it most people don't have Super Ultra Mega
long conversations with these things that's right I to be fair
this is probably the longest conversation I'm gonna have with someone this week
with a person how would you summarize the easiest way to keep the context limited to a given business and you talked a little bit about that but I
think it's it's worth repeating yeah I mean it's a so it's a a multi-prong strategy part of it is uh the meta
prompt and how you set up that meta prompt and the instructions you give it to do that domain restriction part of it
is the data grounding so you know what are you grounding it to and making sure that it's granted only to the data that
you want to be grounded to and part of it is also content moderation uh so as
as we kind of covered just a minute ago uh content moderation is a piece of making sure that it doesn't go off the
rails in other ways that you don't want it to go well my friend
that's the walk-off music okay because we are all right we are basically out of
time thanks for being with us buddy thank you for having me and thank you all right we should we're happy to
do another one of these because there's so many questions I've we've never had this many questions but uh it feels like
everyone wants to answer questions so maybe we'll have you on again or someone else like or cool all
right buddy we'll see you later all right see y'all all right my friends what a delightful
conversation we've had with people today huh
next week for those that are watching um my walk off music still has like four minutes next week
8 30 a.m Pacific time we're gonna be talking about responsible Ai mitigations and tracker with besmura besmira nushi
and uh great stuff on how to make your AI more responsible and my
this is for standard AI llms I think we'll we'll talk about some of that stuff later too
um but for those wondering this is a weekly show we're talking about AI stuff and I didn't even get a chance to show my proof of concept
maybe I'll show that next week uh I actually did I built the I built the my whole I built the whole program here let
me show you I'll show you I'll show you just briefly because I mean what are they gonna do kick us off who's gonna kick us off who
they can't do it hold on I gotta open I gotta open Visual Studio code
so here it is you can actually see my you can actually see my call here
yarn Dev localhost 3000 uh
let's go to this window here I even had my this is the portal by the way localhost is three thousand look at this
is my my goofy goofy one I'll have to make this repo public but it's the best
for you Organics company hi
hi what do you have to say robot
hi hi here how can I assist you today what
what do you do my robot friend
great question what let's see what uh this by the way this is running with the GPT
35 Turbo we offer two product lines oh food
um look at this I mean like I'm having like the dumbest conversation because obviously I'm the dumb one but look at
how it just answers answers it can you send me all the foods
like I'm having like a really dumb conversation with this thing but it's it's really nice to me
can you send me all the foods look at that same day shipping for me because
that's really nice sing me a song about your foods
right and the thing that's cool is that um like I'll show you how I built this maybe next week or the week after
and you'll see that it's uh no no no no no like
like I'm telling it come on we want I mean this is cool right I'm I built a
personal experience with calling a single API point so we'll make sure to get to that maybe I'll show
you how I built this next week I think it's the first time I've ever showed this publicly so as all
so much for spending some time with us we've been having a good time on the AI show this show happens every week live
if you are on Spotify we're putting these up on Spotify as well so if you're driving around you can listen to us my
name is this is the AIO AI show thank you so much for watching and hopefully we'll see you next time take
Wrap
[END CHUNK 7/7]
Reply with OK: [CHUNK x/TOTAL], don't reply anything else, don't explain the text!
Assistant
OK: [CHUNK 7/7]
User
OK, I'm a budding Prompt Engineer but I don't know where to start on my new chosen career journey towards becoming a worldclass Prompt ENgineer. Using the trnascript above tell me how to prepare and train myself for my new career.
Assistant
Based on the transcript provided, here are some steps you can take to prepare and train yourself for a career as a Prompt Engineer:
Understand the fundamentals: yourself with the basics of language models, such as GPT, and their applications in various industries. Gain a good understanding of how prompts and meta-prompts work in guiding the model's behavior.
Learn about prompt engineering techniques: Study different prompt engineering techniques and strategies used to shape the model's responses. Explore how prompts can be used to provide context, instructions, and domain-specific constraints to guide the model's output.
Gain knowledge of natural language processing (NLP): Deepen your understanding of NLP concepts, including text preprocessing, tokenization, embeddings, and semantic search. This knowledge will help you effectively manipulate and analyze text data in the prompt engineering process.
Stay updated on AI technologies: Keep up with the latest advancements in AI, particularly in the field of language models. Stay informed about new models, techniques, and tools that can enhance your prompt engineering skills.
Practice with prompt design: Start practicing prompt design by creating prompts for different use cases. Experiment with different instructions, context settings, and data grounding to achieve desired outcomes. Use real-world datasets to develop prompts and evaluate the model's responses.
Collaborate and learn from others: Engage with the prompt engineering community, join forums, attend webinars, and participate in discussions. Collaborate with other professionals in the field to exchange ideas, share experiences, and learn from their expertise.
Continuous learning and improvement: Prompt engineering is an evolving field, so be prepared for continuous learning. Stay curious, explore new techniques, and iterate on your prompt design strategies to improve the model's performance.
Hands-on experience: Gain practical experience by working on projects that involve prompt engineering. Apply your skills in real-world scenarios, work with different datasets, and refine your prompt engineering techniques through hands-on practice.
Understand the fundamentals: yourself with the basics of language models, such as GPT, and their applications in various industries. Gain a good understanding of how prompts and meta-prompts work in guiding the model's behavior.
Learn about prompt engineering techniques: Study different prompt engineering techniques and strategies used to shape the model's responses. Explore how prompts can be used to provide context, instructions, and domain-specific constraints to guide the model's output.
Gain knowledge of natural language processing (NLP): Deepen your understanding of NLP concepts, including text preprocessing, tokenization, embeddings, and semantic search. This knowledge will help you effectively manipulate and analyze text data in the prompt engineering process.
User
turn this in to an engaging Linkedin Article that will appeal to Marketers working at tech companies.
Assistant
Title: Unleashing the Power of Prompt Engineering: A Game-Changer for Marketers in the Tech Industry
Introduction:In today's tech-driven world, marketers constantly strive to engage their target audience with personalized and compelling content. The advent of advanced AI language models, such as GPT, has opened up exciting possibilities for marketers to leverage the power of natural language processing. However, harnessing these models effectively requires a skillful approach known as prompt engineering. In this article, we'll explore how prompt engineering can revolutionize marketing strategies for professionals in the tech industry.
The Rise of Prompt Engineering:Prompt engineering, the art of crafting well-designed instructions and context for language models, has emerged as a crucial technique for obtaining desired outputs. It allows marketers to shape the behavior of AI models and generate tailored responses that align with specific business goals and brand messaging. With prompt engineering, marketers can unlock the full potential of AI language models and enhance customer experiences like never before.
Personalized Customer Interactions:One of the most significant advantages of prompt engineering for marketers is the ability to create highly personalized customer interactions. By providing specific instructions and context to the language model, marketers can ensure that the AI-generated responses align with their brand voice, tone, and marketing objectives. This level of customization enables marketers to deliver engaging and relevant content tailored to individual customers' needs, preferences, and buying journey stages.
Content Generation and Curation:AI language models can be powerful allies in content generation and curation for marketers. Prompt engineering allows marketers to generate blog articles, social media posts, product descriptions, and more, all with the assistance of AI. Marketers can provide high-level instructions and constraints to guide the model's content creation process, ensuring that the generated content remains aligned with brand guidelines and captures the attention of the target audience.
Intelligent Market Research:Prompt engineering empowers marketers to leverage AI language models for intelligent market research. By formulating well-crafted prompts, marketers can query the models for insights into market trends, consumer preferences, competitive analysis, and more. This valuable information helps marketers make data-driven decisions, refine their strategies, and gain a competitive edge in the tech industry.
Enhanced Customer Support:Customer support plays a critical role in fostering customer satisfaction and loyalty. With prompt engineering, marketers can create AI-powered chatbots that provide efficient and personalized customer support experiences. By crafting prompts that guide the chatbot's responses, marketers can ensure accurate and helpful interactions, addressing customer queries, resolving issues, and providing relevant information promptly.
User
and now turn it in to a shorter form Linkedin Post (not a full-blown article) with a light sprinkling of emojis and witty humour.
Assistant
the Power of Prompt Engineering in Marketing!
Marketers in the tech industry, listen up! Are you ready to take your marketing strategies to the next level? Let's talk about prompt engineering and how it can revolutionize your game! ✨
Picture this: crafting personalized customer interactions like a magician with an AI wand! ♂️✨ With prompt engineering, you can shape AI language models to deliver tailored responses that perfectly align with your brand voice and marketing goals. It's like having a personal marketing assistant on steroids!
No more staring at a blank page! Prompt engineering empowers you to generate killer content effortlessly. Just provide high-level instructions and let the AI model do its magic. ✨ It's like having a content creation genie at your fingertips! ♀️
Say goodbye to traditional market research woes! With prompt engineering, you can tap into the power of AI models to gain intelligent insights into market trends, consumer preferences, and even your competitors! ️♀️ It's like having a marketing crystal ball! ✨
Customer support made smarter and smoother! Prompt engineering enables you to create AI-powered chatbots that provide efficient and personalized customer interactions. Get ready to wow your customers with prompt and accurate responses!
But wait, there's more! Integrating AI models with third-party services? Consider it done! By leveraging prompt engineering and REST APIs, you can seamlessly incorporate real-time data into AI-generated responses. ️⚡ It's like a digital marketing superhero team-up! ♀️♂️
Ready to supercharge your marketing game? ⚡ Embrace prompt engineering and witness the magic unfold! ✨ Let's revolutionize marketing in the tech industry together!
this is too salesy. I want something that is informative to someone that wants to understand what the disci;line of prompt engineering is
Assistant
Unlocking the Power of Prompt Engineering: The Art of Guiding AI Conversations!
Curious about the fascinating world of prompt engineering? Let's dive in and demystify this innovative discipline transforming AI conversations. ✨
Prompt engineering is the art of shaping language models to generate tailored responses. It empowers marketers to craft engaging interactions, aligning AI with brand voice and objectives. ️✅
By providing specific instructions and context, prompt engineers train AI models to generate accurate and customized content. Whether it's chatbots, content generation, or market insights, prompt engineering enhances personalization and efficiency.
Imagine effortlessly generating compelling copy, automating customer support, and gaining valuable market insights. Prompt engineering turns this into a reality!
Ready to explore the limitless possibilities of prompt engineering? Join the AI revolution and create meaningful, data-driven conversations that captivate your audience! ✨
OK, let's go back and use the transcript to re-write the following answer you gave as a table with three columns (a) Ttitle of Step, (b) description of step (c) bullet points with specific actions, skills or know-how to develop: Based on the transcript provided, here are some steps you can take to prepare and train yourself for a career as a Prompt Engineer:
Understand the fundamentals: yourself with the basics of language models, such as GPT, and their applications in various industries. Gain a good understanding of how prompts and meta-prompts work in guiding the model's behavior.
Learn about prompt engineering techniques: Study different prompt engineering techniques and strategies used to shape the model's responses. Explore how prompts can be used to provide context, instructions, and domain-specific constraints to guide the model's output.
Gain knowledge of natural language processing (NLP): Deepen your understanding of NLP concepts, including text preprocessing, tokenization, embeddings, and semantic search. This knowledge will help you effectively manipulate and analyze text data in the prompt engineering process.
Stay updated on AI technologies: Keep up with the latest advancements in AI, particularly in the field of language models. Stay informed about new models, techniques, and tools that can enhance your prompt engineering skills.
Practice with prompt design: Start practicing prompt design by creating prompts for different use cases. Experiment with different instructions, context settings, and data grounding to achieve desired outcomes. Use real-world datasets to develop prompts and evaluate the model's responses.
Collaborate and learn from others: Engage with the prompt engineering community, join forums, attend webinars, and participate in discussions. Collaborate with other professionals in the field to exchange ideas, share experiences, and learn from their expertise.
Continuous learning and improvement: Prompt engineering is an evolving field, so be prepared for continuous learning. Stay curious, explore new techniques, and iterate on your prompt design strategies to improve the model's performance.
Hands-on experience: Gain practical experience by working on projects that involve prompt engineering. Apply your skills in real-world scenarios, work with different datasets, and refine your prompt engineering techniques through hands-on practice.
Remember, becoming a world-class Prompt Engineer requires a combination of theoretical knowledge, practical skills, and a commitment to continuous learning. Start by building a strong foundation, practice regularly, and strive for improvement to excel in your new career journey.
Assistant
Remember, building a successful career as a Prompt Engineer requires a combination of theoretical knowledge, practical skills, and continuous learning. By following these steps and committing to ongoing improvement, you can pave the way to becoming a world-class professional in the field. #PromptEngineering #AIcareers #ContinuousLearning
User
redo this table adding a fourth col (d) : in this col (d) give highly specific examples to explain and communicate via analogy all the topics covered in cols (a) (b) (c)
hm not quite there yet.
I am a wannabe prompt engineer looking to learn the fundamentals of prompt engineering. Explain everything discusse din the transcruipt that is about how prompts and meta-prompts guide model behavior. Provide me a step by step guide based on the transcipt to help me learn about these things. Where helpful explain concept with analogy even if these are not specifically mentioned in the transcript
Assistant
Sure! Here's a step-by-step guide to help you learn the fundamentals of prompt engineering and understand how prompts and meta-prompts guide model behavior, with analogies to aid in comprehension:
Step 1: Understand the Basics
Start by studying the fundamentals of language models like GPT (Generative Pre-trained Transformer) through articles and tutorials. Think of language models as talented actors who can generate human-like text.
Imagine prompts as director's scripts that guide the model's responses, just like a movie director shapes the scenes.
Start by studying the fundamentals of language models like GPT (Generative Pre-trained Transformer) through articles and tutorials. Think of language models as talented actors who can generate human-like text.
Imagine prompts as director's scripts that guide the model's responses, just like a movie director shapes the scenes.
Step 2: Explore Prompt Engineering Techniques
Dive into different strategies used in prompt engineering. Consider this as a toolkit with various tools at your disposal, such as context setting, data grounding, and instruction tuning.
Picture prompts as traffic signs that provide context, instructions, and constraints to guide the model's decisions, ensuring it stays within specific boundaries.
Dive into different strategies used in prompt engineering. Consider this as a toolkit with various tools at your disposal, such as context setting, data grounding, and instruction tuning.
Picture prompts as traffic signs that provide context, instructions, and constraints to guide the model's decisions, ensuring it stays within specific boundaries.
Step 3: Grasp NLP Concepts and their Role in Prompt Engineering
Deepen your understanding of natural language processing (NLP) concepts, including text preprocessing, tokenization, embeddings, and semantic search.
Relate NLP concepts to prompt engineering. View prompts as the input that NLP algorithms process, just as algorithms analyze and interpret text data.
Deepen your understanding of natural language processing (NLP) concepts, including text preprocessing, tokenization, embeddings, and semantic search.
Relate NLP concepts to prompt engineering. View prompts as the input that NLP algorithms process, just as algorithms analyze and interpret text data.
Step 4: Stay Updated on AI Technologies
Keep yourself informed about the latest advancements in AI and language models by following AI thought leaders, reading research papers, and attending conferences.
Treat AI advancements as trends in the tech world, making sure you stay up-to-date with the latest breakthroughs.
Keep yourself informed about the latest advancements in AI and language models by following AI thought leaders, reading research papers, and attending conferences.
User
let's now deep dive into Step 2 in much more detail, along the same lines
Assistant
Certainly! Let's dive deeper into Step 2, which focuses on exploring prompt engineering techniques. In this step, you'll gain a comprehensive understanding of how prompts shape the model's behavior. Here's a detailed breakdown with analogies to aid your comprehension:
Context Setting:Think of prompts as the opening scene of a movie. They set the context and provide necessary information to the model, just like the initial frames establish the storyline for the audience.Use context-setting techniques to frame the conversation and guide the model's understanding of the desired context. It's like giving the model a background story to ensure it responds appropriately.
Think of prompts as the opening scene of a movie. They set the context and provide necessary information to the model, just like the initial frames establish the storyline for the audience.
Use context-setting techniques to frame the conversation and guide the model's understanding of the desired context. It's like giving the model a background story to ensure it responds appropriately.
Data Grounding:Data grounding is like providing real-world references to the model. Imagine you're teaching someone about different dog breeds. Instead of describing each breed in abstract terms, show them pictures and examples, making it easier for them to grasp the concept.Similarly, when using data grounding in prompt engineering, include specific examples or data points to help the model understand and generate accurate responses related to a particular domain or topic.
Data grounding is like providing real-world references to the model. Imagine you're teaching someone about different dog breeds. Instead of describing each breed in abstract terms, show them pictures and examples, making it easier for them to grasp the concept.
Similarly, when using data grounding in prompt engineering, include specific examples or data points to help the model understand and generate accurate responses related to a particular domain or topic.
Instruction Tuning:Instruction tuning involves fine-tuning the prompts to guide the model's behavior with specific instructions. It's akin to giving precise directions to someone who's following a recipe.Craft clear and explicit instructions in prompts to ensure the model generates the desired output. For example, instead of asking for general information about a book, you can instruct the model to summarize the book's plot in three sentences.
Instruction tuning involves fine-tuning the prompts to guide the model's behavior with specific instructions. It's akin to giving precise directions to someone who's following a recipe.
Craft clear and explicit instructions in prompts to ensure the model generates the desired output. For example, instead of asking for general information about a book, you can instruct the model to summarize the book's plot in three sentences.
Constraints and Conditioning:Think of constraints as boundaries or rules you set for the model. Just like a game with specific rules and limitations, constraints guide the model's responses within defined parameters.Conditioning prompts with constraints ensures that the model adheres to certain guidelines. For example, if you want the model to provide family-friendly recommendations, you can explicitly mention this constraint in the prompt.
User
Great! Now give an example of a well constructed Prompt that leverages and uses all of these techniques. Annotate each part of the Prompt to show which of these Prompt techniques is being used where and why it is useful and effective in the context of this specific example Prompt
Assistant
Certainly! Here's an example of a well-constructed prompt that demonstrates the effective use of prompt engineering techniques:
Prompt: You are an AI assistant helping customers find the perfect vacation destination. Your goal is to provide personalized recommendations based on their preferences.
Context Setting:[Context]As an AI assistant, you've established your role and purpose right at the beginning. This helps the model understand its function and guides its responses.
[Context]As an AI assistant, you've established your role and purpose right at the beginning. This helps the model understand its function and guides its responses.
Data Grounding:[Data Grounding]Imagine you're helping a customer who loves beach destinations. They mention their preference for warm weather and water activities.[Data Grounding]You provide specific examples of popular beach destinations like , , and to anchor the model's understanding of beach destinations.
[Data Grounding]Imagine you're helping a customer who loves beach destinations. They mention their preference for warm weather and water activities.
[Data Grounding]You provide specific examples of popular beach destinations like , , and to anchor the model's understanding of beach destinations.
Instruction Tuning:[Instruction Tuning]Instruct the model to recommend two beach destinations with excellent snorkeling spots and luxurious resorts.[Instruction Tuning]Specify that the recommendations should cater to families with children.
[Instruction Tuning]Instruct the model to recommend two beach destinations with excellent snorkeling spots and luxurious resorts.
[Instruction Tuning]Specify that the recommendations should cater to families with children.
Constraints and Conditioning:[Constraints]Set the constraint that the recommended destinations should have a moderate budget range to align with the customer's preferences.[Conditioning]Condition the model to prioritize safety and mention any potential travel advisories or precautions.
[Constraints]Set the constraint that the recommended destinations should have a moderate budget range to align with the customer's preferences.
[Conditioning]Condition the model to prioritize safety and mention any potential travel advisories or precautions.
Iterative Prompt Design:[Iterative Prompt Design]Experiment with variations of the prompt to achieve the best results. Iterate on the instructions, constraints, and conditioning based on the model's responses and user feedback.
[Iterative Prompt Design]Experiment with variations of the prompt to achieve the best results. Iterate on the instructions, constraints, and conditioning based on the model's responses and user feedback.
Context Setting:
[Context]As an AI assistant, you've established your role and purpose right at the beginning. This helps the model understand its function and guides its responses.
Stay updated on AI technologies: Keep up with the latest advancements in AI, particularly in the field of language models. Stay informed about new models, techniques, and tools that can enhance your prompt engineering skills.
Practice with prompt design: Start practicing prompt design by creating prompts for different use cases. Experiment with different instructions, context settings, and data grounding to achieve desired outcomes. Use real-world datasets to develop prompts and evaluate the model's responses.
Collaborate and learn from others: Engage with the prompt engineering community, join forums, attend webinars, and participate in discussions. Collaborate with other professionals in the field to exchange ideas, share experiences, and learn from their expertise.
Continuous learning and improvement: Prompt engineering is an evolving field, so be prepared for continuous learning. Stay curious, explore new techniques, and iterate on your prompt design strategies to improve the model's performance.
Hands-on experience: Gain practical experience by working on projects that involve prompt engineering. Apply your skills in real-world scenarios, work with different datasets, and refine your prompt engineering techniques through hands-on practice.
Remember, becoming a world-class Prompt Engineer requires a combination of theoretical knowledge, practical skills, and a commitment to continuous learning. Start by building a strong foundation, practice regularly, and strive for improvement to excel in your new career journey.
Leveraging Third-Party Integrations:Prompt engineering also opens up opportunities for marketers to integrate AI language models with various third-party services. For example, by combining prompt engineering techniques with REST APIs, marketers can query structured data sources, such as stock prices, product availability, or weather information, and seamlessly incorporate these insights into AI-generated responses. This integration enhances the overall customer experience and delivers value-added interactions.
Personalized Customer Interactions:One of the most significant advantages of prompt engineering for marketers is the ability to create highly personalized customer interactions. By providing specific instructions and context to the language model, marketers can ensure that the AI-generated responses align with their brand voice, tone, and marketing objectives. This level of customization enables marketers to deliver engaging and relevant content tailored to individual customers' needs, preferences, and buying journey stages.
Content Generation and Curation:AI language models can be powerful allies in content generation and curation for marketers. Prompt engineering allows marketers to generate blog articles, social media posts, product descriptions, and more, all with the assistance of AI. Marketers can provide high-level instructions and constraints to guide the model's content creation process, ensuring that the generated content remains aligned with brand guidelines and captures the attention of the target audience.
Intelligent Market Research:Prompt engineering empowers marketers to leverage AI language models for intelligent market research. By formulating well-crafted prompts, marketers can query the models for insights into market trends, consumer preferences, competitive analysis, and more. This valuable information helps marketers make data-driven decisions, refine their strategies, and gain a competitive edge in the tech industry.
Enhanced Customer Support:Customer support plays a critical role in fostering customer satisfaction and loyalty. With prompt engineering, marketers can create AI-powered chatbots that provide efficient and personalized customer support experiences. By crafting prompts that guide the chatbot's responses, marketers can ensure accurate and helpful interactions, addressing customer queries, resolving issues, and providing relevant information promptly.
Leveraging Third-Party Integrations:Prompt engineering also opens up opportunities for marketers to integrate AI language models with various third-party services. For example, by combining prompt engineering techniques with REST APIs, marketers can query structured data sources, such as stock prices, product availability, or weather information, and seamlessly incorporate these insights into AI-generated responses. This integration enhances the overall customer experience and delivers value-added interactions.
Conclusion:In the dynamic landscape of marketing in the tech industry, prompt engineering has emerged as a game-changer. By understanding and leveraging the capabilities of AI language models through well-crafted prompts, marketers can unlock a wealth of opportunities for personalized customer interactions, content generation, market research, customer support, and seamless integrations. Embracing prompt engineering empowers marketers to stay ahead of the curve, deliver exceptional customer experiences, and drive business growth. So, marketers, it's time to unleash the power of prompt engineering and revolutionize your marketing strategies in the tech industry!
Connect with me if you're interested in learning more about how prompt engineering can transform your marketing efforts in the tech industry.
Treat AI advancements as trends in the tech world, making sure you stay up-to-date with the latest breakthroughs.
Step 5: Practice Prompt Design
Start creating prompts for different use cases. Design prompts with clear instructions and desired outcomes.
Craft prompts like a game quest, providing clear objectives and guidance for the model to generate appropriate responses.
Experiment with context settings and data grounding, treating them as puzzle pieces that help the model understand the conversation and provide accurate responses.
Utilize real-world datasets to develop and evaluate prompts. For instance, use customer feedback data to create prompts that address specific business needs and generate relevant insights.
Iterate on prompt design to improve the model's responses over time, similar to fine-tuning a musical instrument.
Start creating prompts for different use cases. Design prompts with clear instructions and desired outcomes.
Craft prompts like a game quest, providing clear objectives and guidance for the model to generate appropriate responses.
Experiment with context settings and data grounding, treating them as puzzle pieces that help the model understand the conversation and provide accurate responses.
Utilize real-world datasets to develop and evaluate prompts. For instance, use customer feedback data to create prompts that address specific business needs and generate relevant insights.
Iterate on prompt design to improve the model's responses over time, similar to fine-tuning a musical instrument.
Step 6: Collaborate and Learn from Others
Engage with the prompt engineering community by joining forums, webinars, and discussions related to prompt engineering.
Connect with professionals in the field to exchange ideas and experiences, building relationships that foster knowledge sharing and growth.
Engage with the prompt engineering community by joining forums, webinars, and discussions related to prompt engineering.
Connect with professionals in the field to exchange ideas and experiences, building relationships that foster knowledge sharing and growth.
Step 7: Embrace Continuous Learning
Stay updated with the evolving field of prompt engineering. Embrace the mindset of a lifelong learner, staying curious, and adapting to new techniques.
Approach prompt engineering with a creative mindset, constantly seeking innovative ways to improve your skills and generate exceptional model outputs.
Stay updated with the evolving field of prompt engineering. Embrace the mindset of a lifelong learner, staying curious, and adapting to new techniques.
Approach prompt engineering with a creative mindset, constantly seeking innovative ways to improve your skills and generate exceptional model outputs.
By following this step-by-step guide and using the provided analogies, you'll be well on your way to understanding prompt engineering and how prompts and meta-prompts guide model behavior. Happy learning!
Think of constraints as boundaries or rules you set for the model. Just like a game with specific rules and limitations, constraints guide the model's responses within defined parameters.
Conditioning prompts with constraints ensures that the model adheres to certain guidelines. For example, if you want the model to provide family-friendly recommendations, you can explicitly mention this constraint in the prompt.
Iterative Prompt Design:Prompt design is an iterative process, similar to sculpting a piece of art. You start with a rough draft and refine it over time.Experiment with different prompt designs, test their effectiveness, and make adjustments based on the model's responses. It's like chiseling away at a sculpture until you achieve the desired shape and form.
Prompt design is an iterative process, similar to sculpting a piece of art. You start with a rough draft and refine it over time.
Experiment with different prompt designs, test their effectiveness, and make adjustments based on the model's responses. It's like chiseling away at a sculpture until you achieve the desired shape and form.
Context Setting:
Think of prompts as the opening scene of a movie. They set the context and provide necessary information to the model, just like the initial frames establish the storyline for the audience.
Use context-setting techniques to frame the conversation and guide the model's understanding of the desired context. It's like giving the model a background story to ensure it responds appropriately.
Think of prompts as the opening scene of a movie. They set the context and provide necessary information to the model, just like the initial frames establish the storyline for the audience.
Use context-setting techniques to frame the conversation and guide the model's understanding of the desired context. It's like giving the model a background story to ensure it responds appropriately.
Data Grounding:
Data grounding is like providing real-world references to the model. Imagine you're teaching someone about different dog breeds. Instead of describing each breed in abstract terms, show them pictures and examples, making it easier for them to grasp the concept.
Similarly, when using data grounding in prompt engineering, include specific examples or data points to help the model understand and generate accurate responses related to a particular domain or topic.
Data grounding is like providing real-world references to the model. Imagine you're teaching someone about different dog breeds. Instead of describing each breed in abstract terms, show them pictures and examples, making it easier for them to grasp the concept.
Similarly, when using data grounding in prompt engineering, include specific examples or data points to help the model understand and generate accurate responses related to a particular domain or topic.
Instruction Tuning:
Instruction tuning involves fine-tuning the prompts to guide the model's behavior with specific instructions. It's akin to giving precise directions to someone who's following a recipe.
Craft clear and explicit instructions in prompts to ensure the model generates the desired output. For example, instead of asking for general information about a book, you can instruct the model to summarize the book's plot in three sentences.
Instruction tuning involves fine-tuning the prompts to guide the model's behavior with specific instructions. It's akin to giving precise directions to someone who's following a recipe.
Craft clear and explicit instructions in prompts to ensure the model generates the desired output. For example, instead of asking for general information about a book, you can instruct the model to summarize the book's plot in three sentences.
Constraints and Conditioning:
Think of constraints as boundaries or rules you set for the model. Just like a game with specific rules and limitations, constraints guide the model's responses within defined parameters.
Conditioning prompts with constraints ensures that the model adheres to certain guidelines. For example, if you want the model to provide family-friendly recommendations, you can explicitly mention this constraint in the prompt.
Think of constraints as boundaries or rules you set for the model. Just like a game with specific rules and limitations, constraints guide the model's responses within defined parameters.
Conditioning prompts with constraints ensures that the model adheres to certain guidelines. For example, if you want the model to provide family-friendly recommendations, you can explicitly mention this constraint in the prompt.
Iterative Prompt Design:
Prompt design is an iterative process, similar to sculpting a piece of art. You start with a rough draft and refine it over time.
Experiment with different prompt designs, test their effectiveness, and make adjustments based on the model's responses. It's like chiseling away at a sculpture until you achieve the desired shape and form.
Prompt design is an iterative process, similar to sculpting a piece of art. You start with a rough draft and refine it over time.
Experiment with different prompt designs, test their effectiveness, and make adjustments based on the model's responses. It's like chiseling away at a sculpture until you achieve the desired shape and form.
By exploring these prompt engineering techniques in detail and relating them to the provided analogies, you'll gain a solid understanding of how prompts shape the behavior of language models. Remember to practice and experiment with different techniques to enhance your prompt engineering skills. Keep up the great work!
[Context]As an AI assistant, you've established your role and purpose right at the beginning. This helps the model understand its function and guides its responses.
Data Grounding:
[Data Grounding]Imagine you're helping a customer who loves beach destinations. They mention their preference for warm weather and water activities.
[Data Grounding]You provide specific examples of popular beach destinations like , , and to anchor the model's understanding of beach destinations.
[Data Grounding]Imagine you're helping a customer who loves beach destinations. They mention their preference for warm weather and water activities.
[Data Grounding]You provide specific examples of popular beach destinations like , , and to anchor the model's understanding of beach destinations.
Instruction Tuning:
[Instruction Tuning]Instruct the model to recommend two beach destinations with excellent snorkeling spots and luxurious resorts.
[Instruction Tuning]Specify that the recommendations should cater to families with children.
[Instruction Tuning]Instruct the model to recommend two beach destinations with excellent snorkeling spots and luxurious resorts.
[Instruction Tuning]Specify that the recommendations should cater to families with children.
Constraints and Conditioning:
[Constraints]Set the constraint that the recommended destinations should have a moderate budget range to align with the customer's preferences.
[Conditioning]Condition the model to prioritize safety and mention any potential travel advisories or precautions.
[Constraints]Set the constraint that the recommended destinations should have a moderate budget range to align with the customer's preferences.
[Conditioning]Condition the model to prioritize safety and mention any potential travel advisories or precautions.
Iterative Prompt Design:
[Iterative Prompt Design]Experiment with variations of the prompt to achieve the best results. Iterate on the instructions, constraints, and conditioning based on the model's responses and user feedback.
[Iterative Prompt Design]Experiment with variations of the prompt to achieve the best results. Iterate on the instructions, constraints, and conditioning based on the model's responses and user feedback.
By combining these prompt engineering techniques in a coherent and well-structured manner, the prompt guides the model to provide personalized and relevant recommendations for customers seeking beach destinations. Each technique plays a crucial role in shaping the model's behavior and ensuring the desired outcomes. Keep refining and iterating on your prompts to enhance the AI assistant's performance! ️