Prompt Engineering
Domain 4 · 10–15% of the GH-300 exam
Write prompts Copilot can act on: a clear goal, the right context and examples, small steps, and a chat history that helps instead of confusing. Know zero-shot from few-shot and when each one wins.
Lessons in this module
- 1 Prompt Structure and Context for Copilot Write Copilot prompts with a clear goal, the right context and constraints, and learn how Copilot decides context from files, selections,
- 2 Zero-Shot and Few-Shot Prompting When a plain instruction (zero-shot) is enough, and when two or three examples (few-shot) make GitHub Copilot follow your exact format. Plus prompt tips.
- 3 Prompt Engineering Principles and Chat History The principles behind good Copilot prompts, how a chat prompt flows to the model and back, and how chat history helps follow-ups or drags answers off topic.
Hands-On Labs
Guided labs in a practice terminal with GitHub Copilot CLI, git and gh. No GitHub account, nothing to pay, and your progress stays in this browser.
4.1 Craft effective prompts
4.2 Engineer prompts for performance
No guided lab for this section yet. Try it in the Copilot terminal sandbox.