Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Implement version control for prompts by using Git repositories

A worked example

Single answer

A team develops a Microsoft Foundry agent. All prompt changes must be made in the team's GitHub repository, and the team's .env file is excluded from version control. After each deployment, the team commits the deployment script. The team wants a quick way to identify which repository state corresponds to each deployed agent version when debugging or rolling back.

What should the team do after committing each deployment?

Choose one answer
Why

Each deployed agent version should correspond to a Git tag on the commit that produced it, such as v1, v2 and v3. Tags let the team quickly find the repository state behind any deployed agent, which simplifies debugging and rollback. Ignoring prompt files, storing data in an uncommitted .env file, or editing in the portal would not create that traceable link.

  • Not correct: Record the agent version in the .env file. The .env file is not committed, so a value stored there is not linked to any repository state.
  • Correct: Create a Git tag on the deployment commit. A Git tag marks the deployment milestone, so each deployed agent version maps to a named repository state. This supports debugging and rollback.
  • Not correct: Add the prompts folder to the .gitignore file. An ignore rule does not mark a deployment milestone. Prompt iterations should remain versioned so the team can compare changes and restore previous versions.
  • Not correct: Edit the instructions in the Foundry portal. The guidance is to keep prompts in GitHub with full change history instead of editing them directly in Foundry. Portal edits also create no marker in the repository.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free