Microsoft

GH-300 — GitHub Copilot practice exam

Using GitHub Copilot well and safely: responsible AI, Copilot in the IDE and the Copilot CLI, agent mode, code review, custom instructions and MCP, organisation policies, how Copilot handles data, prompt engineering, testing and refactoring with Copilot, and content exclusions and the public code filter. Written to the skills measured from 7 August 2026. The real exam needs 700/1000 to pass. Our mock uses 50 questions in 60 minutes.

Questions
50
Time limit
60 min
Pass target
70%

Exam topics

  • 1.0 Use GitHub Copilot responsibly18%
  • 2.0 Use GitHub Copilot features27%
  • 3.0 Understand GitHub Copilot data and architecture13%
  • 4.0 Apply prompt engineering and context crafting14%
  • 5.0 Improve developer productivity with GitHub Copilot14%
  • 6.0 Configure privacy, content exclusions, and safeguards14%

Free GH-300 sample questions

Try these 5 questions from the practice bank, then show the answer to see the explanation.

  1. 1. Copilot suggests a function that calls a library method that doesn't exist. Which limitation of generative AI does this show?

    • A.Latency: suggestions arriving slower than expected
    • B.Tokenisation: words being split into smaller parts
    • C.Hallucination: plausible-looking output that is wrong
    • D.Rate limiting: too many requests in a short time
    Show answer

    Correct answer: C. Hallucination: plausible-looking output that is wrong

    Generative AI predicts likely-looking output, so it can hallucinate: inventing APIs, parameters, package names or facts that look right but aren't.

    Other risks include outdated knowledge, insecure patterns copied from training data, bias, and code that works but doesn't fit your project. That's why you always review and test Copilot's output.

  2. 2. In VS Code, Copilot shows a grey suggestion as you type. How do you accept it?

    • A.Press Delete
    • B.Press Esc
    • C.Press Tab
    • D.Press F5
    Show answer

    Correct answer: C. Press Tab

    Inline suggestions appear as grey "ghost text" while you type:

    • Tab accepts the suggestion
    • Esc dismisses it
    • Ctrl+→ (Cmd+→ on Mac) accepts the next word
    • Alt+] and Alt+[ cycle through alternative suggestions

    Next edit suggestions go further, predicting the next change you'll want to make elsewhere in the file.

  3. 3. When Copilot generates an inline suggestion in the IDE, which information does it typically use to build the prompt?

    • A.Only the file name, with none of the code that the developer has written
    • B.The developer's personal emails and calendar, to understand their deadlines
    • C.Every repository on GitHub, downloaded in full for each single suggestion
    • D.Code around the cursor, open files and other relevant context from the project
    Show answer

    Correct answer: D. Code around the cursor, open files and other relevant context from the project

    To build a prompt, the Copilot extension gathers context: code before and after the cursor, the current file, other open tabs and related files, the language, and (for chat) your question, chat history and any files or symbols you reference.

    It then trims this to fit the model's context window. Better context means better suggestions, which is why opening relevant files helps.

  4. 4. Which Copilot Chat prompt is MOST likely to give a useful result?

    • A.Write a TypeScript function that validates UK postcodes, returns true or false, and include 5 unit tests
    • B.Make some code for postcodes please, whatever you think is best for our project and our users
    • C.Postcodes
    • D.Do the thing we discussed in the meeting yesterday about the address stuff and the forms
    Show answer

    Correct answer: A. Write a TypeScript function that validates UK postcodes, returns true or false, and include 5 unit tests

    Effective prompts are specific:

    • Goal: validate UK postcodes
    • Language and form: a TypeScript function
    • Expected output: returns true or false
    • Extras: five unit tests

    Copilot doesn't know about your meeting. Give it the context it needs, break big tasks into steps, and include examples when the format matters.

  5. 5. A team inherits a large, poorly documented legacy module. How can Copilot help MOST safely?

    • A.Rewrite the whole module in one go with agent mode and deploy it without any tests
    • B.Explain the code, add documentation and suggest refactoring in small, tested steps
    • C.Copy the module into a public Gist so Copilot can learn from it
    • D.Delete the module, because AI can't work with old code at all
    Show answer

    Correct answer: B. Explain the code, add documentation and suggest refactoring in small, tested steps

    Copilot can speed up legacy modernisation:

    • /explain to understand what the code does
    • Generate documentation and comments
    • Write characterisation tests to capture current behaviour before changing anything
    • Refactor in small steps, such as extracting functions or updating to modern syntax, running tests after each
    • Translate to a newer language or framework, carefully

    Small, tested changes keep the risk low.

Want the other 47 questions? Try GH-300 free for 7 days

Full-length timed mock exams in exam or practice mode, with a hint tab, an explanation for every answer and progress tracking. No credit card needed.