Skip to content

Latest commit

 

History

History
83 lines (56 loc) · 4.17 KB

lab1.md

File metadata and controls

83 lines (56 loc) · 4.17 KB

Lab 1 - Using GitHub Copilot to learn about GitHub Copilot

Purpose: In this lab, we’ll start to learn about GitHub Copilot by asking GitHub Copilot questions about GitHub Copilot.

One way to interact with GitHub Copilot is to use the chat interface. This is a great way to ask questions about GitHub Copilot since it is a natural language interface and has been trained on a wide variety of resources.

  1. Select the Chat extension icon to open the chat window. Let's start with a basic request about GitHub Copilot. Enter the following text in the prompt box.
Give me some suggestions for effective ways to use GitHub Copilot.

Copilot Suggestions

Notice how GitHub Copilot Chat provides a suggestion for your next question. This is a great way to keep the conversation going. If you like the suggestion, just click on the link to use it. If you don't like the suggestion, just ignore it and enter your own question.

  1. Now that we have some suggestions, let's ask for some specific examples of commands or prompts that can be used with GitHub Copilot. Enter the following question in the prompt box.
What are some examples of specific commands or prompts that can be used to interact with GitHub Copilot?

Copilot Examples

  1. We've covered some of the basics, let's ask about how to get the most out of GitHub Copilot. Enter the following question in the prompt box.
I am new to GitHub Copilot. How do I get the most our of GitHub Copilot ?

Get the most from Copilot

  1. One of the keys to getting the most out of AI models is to provide the right context. Let's ask about that. Enter the following question in the prompt box.
What does GitHub Copilot use for context when using AI to generate code suggestions?

Context for Copilot

  1. Speaking of context, there are some common contextual keywords that can be used in GitHub Copilot prompts. Let's ask about those. Enter the following question in the prompt box.
What are some common contextual keywords that can be used in GitHub Copilot prompts?

Contextual Keywords

  1. What else can we do in the chat panel?

Let's see if we can use chat to learn more about Copilot's capabilities. Enter the following in the chat panel and press Enter.

/help

Output of /help

As you can see in the output there are a growing number of Participants and Variables that you can use in GitHub Copilot Chat. For example, review the output to answer these questions:

  • Which Participant would you use to get the meaning of the selected lines in the terminal?
  • Which Variable would you use to feed a specific file to GitHub Copilot Chat as context, even though that file may not be in an open editor at the moment?
  1. Another key to effectively using GitHub Copilot is to understand the basics of prompt engineering. Enter the following question in the prompt box.
Someone mentioned "Prompt Engineering". Explain to me the basics of prompt engineering.

Prompt Engineering

  1. GitHub is always working to ensure that you can get the most out of GitHub Copilot. Let's ask about what version of Chat GPT is being used.
What version of Chat GPT are you using?

Chat GPT version

  1. GitHub Copilot is frequently being updated. Let's ask about how we can stay up to date with the latest features and announcements.
How can I stay up to date regarding new GitHub Copilot features and announcements?

Stay up to date

Now that GitHub Copilot has explained the basics and some of the keys to using it effectively, let's try to use it to generate some code.

Next ➡️

Continue to the next Lab