Skip to content

Clarify FAOS optimization guidance and improve evaluator contracts leveraging azd#2383

Merged
XOEEst merged 27 commits into
microsoft:mainfrom
XOEEst:main
May 27, 2026
Merged

Clarify FAOS optimization guidance and improve evaluator contracts leveraging azd#2383
XOEEst merged 27 commits into
microsoft:mainfrom
XOEEst:main

Conversation

@XOEEst
Copy link
Copy Markdown
Collaborator

@XOEEst XOEEst commented May 23, 2026

This pull request updates the documentation for the Microsoft Foundry skill, primarily to add and clarify support for making Python agents optimization-ready with the new Agent Optimizer workflow. It introduces a new sub-skill, renames and updates references to the optimization process, and significantly expands the agent setup and configuration instructions to better integrate with Azure Developer CLI (azd) environments. Additionally, it adds detailed documentation for scaffolding Python agents for optimization, including code patterns and configuration best practices.

The most important changes are:

Agent Optimizer Sub-skill and Workflow Updates

  • Added a new sub-skill, agent-optimizer, replacing the previous faos-optimize sub-skill, to guide users in making Python agents optimization-ready for the Agent Optimizer in Foundry. This includes updating all relevant references and workflow tables to use the new sub-skill and terminology. [1] [2] [3]

Expanded and Clarified Agent Setup Instructions

  • Overhauled the agent workspace and metadata resolution instructions to prioritize azd project context, clarify overlay/cache layering, and detail how to resolve deployment context, environment, and configuration from both azd and .foundry metadata. The setup flow is now more robust and explicit about source-of-truth and user prompts. [1] [2]

Python Agent Optimizer Patterns Documentation

  • Added a comprehensive new document, python-patterns.md, detailing how to scaffold Python agents for optimization: installing the required SDK, structuring the .agent_configs/baseline/ folder, wiring runtime code, and following best practices for configuration and environment variables.

Skill Description and Usage Clarifications

  • Updated the main skill description to include new optimization-related intents and clarify when to use the Agent Optimizer versus other deployment or evaluation workflows.

These changes provide clearer guidance for preparing agents for optimization, improve integration with Azure Dev tooling, and add actionable Python patterns for developers.


References:

Checklist

  • Tests pass locally (cd tests && npm test)
  • If modifying skill descriptions: verified routing correctness with integration tests (npm run test:skills:integration -- <skill>)
  • If modifying skill USE FOR / DO NOT USE FOR / PREFER OVER clauses: confirmed no routing regressions for competing skills

Related Issues

XOEEst and others added 20 commits May 5, 2026 22:38
Address PR microsoft#2174 review comments by expanding FAOS as Foundry Agent Optimization Service on first use and making the Step 8 Python config snippet copy-paste safe.

The minimum contract example now imports os and preserves the app's existing model-selection fallback instead of hard-coding MODEL_DEPLOYMENT_NAME unless that is already what the app uses.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
# Conflicts:
#	plugin/skills/microsoft-foundry/SKILL.md
When creating custom evaluator prompts, treat the runtime-enforced JSON schema as authoritative: result plus reason. Preserve user-provided rubric text, but remove or normalize conflicting output schemas such as score/reasoning or duplicate OUTPUT FORMAT blocks before calling evaluator_catalog_create.

Add observe skill test coverage for the promptText guardrail so future edits keep the result/reason contract visible.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the 0-to-1 scoringType/minScore/maxScore details from the sample custom evaluator prompt. The important guardrail is the output contract: preserve the rubric, but avoid conflicting output schemas because the runtime enforces result/reason.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restore plugin/skills/microsoft-foundry/SKILL.md from upstream/main so this PR no longer carries a line-ending-only change for the top-level skill file.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@XOEEst XOEEst marked this pull request as ready for review May 25, 2026 06:51
Copilot AI review requested due to automatic review settings May 25, 2026 06:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the microsoft-foundry skill documentation to reflect the newer “Agent Optimizer” scaffolding workflow (replacing the previous FAOS optimize sub-skill), and expands the project context resolution guidance to better integrate with azd environments while treating .foundry/agent-metadata*.yaml as overlay/cache in azd projects.

