Flashcardsfor IT Certifications

D4: Crafting Effective Prompts

GH-300 GitHub Copilot exam practice questions · 10 flashcards

Question
Prompt structure?
1 / 10

Tip: Space flips the card, ← / → navigate.

Last updated: · Report an error on this page

Show all 10 Crafting Effective Prompts practice questions and answers
  1. Prompt structure?
    Goal/task, context, constraints/requirements, examples, desired output format.
  2. 4 S's of prompting (GitHub)?
    Single (one task), Specific, Short, Surround (provide context).
  3. How Copilot determines context?
    Open files, cursor location, selection, chat references, instructions, workspace index.
  4. Zero-shot prompting?
    Ask without examples.
  5. Few-shot prompting?
    Provide examples of desired input/output to guide the pattern.
  6. One-shot prompting?
    Single example.
  7. Best practices?
    Be specific, break down complex tasks, provide examples, iterate, use meaningful names and comments.
  8. Role prompting?
    Ask Copilot to act as e.g. a security reviewer.
  9. Specifying output format?
    e.g. 'Return a TypeScript interface and Jest tests'.
  10. Scenario: Copilot generates wrong date format. Fix?
    Add explicit constraint/example of expected format (few-shot).