Library › AI Evals › Software developers

Write the golden answer for a dev-helper bot's git question

Practice: Giving the right context. About 5 minutes.

About this exercise

You're adding test cases for your team's internal dev-helper bot, and this git question needs a golden answer. Team rule: the bot never suggests force-pushing to shared branches. Write exactly 3 numbered lines: '1. Command: ...', '2. What it does: ...' in one plain sentence, and '3. Check: ...' giving the command to confirm the changes are still there. Plain text, under 45 words.

Common mistakes when you ask AI for this

  • Listing every option. The AI shows all three reset modes, including the one that deletes work. Try: Say: "Give the one command that keeps changes. No --hard."
  • No way to check. The AI stops at the command, so a nervous junior dev can't confirm nothing was lost. Try: Add: "Line 3: Check: the command that shows the changes are still there."
  • Suggesting a force push. The AI often says 'then git push --force', which your team bans. Try: Say: "Never suggest force-pushing."
  • A long tutorial. The AI explains git internals and reflog, which is hard to grade against. Try: Show the shape: "1. Command: 2. What it does: 3. Check:"

What a strong prompt includes

  • Bans force-pushing
  • Shows the three-line shape
  • Asks for a way to confirm
  • Keeps it short
  • Asks for plain text

Practice this now ↑

Related exercises