GH-300 practice question 10 of 10

What is zero-shot prompting?

Full set: 135 questions
Answer options
A: Giving as little context to GitHub Copilot as possible
B: Telling GitHub Copilot it needs to show only the correct answer
C: Only giving GitHub Copilot a question as a prompt and no examples Correct answer
D: Giving GitHub Copilot examples of the problem you want to solve
E: Giving GitHub Copilot examples of the algorithm and outcome you want to use
Correct Answer:
C. Only giving GitHub Copilot a question as a prompt and no examples
Explanation

Zero-shot prompting is a technique where a large language model, like GitHub Copilot, is given a task or question directly without any preceding examples to guide its response. The model is expected to understand the request and generate a relevant output based solely on its vast pre-trained knowledge. This method tests the model's ability to generalize to new, unseen tasks. For instance, simply asking "Write a Python function to calculate the factorial of a number" without showing a sample function is a zero-shot prompt.

Why Incorrect

A. This is too vague. While a zero-shot prompt has less context than a few-shot prompt, it still requires sufficient context to define the task clearly.
B. This describes an instruction for output quality or constraint, not a specific prompting methodology like zero-shot.
D. This describes few-shot prompting, where one or more examples are provided in the prompt to guide the model's output.
E. This is a more detailed form of few-shot prompting, providing specific implementation examples to constrain the model's approach. ---

References

1. Microsoft Learn

"Introduction to prompt engineering": In the section "Prompting techniques

" it defines zero-shot prompting: "With this approach

you provide a prompt to the model without any examples... the model is expected to understand and answer the question based on its existing knowledge."

Source: Microsoft Azure AI Documentation

"Introduction to prompt engineering

" Section: "Prompting techniques."

2. Brown

T. B.

et al. (2020). Language Models are Few-Shot Learners. Advances in Neural Information Processing Systems

33

1877-1901. This foundational paper defines the concept in the context of large language models.

Section 2.2

"Few-shot

one-shot

and zero-shot": "In the zero-shot setting... we give the model a natural language description of the task and a prompt... The model is not given any examples."

DOI: https://doi.org/10.48550/arXiv.2005.14165

3. GitHub Docs

"Getting started with GitHub Copilot": The documentation implicitly describes zero-shot prompting when instructing users to write clear

descriptive comments or function signatures to get code suggestions

without mentioning the need for prior examples within the same prompt.

Source: GitHub Docs

"Using GitHub Copilot

" Section: "Getting started with GitHub Copilot." The fundamental usage pattern described is zero-shot.

Scroll to Top