nerdexam
Microsoft

GH-300 · Question #33

Which of the following describes role prompting?

The correct answer is A. Describing in your prompt what your role is to get a better suggestion. Role prompting involves stating your role or persona in the prompt so GitHub Copilot can tailor its suggestions to your specific context and expertise level. For example, specifying 'As a senior backend engineer...' helps Copilot generate more contextually appropriate code…

Prompt Crafting and Prompt Engineering

Question

Which of the following describes role prompting?

Options

  • ADescribing in your prompt what your role is to get a better suggestion
  • BTell GitHub Copilot in what tone of voice it should respond
  • CPrompt GitHub Copilot to explain what was the role of a suggestion
  • DGiving GitHub Copilot multiple examples of the form of the data you want to use

How the community answered

(48 responses)
  • A
    94% (45)
  • C
    4% (2)
  • D
    2% (1)

Explanation

Role prompting involves stating your role or persona in the prompt so GitHub Copilot can tailor its suggestions to your specific context and expertise level. For example, specifying 'As a senior backend engineer...' helps Copilot generate more contextually appropriate code. Option B describes tone prompting. Option C describes asking Copilot to explain a suggestion's purpose. Option D describes few-shot prompting with data examples.

Topics

#Role prompting#Prompt engineering#Prompt crafting#GitHub Copilot

Community Discussion

No community discussion yet for this question.

Full GH-300 Practice