Skip to content

feature: Move quota workflow to a script#2360

Open
tmeschter wants to merge 1 commit into
microsoft:mainfrom
tmeschter:260520-QuotaChanges
Open

feature: Move quota workflow to a script#2360
tmeschter wants to merge 1 commit into
microsoft:mainfrom
tmeschter:260520-QuotaChanges

Conversation

@tmeschter
Copy link
Copy Markdown
Member

One of the workflows supported by the azure-quotas skill is to verify quota limits and current usage. This workflow has definite, limited inputs and is very regular, with the LM instructed to execute a series of four az commands one after the other. In the end, the relevant output is a series of resource names with the current usage and limit for each.

The LM can generally follow this workflow but there are some downsides with this approach. First, each az command will produce an "intermediate" output on the way to the final output. We don't really care about these intermediate outputs but they take up space in the token context window.

Second, if one of those intermediate outputs is large (greater than 20KB or so) Copilot won't provide it directly to the LM but will instead put it in a temporary file, and tell the LM to read the file. This requires additional tool invocations and opportunities for things to go wrong.

Third, despite the clarity of the instructions the LM will not always be consistent in which steps it follows, or exactly how it follows them. Related to this, sometimes it will make a mistake and may or may not recover.

To address these issues, this change is an attempt to change this one specific workflow to be implemented as a script. The LM no longer executes individual az commands; instead, it runs the script with the necessary inputs. This should be more consistent, faster, and use fewer tokens.

If this change is successful we will move more of these well-defined workflows over to scripts.

Description

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

One of the workflows supported by the azure-quotas skill is to verify quota limits and current usage. This workflow has definite, limited inputs and is very regular, with the LM instructed to execute a series of four `az` commands one after the other. In the end, the relevant output is a series of resource names with the current usage and limit for each.

The LM can generally follow this workflow but there are some downsides with this approach. First, each `az` command will produce an "intermediate" output on the way to the final output. We don't really care about these intermediate outputs but they take up space in the token context window.

Second, if one of those intermediate outputs is large (greater than 20KB or so) Copilot won't provide it directly to the LM but will instead put it in a temporary file, and tell the LM to read the file. This requires additional tool invocations and opportunities for things to go wrong.

Third, despite the clarity of the instructions the LM will not always be consistent in which steps it follows, or exactly how it follows them. Related to this, sometimes it will make a mistake and may or may not recover.

To address these issues, this change is an attempt to change this one specific workflow to be implemented as a script. The LM no longer executes individual `az` commands; instead, it runs the script with the necessary inputs. This should be more consistent, faster, and use fewer tokens.

If this change is successful we will move more of these well-defined workflows over to scripts.
@tmeschter tmeschter requested a review from rakal-dyh as a code owner May 21, 2026 21:42
Copilot AI review requested due to automatic review settings May 21, 2026 21:42
@tmeschter tmeschter requested a review from RickWinter as a code owner May 21, 2026 21:42
@tmeschter tmeschter requested review from JasonYeMSFT and removed request for Copilot May 21, 2026 21:42
@tmeschter
Copy link
Copy Markdown
Member Author

@rakal-dyh Would you be able to take a look at this change?

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.

2 participants