Tune agent behavior from evaluation results
Unlock the complete study guide.
Bundled into the existing Developing in Agentic AI Systems premium course — no separate purchase.
14-day money-back guarantee — no questions asked.
Included in this chapter:
- Reading an evaluation finding as a tuning decision
- Instruction files: persisting a correction across tasks
- Tuning a custom agent profile
- Which tools a custom agent actually gets
- Keeping MCP tool errors visible to the agent
- Copilot CLI tool permissions
- Hooks: stopping a risky tool call before it runs
- Hooks: holding completion until the work is done
- Requiring accountable review of tuning changes
- Preinstalling the cloud agent's environment
- Correcting context in a Copilot CLI session
- Copilot Memory: curating what persists
- Making a broad request verifiable
- Batching pull request feedback for Copilot
- Revalidating a tuning change
- Reasoning through exam scenarios
Matching an evaluation finding to the tuning surface
| Evaluation finding | Tune this surface | Tempting but wrong |
|---|---|---|
| Cloud agent changes keep failing CI on build or test conventions | Repository-wide instructions in .github/copilot-instructions.md | Restating the conventions in every task prompt |
| Specialized rules matter only for one kind of file | A path-specific .instructions.md file with an applyTo glob | Adding those rules to the repository-wide instructions |
| The agent loses time rediscovering and installing dependencies | Preinstalled tools in copilot-setup-steps.yml | More instructions telling the agent how to install them |
| A custom agent needs one lookup tool from an MCP server | server-name/tool-name in the profile's tools list | server-name/* plus a prompt sentence forbidding the other tools |
| A profile is told to run tests but never runs a command | The execute alias in the tools list | More validation prose in the Markdown prompt |
| One dangerous CLI command must never run automatically | A --deny-tool rule, which takes precedence over allows | A narrower allow rule added beside --allow-all |
| The agent declares completion before validation has passed | An agentStop hook returning decision: block with a reason | Trying to continue the work from sessionEnd |
| A personal convention appears in one user's suggestions | Deleting that user's Copilot Memory preference | Adding a repository-wide instruction that contradicts it |
Decision tree
Cheat sheet
Unlock with Premium — includes all practice exams and the complete study guide.