Changes:

  • Replace faos-optimize with a new agent-optimizer sub-skill, including new scaffold + Python patterns reference docs.
  • Overhaul “context resolution” and metadata layering guidance to prefer azd env get-values for deployment context, and update observe/trace/eval docs accordingly (including eval.yaml as local intent).
  • Update trigger snapshot baselines to match the updated skill description keywords.

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
plugin/skills/microsoft-foundry/SKILL.md Updates skill description keywords and replaces faos-optimize with agent-optimizer; expands .foundry/azd context-resolution guidance.
plugin/skills/microsoft-foundry/references/agent-metadata-contract.md Reframes metadata as overlay/cache in azd projects and updates the effective-context layering + schema guidance.
plugin/skills/microsoft-foundry/foundry-agent/trace/trace.md Updates trace workflow to prefer azd-derived App Insights context and treat metadata as overlay/cache.
plugin/skills/microsoft-foundry/foundry-agent/trace/references/search-traces.md Aligns prerequisites with the new “effective context”/overlay wording.
plugin/skills/microsoft-foundry/foundry-agent/observe/observe.md Updates observe workflow to use azd-first context resolution, include eval.yaml intent, and add .foundry/suites/.
plugin/skills/microsoft-foundry/foundry-agent/observe/references/evaluation-suite-generation.md Adds eval.yaml as an explicit suite source option and documents verification/registration steps.
plugin/skills/microsoft-foundry/foundry-agent/observe/references/deploy-and-setup.md Updates auto-setup to use azd-first context and optionally leverage verified eval.yaml before generating suites.
plugin/skills/microsoft-foundry/foundry-agent/eval-datasets/eval-datasets.md Updates dataset workflows to rely on azd or metadata overlay for context; mentions eval.yaml in state detection.
plugin/skills/microsoft-foundry/foundry-agent/eval-datasets/references/eval-trending.md Updates prerequisites to allow azd-derived project endpoint/environment resolution.
plugin/skills/microsoft-foundry/foundry-agent/deploy/deploy.md Adjusts DoD/gates and post-deploy suite setup to treat azd as source-of-truth and incorporate eval.yaml setup option.
plugin/skills/microsoft-foundry/foundry-agent/agent-optimizer/agent-optimizer.md Introduces the new Agent Optimizer scaffold sub-skill entrypoint and lifecycle/guardrails.
plugin/skills/microsoft-foundry/foundry-agent/agent-optimizer/references/scaffold.md Adds a step-by-step scaffold workflow for optimization readiness (baseline files + SDK wiring).
plugin/skills/microsoft-foundry/foundry-agent/agent-optimizer/references/python-patterns.md Adds Python scaffolding patterns (baseline folder, tools.json format, wiring patterns, env vars).
plugin/skills/microsoft-foundry/foundry-agent/faos-optimize/faos-optimize.md Removes the legacy FAOS optimize sub-skill doc.
plugin/skills/microsoft-foundry/foundry-agent/faos-optimize/references/python-patterns.md Removes the legacy FAOS Python patterns doc.
tests/microsoft-foundry/snapshots/triggers.test.ts.snap Updates trigger snapshots to reflect revised skill description keywords.
tests/microsoft-foundry/resource/create/snapshots/triggers.test.ts.snap Updates trigger snapshots to reflect revised skill description keywords.
tests/microsoft-foundry/models/deploy/deploy-model/snapshots/triggers.test.ts.snap Updates trigger snapshots to reflect revised skill description keywords.
tests/microsoft-foundry/models/deploy/deploy-model-optimal-region/snapshots/triggers.test.ts.snap Updates trigger snapshots to reflect revised skill description keywords.
tests/microsoft-foundry/models/deploy/customize-deployment/snapshots/triggers.test.ts.snap Updates trigger snapshots to reflect revised skill description keywords.
tests/microsoft-foundry/models/deploy/capacity/snapshots/triggers.test.ts.snap Updates trigger snapshots to reflect revised skill description keywords.
tests/microsoft-foundry/foundry-agent/troubleshoot/snapshots/triggers.test.ts.snap Updates trigger snapshots to reflect revised skill description keywords.
tests/microsoft-foundry/foundry-agent/trace/snapshots/triggers.test.ts.snap Updates trigger snapshots to reflect revised skill description keywords.
tests/microsoft-foundry/foundry-agent/observe/snapshots/triggers.test.ts.snap Updates trigger snapshots to reflect revised skill description keywords.
tests/microsoft-foundry/foundry-agent/invoke/snapshots/triggers.test.ts.snap Updates trigger snapshots to reflect revised skill description keywords.
tests/microsoft-foundry/foundry-agent/eval-datasets/snapshots/triggers.test.ts.snap Updates trigger snapshots to reflect revised skill description keywords.
tests/microsoft-foundry/foundry-agent/deploy/snapshots/triggers.test.ts.snap Updates trigger snapshots to reflect revised skill description keywords.
tests/microsoft-foundry/foundry-agent/create/snapshots/triggers.test.ts.snap Updates trigger snapshots to reflect revised skill description keywords.
tests/microsoft-foundry/finetuning/snapshots/triggers.test.ts.snap Updates trigger snapshots to reflect revised skill description keywords.

Comment thread plugin/skills/microsoft-foundry/foundry-agent/observe/observe.md
Comment thread plugin/skills/microsoft-foundry/references/agent-metadata-contract.md Outdated
@XOEEst XOEEst marked this pull request as draft May 25, 2026 07:38
@XOEEst XOEEst marked this pull request as ready for review May 25, 2026 07:44
jugonzales
jugonzales previously approved these changes May 26, 2026
XOEEst and others added 3 commits May 26, 2026 19:55
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@XOEEst XOEEst merged commit 3f6c92a into microsoft:main May 27, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants