Transcripts
1. Introduction: So now it brings us
to what is possibly the most exciting
topic surrounding artificial intelligence at
this time, generative AI. Now, generative AI is artificial intelligence
that is capable of actually creating new content or generating content using models
trained on existing data. So with generative AI, we can generate text,
images, audio, video, and I'm sure if there
is more content, more content types on the way, generative AI will be able
to adapt to it, as well. Now, it's generally powered by machine learning
models such as transformers and guns or generative adversarial
networks and others. And I'm not going to
get too much into that into the dynamics of what those are
and how they work. But generally speaking, we just discuss what
machine learning is. It's a machine that has
been trained on data, and it can make
certain decisions based on the historical
data that it has seen. So now, generative AI
takes it a step further, where it can now
actually generate content based on that
kind of historical data. So it has seen stuff that looks like this and you're
asking for something new. I can pick parts of the
historical data that it knows to then generate
a new response for you. So examples of generative
AI engines include hat GPT, and I think that's probably
the most popular one. That's the one that
kind of came on the scene and showed us what Gene AI is
really capable of. We also have Doll E for images. We have music MLM,
sorry, for audio. And I've actually used that one. Actually used the
generative AI engine the other day to
generate a song for me. So I spent hours working on
this song on my keyboard, and then I was like, Hmm, let me see what the generative
AI would come up with. And I was blown away at
the amount of detail, the level of detail and awesomeness that came
out of that engine. So generative AI
is very powerful. I think it's here to stay, and we definitely once again need to appreciate how we can leverage this technology
for our solutions. No, of course, we've
all watched movies, and we've seen what
the robots and AI engines in theory
are capable of. And I think that is in the back of our minds
when we think about generative Air and how scarily accurate
things seem to be. But let us discuss what
generative AI is not before we write it off as
something that's dangerous. So generative AI is
not fully autonomous. It relies on data that
it has been trained on and different models that
we human beings have built. It cannot think and it
cannot reason by itself. And it's only as accurate as
the body of knowledge is. So it's really only as
accurate as our body of knowledge that we have
given to the engine is. It is also free from bias. So AI models can actually inherit biases from the
data they are trained on. So let us say, for instance, we talk about training the
machine learning, right? If I train if I wanted a
system that could detect dogs and cats or let's say dogs different
from human beings. And then I gave it a bunch of
pictures of dogs and cats, and I told this engine that
all of these are dogs. And then I gave it a
bunch of pictures of human beings and said,
these are human beings. That means that anytime
this system sees a four legged creature that
looks like a dog or cat, it's going to think it's
a dog because once again, that's the bias that I
introduced in the training. So to bring that full
circle to gen AI, it's only going to be able
to generate new content or response based on what it knows or think it knows,
things it knows, right? So you know, bear that
in mind that, you know, the body of knowledge that
it has been trained on really influences the content or the response you get from it. It's basically not
always accurate, right? So accuracy, once again, is relative to the data
it has been trained on. And I think the scenario I just shared also addresses
the accuracy issue, and it is not a replacement
for human beings. I don't think it is a
replacement for human beings. You know, the whole craze of AI a whole part of it was that, you know, it's going
to be replacing people in certain
jobs and so on. And I agree, every time there is an advancement in
some technology, there is going to be a need for a human to be maybe upskilled or move or shift in a
different direction because now this new technology
can do that job. And this has always happened. Since the Industrial Revolution, this has been happening, right? We had printing press. That would have
replaced people who used to sit down and
write out the news. Now, we don't need that because we have printing press, right? Um, horses and carriages used to carry people
in the way of cars. So technology will
always displace the current need for certain services and
certain human operations, but it is not a
replacement because you can always upscale
change direction. And I like to think
of it as my intern. I don't use it as my body of
knowledge wholeheartedly. I still have to review what
generative AI tells me and, of course, correct
it as necessary. So don't worry, it's not
here to replace you, but it is there for us to use
to maximize our potential.
2. Generative AI Ethics: Alright, so, of course, we
all know the great phrase. With great power comes
great responsibility. So there are some
ethical implications when we are using AI because AI, especially the way it has
blossomed in more recent times, has the potential to
unlock all kinds of opportunities good and bad for businesses and individuals. So we want to make sure that we use it in a way that does
not promote discrimination, and we should always
be as fair as possible whenever we're
using AI technologies, make it accessible
to all persons in different age
groups, cultures, and, you know,
everybody don't have any no gatekeeping, pretty much. We should also make sure that we're not going to
use it in a way that violates,
sorry, human rights. We should not bring any harm or subordination to any other
human being or community, whether it's
physical, economical, social, political, et cetera. Throughout the life
cycle of AI systems, the quality of the life of the human beings
should be enhanced, it should not diminish, right? We also want to make
sure that we do not um, impact the environment
in any negative way. So the AI systems life cycle should not increase carbon footprints as
much as possible. And, of course, we should
try to just reduce the overall
environmental impact of anything that we do with
this data and these systems. We should also make sure that we're accountable
for everything. So when you are
using the system, or when we're
implementing a system, we need to determine who is responsible for the actions and decisions and the decisions
made by the AI systems. It's also good to give
a disclaimer that, hey, this information
did not come from me. It was generated
by an AI system, so at least persons
will be informed of the potential inaccuracies in what you are about to present. And finally, right to data,
privacy and protection. So, of course, we
are talking about AI systems being
trained on data. What we don't want
is to give it to more sensitive and
personal information such as the AI
system is going to be sharing details about anybody else that
should not be, right? So we always want to
make sure we protect human dignity,
autonomy and agency. And throughout the life
cycle of the system, any data that is to be
collected should be consistent with the
international law and in line with
values and principles. So some best practices, we always want to be aware of biases in accuracies
and ethical concerns. We always want to validate
AI generated output, especially in critical
applications, ensure that there's compliance
with privacy laws as generative models often
use large datasets, and we cannot always vet where
the data is coming from. So always make sure you're in compliance and make it clear when the content is AI generated to avoid confusion
and misinformation. Avoid using generative AI for malicious purposes
like deep fakes or misleading information and, you know, mocking
persons voices, letting them say things
or making it sound like the person saying
something that they never said. You want to avoid those
kinds of situations, B as ethical as possible and use this technology properly. Once again, with great power
comes great responsibility.
3. Generative AI Overview: Alright, so we've kind of
discussed this before, but let's go a little more
in depth in exploring what exactly is generative
AI or gene A or short. So we know that artificial
intelligence is designed to as best as possible
imitate human behavior, and we try to program
machines with some algorithms that would mimic our decision making and
even some of our senses like hearing or speech
or vision, right? So, generally speaking, that's what AI is.
It's supposed to take some information and be able
to execute tasks without our explicit intervention and even learn from these
tasks over time. So generative AI
describes a category of those capabilities
where we can create new content using the same intelligence or the
artificial intelligence. So a typical example
of interacting with a generative AI solution is usually through like
a chat application, and an example of a
chat application is at Microsoft copilot or GPT. And generative AI applications accept natural language input. So basically plain
text, English. So we are developers, but you might also you might
not be an out and developer. You might be like a
business analyst or, you know, a non
technical person. The fact is generative
AI is designed to take natural language the way we speak naturally
with our natural a way of communicating, not talking computer
language here. And then it can process that and return an
appropriate response. And these appropriate responses
are usually responses that are generated on the fly
based on what you've asked. And these responses can come in the form of
natural language. So it's responding to you
in a chat like fashion. You asked the question, so
it's giving you a response. It can be an image, and it can even be code
because you could say, Hey, help me with this or generate code that
does something for me. So it's a very
powerful breakthrough in artificial intelligence, and it is definitely
here to stay, and it is good to appreciate the power that is in our hands. So when we come back, we're
going to look at some of the language models that usually power these
generative AI.
4. Copilots and how they work: Now let's explore
what co pilots are. So a co pilot is a generative AI assistant
integrated into applications, and it's usually done through
a chat like interface. It provides contextualized
support for common tasks in whatever
application it's in. So the most accessible co pilot would be Microsoft copilot, which is integrated
or integratable into a wide range of
Microsoft applications and general user experiences. If you have a Windows machine and you're running Windows 11, especially if you're
running P, you actually have a co
pilot built in. And you'll see
that co pilots are really there to boost
productivity, creativity, and generally provide AI
generated content and can help with different tasks and different content
requirements. On top of all of
that, as a developer, you can extend the co
pilot by creating plugins, and these can integrate
into business processes, and you can even
create your own type of co pilot, which, of course, you would kind of be starting
from a foundation or model, but you can train it
with data or train it to be able to perform
a specific task. So think about it. You can go and look
at existing co pilots and see which one is missing based on your estimation and try to develop your own copilot. Now, let's discuss
a bit more about Microsoft co pilot features, which are found in
several applications, and there are different use
cases for Microsoft copilot. For instance, there's
copilot.miicrosoft.com, which can answer questions, create content, and
search the web. So you can go to that URL. We'll be doing that in a few and you'll also find that there's a co pilot for Edge browser, which if you have edge, which if you have a
Windows computer, you already have edge, you will see that
there's actually a dedicated pin for
copilot right there that allows you to basically do the same thing as if you
were going to the website. And then you have
copiloto Microsoft 365, which integrates copilot into your productivity
applications, and Office 365 usually comes
with your word processor, your PowerPoint,
Excel, et cetera. So having a copilot
there helps you to generate the documents more quickly than if you were sitting down and doing that task by your there are co pilots available for other
business line applications. So there's co pilot for security based applications for Microsoft Azure for Power BI, GitHub, which I'm sure you've
heard of Github copilot, and there are many
other applications.
5. Exploring a Copilot: Alright, so let's get into
a quick demo where we look at how Microsoft
Co Pilot works. So I'm here at
copilot.miicrosoft.com, and you can opt to sign in, and you would sign in using
your Microsoft live account. And if you don't
already have one, you can go ahead and create one, not pressuring you or anything, but let us go ahead
and get started. So here, they'll say,
What can I call you? I'll just put in my name, then they'll say, What kind
of voice tone would you like? As you can hear you. And
I'll just skip past that. So here, you'll see
that, you know, it's giving me some insights, and this is because
I'm signed in. So it's kind of going
by what it knows about me or I would
suggest based on who I am. Here we can add documents. We can also review
previous conversations, and we can use the microphone to talk to the co pilot to
give it a prompt. So let us say that
I wanted to say, write me a story about Jamaica and why it is a
great place to visit. Alright? Let's see what
our co pilot says. Alright, so you give
me a nice story about why Jamaica is
a beautiful place, and then notice that
it's kind of ending. What's your favorite
kind of adventure? I like to go hiking. Let's see what it does. So then it goes on to continue
the conversation. So this is what we said
about context, right? So it knows the context
of the conversation because it knows what I asked initially what
the context is. It's about Jamaica.
Then it says, What's your favorite adventure. I like to go hiking, so now it follows up with
letting me know that I can go hiking in different
parts of Jamaica. So yes, I am ready. And then they're just
encouraging me here. Let's go. Alright? So this is pretty cool. This is copilot, and once again, you can come here and you
can ask you questions. You can have a conversation.
And I'm sure it's a bit more insightful if you are asking
more pointed questions. And we're going to
talk about prompts and what we call prompt
engineering after this. So let us jump over to OneDrive. So I have OneDrive, and that allows me to open
up Microsoft Word online. You can also open
up Microsoft Word. If you have your
lives ONDriV account, you can open up
Microsoft Word and you can use the documents that
I have shared with you. So I asked Chat GPT
in another window to generate this same thing
about Jamaica, right? It goes into a bit more detail. I see here that it kind of
comes with these little tokens that in certain
editors would mean, like, bold, and I think
this is Mart Down. Yes, this is Mardwn.
So that would mean he four in HM, that's on. But I'm not going to fixate
on those little things. That's not really
why we're here. What I want to show
you is that in Edge, there is a co pilot. So we just looked at co
pilot here in the browser. But in the edge browser sorry, we looked at the website here. Now, I'm in the browser, and I'm going to show
you that there's a co pilot pane right here in
the top right hand corner. So if I click that, you see
that chat pane is appearing. Now, see what's possible
with copilot in Edge. Alright, let me generate
a paid summary. So copilot is actually looking
at what I am looking at, looking at the document here, and then it's going to
generate that summary for me. I can now ask more questions tell more about the
blue mountains. And it generated a nice
little fact list about Blue Mountains and note that it's not just generating stuff, yes, it is probably saying parts based on its own
generative powers, but then you also see that
it's citing a source. So it's letting me
know that this part is from that source
on that website. Accessibility that's coming from that source on that website. So not only is it
generating content, but it's also going across the Internet and
finding sources, that complement
what it is saying. And then afterwards, I can like or this, generally speaking, I want to give feedback
so that the system learns whether or not it was accurate or if it needs
to adjust accordingly. You can also download response or read it aloud if necessary. Alright, so I'm going to
run one more experiment. You don't have to
run this experiment, but I'm going to try
it because we're all developers here more than
likely we're all developers. So I'm going to
see if my co pilot can actually look
at this block of code and suggest
some changes, right? So, look at this now. It's already in the
context of you know, looking at that document
and generating a summary. So every question that I ask is kind of
within that context. I don't want that, so I'm going
to click for a new topic, and then I'm going
to say suggest ways to optimize this code. Let's see if that would work. Alright? So it did generate
some stuff, but contextually, it is not really
what I was hoping for and it's not really
helpful within the context. So this is some code from my test driven development
with Aspeed on a core course, where we built a testable
API and application. So I just went here. It's on GTubtsFreeF access. I just went here and I said, so just we optimize the code. Now, it's seeing or it either sees blazer web assembly or thinks that it sees
blazer web assembly, or it just knows this prompt and it's just answering based on the last time we
got the prompt that, hey, somebody wanted to know how to speed up
Blaser web assembly. So that's not quite
what I wanted, but it is what it gave me. So I'm just showing you the
different scenarios how the copilot may be useful and may not necessarily be
the best for the situation.
6. Generative AI Prompting : Now let's prompting. And I'm saying
copilot prompting, but the general principles
can be applied in generative AI chat where they receive a prompt and
should give a response. So responses usually depend on the language model being used and the type of
prompt that you provide. So the language model, remember, represents a body of knowledge. Is it trained on a
large amount of data, so it knows a little
about everything or is it trained on a smaller dataset, but it becomes very specific in its knowledge about
whatever that situation is. So that does determine the body of knowledge
that it draws from. But on top of that,
the way that you ask the question does
determine how it responds. So the prompts are
usually the ways that we tell the application
what we want to do. So just now, when I typed, Hey, give me the summary, well, I use one of the preset prompts, but that was a prompt. Give me a summary of the
document that is a prompt. So when you are generating or
putting in prompts rather, you want to start
with a specific goal for what you want copilot to do, provide a source to ground the response in a specific
scope of information at context to maximize the
response appropriateness and relevance and set clear
expectations for the response. And then you can
iterate based on the previous prompts and
responses to refine that result. So that's where that
chat component comes in. So you want to be very clear and succinct while giving
enough context. So let us so an example of a prompt that would give us a good response
would be this one, summarize the key
reasons for traveling to Jamaica for an
onshore traveler. Format the document as no more than six bullet points with a professional
travel agent tone. So right there we're kind
of following the rules. I'm telling it what
I want to be done. I'm telling it what
the context is, you know, who the target
audience should be, how the document or the
response should be formatted, as well as the tone, the overall tone that
I would expect it to be brought across in, right? So when we do send a prompt, usually the co pilot will
augment the prompt with a system message that
sets conditions and constraints for the
language model behavior. So those would determine the style of the
model's responses. We also have a
conversation history. So when the prompt goes, the history kind of goes
with it to say, here's what was being
discussed before, so take that into consideration
when you are responding. And then, of course,
the current prompt, which might be reworded with, you know, additional
data or scope. But you don't have to
worry about those things. Those things are happening
in the background.
7. Understanding GitHub Copilot: Now we're moving on to the
co pilots that I'm sure every developer is really interested in or
most interested in, which is Github copilot. This is the world's first
scalable AI developer tool that can help you write
code faster with less work. You can think of it as
an AI peer programmer. It draws context from
the comments and code that it sees
within your IDE and the project at hand and can suggest individual lines
or even whole functions, which will, you know, speed up what it is you're
trying to accomplish. It does help you to code
faster and to focus on bigger problems so
you'll feel more fulfilled at the
end of the workday. And it's powered by
the Open AI codex, which is trained
on a dataset with a larger concentration
on public source code. So that means all of
these suggestions and everything that
it's sending you is really coming from public
publicly shared code and other projects that may or may not be
similar to yours. But we all know, once you build one project, you can build several
because a lot of the fundamentals are the
same across many projects, and it does draw from all
of these fundamentals to suggest to you what you
can do in your program. So Github co pilot started the wave for AIPerPgrammer
applications. So there are several others. You'll hear other
names like Cursor, and there are
several other tools, but the fact is that
everybody's going to prefer a tool for
their own context. But Github Github Copilotor is the foundational
application that got this whole new wave started. No, it is the thing
that Github copilot is just another copilot to
help you write documents. I mean, blocks of code
are stored in documents, but it is actually more than just another
editor assistant. It does have features
that make it a great assistant through the
entire development cycle. For instance, it does
feature a co pilot chat, which is a chat interface
that focuses on developer scenarios and
natively integrates with Visual Studio and
Visual Studio code. There's also a co pilot
for pull requests, which can draw from your code changes and
your description for a pull request and generate tags that best suit
that pull request. And this is very useful. It
can be very tedious when you have to do pull
requests to sit on and think of
every little detail. So this can be very useful to help to speed
up that process. And there's co
pilot for Git CLI. So, I mean, the best of us, we are going to
forget some commands. We are going to write
commands incorrectly. We're going to
forget parameters. Having the copilot right there will kind of remind us
that, Hey, you need this. Hey, I suggest you put this if that's what you're
trying to accomplish. So it is more than
just something to help to finish
your lines of code. It does help with various parts
of the development cycle. So now that we've explored at a high level what
Giub copilot is, let us look at a demo.
8. GitHub Copilot Sign Up: Alright, so before we get into signing up for Github co pilot, I just want to take a step back and discuss with you for
30 seconds what Github is. I'm sure we all know
what Github is. At this point, I'm sure we know. But if you're not
sure what Github is, it is one of the largest, if not the largest Git
hosting providers, and it is free for
individual use, and it does offer corporate
and enterprise plans. However, as an
individual developer, it is free for you
to go to github.com. Go ahead and sign up
very easy process, and you can get your
account easily. So I suggest that if you don't already have
a Github account, you go to github.com and
create that account. Now, we're here for Github, C pilot, which is that
AIPAPgramming tool, which is powered
by what I guess, data that it has been
trained on based on open or public repos on GitHub. So that means even if you're signing up as a company,
you don't have to worry. The copilot is not using your private repos to
inform its training, right? So Github co pilot, you can go to github.com
slash features slash C Pilot. Or quite simply, if you're
on github.com already, you can just click product
and go to GitHub copilot. So once you're on that page, you'll want to get started. Now, it is not free, but they
do give you a 30 day trial. So you can get
started with copilot, and you'll see here that they
are the individual plans, and you will be
required to provide some payment information
to create this account. So you can go ahead
and start free trial, and you can authenticate with whichever
account you need to. And once you have
completed that step, you can choose which
plan you want. So do you want to pay $10 a month or just pay
$100 for the year? So I can appreciate that $10 a month is a bit
easier to work with. So you can get access
to get up copilot. You don't have to
pay the same time. So they will take
payment information, but you have up to 30
days to use it for free. Once that period ends, then you will be charged. So that means at least
for this course, if you don't plan to use Gitub copilot beyond this
course or immediately after, ensure that you cancel
before the 30 days are up. So keep it for our demos, and maybe for the
rest of this course, also keep it and test it out and see if it's something you
really want to invest in. But if not, make sure that you cancel before the
30 days are up. So you want to fill
out that form with your personal
information and then go ahead and provide
your payment method, whether it's by debit, credit card, or papal. And once you have
confirmed all of that, you can go ahead and
save and continue. And once everything is verified, you finish up with some
general contact information and you submit your application. So once you have done that, now you have the
different policies. So you have Github Sorry, co pilot in github.com. So you can use Copilohat
inside of Github, and this can help with pull requests and other
preview features. You have the copilot
for the CLI, you have the chat in the IDE, chat in the mobile Github app, and you have several
other things. So you can just go
ahead and save if you're okay with
those. Oh, I'm sorry. So I have to select suggestions
matching public code, and I can allow that and
then save the setup. Now the next thing would be to install the co
pilot extension. So there is support for
Visual Studio Code, Visual Studio, Jet
Brains, and Neo VM. Alright? So when we come back, we're going to
look at how we can set it up using
Visual Studio Code.
9. Using GitHub Copilot: Alright, so we're back
in Visual Studio code, and we want Github copilot. So I went over to
the extensions tab, and you'll see here
that it is recommended. It's recommended for me. Of course, if you don't see
it in the recommendations, you can always search
copilot or Github copilot. So I'm going to click
on Github Copilot and also make sure that anytime you're
installing an extension, you verify the author. So this is coming
straight from Github. And I can go ahead and install after it
has been installed, it's going to ask me to verify who I am with my Github account. And well, I'm already
signed into Github on my machine and within the context of
Visual Studio code. So that part was kind
of done automatically, but you might need to do
that by yourself, alright? So you'll see this
little I guess, that's a little
icon with goggles, a little face with goggles. That same copilot
emblem now appears in the bottom right hand corner
of your Visual Studio code. And from here, it's letting
you know that it's ready. You can do a chat. You can view logs, you
can do several things. So I want to chat with copilot. So I could actually use the little emblem
and say, copilot, Get up copilot chat, or I could just
click on this one and say chat with copilot. Now, obviously, you won't
always have this co pilot page. So you'll want to use the little context menu
as much as possible. So you can go ahead and open
up that chat and let us see, help me to create a new minimal API project using the.net eight CLI. Let's
see what that does. So it's going to let me know that it can so it gives
me a step by step. Outline of how I can do that. So it says, open the terminal
in Visual Studio code. So let's actually follow
those instructions. So I'm going to open the terminal control and apostrophe just in
case you've forgotten. I went to change
before I do anything. I went to change over
to my projects folder. Projects CDU sorry,
CD CrivePjects. There we go. Not bad. All right, so now I'm in
the context of where I can create that project. So now I can just copy. And, I mean, you're probably
saying, Okay, so far, this is much better or different from using GPT task
for instructions. The real benefit here is that it's here inside of
is your studio code. So productivity wise,
you don't have to be jumping in and out,
jumping in and out, but, I mean, that's probably minimal when you consider
that one is relatively free. One is going to
cost money, right? But let's continue exploring what the copilot can do for us. So now I have my minimal
API project created. Of course, they gave
you a template. So if you wanted
a different name, then you go ahead and
change that name. But for now, I'll just see the end to the
minimal API project, and I can say code
that, so it opens up. In Visual Studio code for me. So now, I do have this project, and I'm going to switch over to this new
Visual Studio code window. So this is the one I want
to work with now, right? Alright, so I have
my solution explorer with my minimal API project. Let's see what else
we can do here. All right, so let's get our
hands a little dirtier now. So I close the chat and you
can always reopen it here. Alright, you get a little icon. So I don't want the
chat right now. I don't even want to
see the explorer. Let's focus on the code. So I'm going to try to create an endpoint
that says Hello world. Now, you're saying, Alright, how do I engage co plot? Well, you just
start writing code. So you're going to get code suggestions from the
IDE naturally speaking. Sure. But then if I do this, you'll see that if I say map, get oh, look at that. I'm getting an auto
completed line for me. So I'm going to press Tab to use that auto completed line, and it fills in the rest for me. Now, what if I wanted to
generate a line of code. So let us say, endpoint to
return list of numbers 1-10. So this is a comment, right? So based on that comment, co pilot is looking
and saying, well, if that's what your upcoming
code is supposed to do, then maybe this is the code
you want, I can press tab, and I have an endpoint called numbers
that is just going to return an array of numbers 1-10. And it's that simple.
So just keyword wise, whenever we see those
suggestions appearing, that's called ghost text. And you can always accept
it by pressing tab. You can actually remove
it by pressing Escape. And, of course, there
are times when it will try to auto complete what it
thinks you're about to do. It's always trying to
anticipate your next move, which may not
necessarily be accurate. Now, in a situation
and let us say I want an endpoint to let's not say
return a list of numbers, but return a random number 1-10. And then I go on and then it's now making that suggestion. Of course, I can press
Tab to accept it. But if I'm not quite sure that this is
exactly what I want, I can always hold on Control and press Enter to get
the suggestions pan. So it's now loading
other suggestions, and it's saying, Alright, so here's another way I can do it. I can Well, here's one way. This is suggestion one. Here's another way
Suggestion two. So this is kind of
a very simple task. This probably won't give enough suggestions based
on what I'm asking to do. Right? So don't
judge it too hard, but if you have a more
complicated function that could be written in
several different ways. So here's even suggestion five, where it's changing up the
way that the endpoint is, and then it's
changing up a little how it goes about
finding what is random, and then it's even generating calculator like methods
and endpoints for me. Wow, that's really cool. So what if I was to accept suggestion five,
then look at that, it automatically fills in all of these other methods, right? So you see, it can speed up what you want to do because
at the end of the day, you would have had
to sit down and write out all of these in a bigger application in a more applicable
scenario, of course. There is code that you have to sit down and write manually, and copilot knows this
because it's trained on the fact that people have been trying to write this
kind of code before you. So it's saying, well, you know, this is probably
what you're trying to do, let me help you with it. Another way that we can interact with copilot and we can do that. I'll just remove this Bt code is I can do, oh look at that. Is suggesting reverse
sentences after reverse words. Alright, why not?
Let me accept it. So I can do an
inline chat as well. So if I do Control I, I get that little prompt right here to ask copilot something. So a simple endpoint, and I'm kind of running out
of simple endpoints, now. A simple endpoint that registers a user with
email and password. Let's go ahead and
see what it does, and it goes through
and it generates, and I can accept this
or I can discard it. So I'll accept, and we just generated
code using the chat. Alright, so let's
look at another way that co pile can work. So I just went ahead and generated a new method
block called login, and there's an error here. I can quickly call
on co pilot to fix this error by going to
that little light bulb, and this shows code action. So let me highlight
the erroneous code and then go to the light bulb. There we go. And then I
can rewrite using copilot. I can fix using co pilot. I can explain using copilot. So let's try fixing
it using copilot, and then it's going to
generate the suggested fix, which is not in the code once
again until I click Accept, or I can press escape or
discard to not accept it. So in a nutshell, that is
how Github copilot works. It's right there
inside of your IDE, helping you along,
making suggestions. And generally speaking, anytime you see that
little sparkle, I don't know if you'll
see that little sparkle, you might see it in the CLI, you might see it in the editor. But once you see that,
it means that this is a Github copilot
powered feature. So feel free to use it, see how best it can help you. And yes, this is Gen
AI for.net developers. This is GitubcoPallot, within the context of
a.net application. But clearly it's there for Visual Studio and
Visual Studio code, which means that it
will help you with whatever type of code you
are writing in the moment. So feel free to use it for
your JavaScript and for your SQL statements that you might have to
write in those IDEs, at least, but it is there to
assist you once you have it.
10. Building a Copilot: Alright, so we see that we
have co pilots that are pre trained for
specific scenarios. So we just saw Gitub copilot, which is trained for
coding scenarios. We've seen that we have
Microsoft copilot, which is more of a
large language model which knows a little
bit about everything. And then we have more
specialized ones for Azure and
security and so on. But once again, you as a developer might need
to develop your own. So Microsoft provides
two tools that help us to develop or extend
existing copilots. Co pilot Studio,
which is designed for low code development
scenarios where, you know, you're not
necessarily an IT person, but you are technically
proficient, and that's usually
high end well, technical business
users or developers who don't necessarily want to write too much code for a
particular scenario. You can use that to create
conversational AI experiences, and you do have Azure AI Studio, which is a pass
offering from Azure, which is a development
portal for more professional
software developers where you get total control over the language
model you want to use. So we'll be taking a look at
this later on in the course. But for now, just know that this co pilot feature
is very powerful, very extensible, and you have the power to
create your own.
11. Conclusion: Alright, so we're at the
end of another section. And in this section, we review generative AI and some
principles that surround it. We looked at different
development tools and how co pilots can be used to help us to make our
regular tasks faster. We also looked at
Github copilot, so we took a
developer look at how copilots help us to
be better developers. So thank you for joining me in this section.
I'll see you in the next one.