- [Instructor] Generative Artificial Intelligence,
or gen AI, refers to systems that create content like text,
images, music, and most important to this course, code.
A core component of any AI system is the model.
A model is created by processing
a ridiculous amount of input, looking for patterns.
Co-pilot supports many models
and it's fair to expect Copilot to stay current with models.
The models available in Copilot come from Anthropic,
Google, and OpenAI.
There's tons of information here.
At the time of this recording, Copilot uses GPT-4o.
I call this out
because there's something interesting at play here.
Note that the knowledge cutoff
is already a year and a half old.
This model was trained
with what was available in September of '23.
Tons of open source libraries on GitHub.
Now, libraries, languages and frameworks
have moved on since then, but somehow Copilot keeps up
and the reason it somehow stays up to date is the context.
This is a great blog entry from GitHub
that goes into great detail about context,
and I really want to show this workflow down here.
Note that the left 2/3 of the Life of a Completion workflow
is all local, things like what file you have open,
what's open in neighboring tabs, where your cursor is,
what else you've asked about.
All of that is sent to the model.
So, dissimilar from a simple ChatGPT prompt,
Copilot is passing a lot more than what you just asked about
or the line of code you're working on.
Think of Copilot like an experienced coding partner.
It might not have read the latest docs,
but it picks up on patterns and helps you write better code.
And the better you understand how it works,
the better you can make it work for you.