Skip to content

Reducing ambiguity in Key Vault tool selection#608

Merged
vcolin7 merged 11 commits intomicrosoft:mainfrom
vcolin7:description-tuning/keyvault
Sep 30, 2025
Merged

Reducing ambiguity in Key Vault tool selection#608
vcolin7 merged 11 commits intomicrosoft:mainfrom
vcolin7:description-tuning/keyvault

Conversation

@vcolin7
Copy link
Copy Markdown
Contributor

@vcolin7 vcolin7 commented Sep 29, 2025

What does this PR do?

Updates the descriptions for Key Vault tools to provide more details and help disambiguate during early tool selection.

These changes caused a better separation between the top choice and the second choice in most cases where both were close enough to be considered ambiguous. Even though most scores saw a slight drop, the top (and correct) choices remained unchanged.

A detailed analysis can be found in this gist.

GitHub issue number?

#252

Pre-merge Checklist

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Updated servers/Azure.Mcp.Server/CHANGELOG.md and/or servers/Fabric.Mcp.Server/CHANGELOG.md for product changes (features, bug fixes, UI/UX, updated dependencies)
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
    • Updated command list in /docs/azmcp-commands.md and/or /docs/fabric-commands.md
    • For new or modified tool descriptions, ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
    • For new tools associated with Azure services or publicly available tools/APIs/products, add URL to documentation in the PR description
  • Extra steps for Azure MCP Server tool changes:
    • Updated test prompts in /docs/e2eTestPrompts.md
    • 👉 For Community (non-Microsoft team member) PRs:
      • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
      • Manual tests run: added comment /azp run mcp - pullrequest - live to run Live Test Pipeline

@vcolin7 vcolin7 added this to the 2025-09 milestone Sep 29, 2025
@vcolin7 vcolin7 self-assigned this Sep 29, 2025
Copilot AI review requested due to automatic review settings September 29, 2025 04:55
@vcolin7 vcolin7 requested review from a team and JonathanCrd as code owners September 29, 2025 04:55
@vcolin7 vcolin7 added the tools-ToolSelection Issues related to the Tools Description Evaluator and incorrect tool selection by LLMs label Sep 29, 2025
@vcolin7 vcolin7 requested a review from a team as a code owner September 29, 2025 04:55
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 Key Vault tool descriptions to reduce ambiguity during tool selection by providing more detailed and specific descriptions. The changes help improve distinction between similar operations (like "get" vs "list") by clearly stating their specific purposes, required parameters, return values, and what they should not be used for.

  • Replaced verbose multi-line descriptions with concise single-line descriptions containing operational details
  • Added explicit parameter requirements and return value information to tool descriptions
  • Included negative descriptions (e.g., "Not for listing multiple secrets") to prevent incorrect tool selection

Reviewed Changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
SecretListCommand.cs Updated description to emphasize listing/enumeration purpose and exclude single secret retrieval
SecretGetCommand.cs Enhanced description with required parameters, return values, and exclusion of listing functionality
SecretCreateCommand.cs Simplified description with required parameters and version handling clarification
KeyListCommand.cs Updated to clarify listing purpose and exclude single key fetching
KeyGetCommand.cs Enhanced with parameter requirements, return values, and exclusion of listing
KeyCreateCommand.cs Detailed description with supported key types, parameters, and return values
CertificateListCommand.cs Updated to emphasize enumeration and exclude single certificate fetching
CertificateImportCommand.cs Condensed multi-line description to single line with all essential details
CertificateGetCommand.cs Enhanced with parameters, return values, and operational exclusions
CertificateCreateCommand.cs Simplified with parameter requirements and return value details
tools.json Updated tool definitions to reflect new descriptions
prompts.json Added additional test prompts for Key Vault operations
e2eTestPrompts.md Added comprehensive test prompts for Key Vault tool validation

@alzimmermsft
Copy link
Copy Markdown
Contributor

alzimmermsft commented Sep 29, 2025

I'm a bit confused here, doesn't the GIST show that most scores decreased with the description changes in this PR?

@vcolin7
Copy link
Copy Markdown
Contributor Author

vcolin7 commented Sep 29, 2025

I'm a bit confused here, doesn't the GIST show that most scores decreased with the description changes in this PR?

@alzimmermsft The main takeaway from the gist is that the changes increased separation (reduced ambiguity) between the first and second choices for most Key Vault tools, even if scores decreased overall. The top choice remained the same in all cases.

@github-project-automation github-project-automation Bot moved this from Untriaged to In Progress in Azure MCP Server Sep 29, 2025
@vcolin7 vcolin7 merged commit 35ac23a into microsoft:main Sep 30, 2025
25 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Azure MCP Server Sep 30, 2025
colbytimm pushed a commit to colbytimm/microsoft-mcp that referenced this pull request Dec 8, 2025
* Updated prompts and tools JSON files

* Ran TDE

* Updated KeyCreateCommand description

* Updated KeyGetCommand description

* Updated KeyListCommand description

* Updated Key Vault command descriptions

* Updated test prompts

* Re-ran the evaluation tool

* Updated CHANGELOG
@vcolin7 vcolin7 deleted the description-tuning/keyvault branch January 9, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tools-KeyVault tools-ToolSelection Issues related to the Tools Description Evaluator and incorrect tool selection by LLMs

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants