-
Notifications
You must be signed in to change notification settings - Fork 310
Include Azure examples in the instructions for LLM to learn from #1267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 addresses an issue where LLMs incorrectly include the azure_functions_worker package in requirements.txt for Python v2 programming model projects, which are incompatible. The solution adds a guideline directing the LLM to learn from Azure example repositories.
Key Changes:
- Added a single instruction line to reference Azure-Samples GitHub organization for coding best practices
.../Azure.Mcp.Tools.AzureBestPractices/src/Resources/azure-functions-codegen-best-practices.txt
Show resolved
Hide resolved
.../Azure.Mcp.Tools.AzureBestPractices/src/Resources/azure-functions-codegen-best-practices.txt
Show resolved
Hide resolved
| @@ -1,4 +1,5 @@ | |||
| Azure Functions code generation best practices: | |||
| - Learn the coding best practices from Azure examples listed at https://github.com/Azure-Samples | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting from https://github.com/Azure-Samples returns an html page that is not agent friendly. Have you considered using GitHub API to fetch the code samples? Instead of just giving the agent a root to navigate, the API call can scope down further.
For example,
https://api.github.com/search/repositories?q=org:Azure-Samples%20language:Python
This will give json response for repos in Azure-Samles organization that has Python files.
Here is the documentation of this API
https://docs.github.com/en/rest/search/search?apiVersion=2022-11-28#search-repositories
What does this PR do?
The problem was that LLM likes to include azure_functions_worker in requirements.txt for python v2 programming model. They are incompatible. The solution is to provide Azure examples with the recommended coding patterns for LLM to learn.
Here are the requirements.txt files being generated after this change


GitHub issue number?
#1252
Pre-merge Checklist
servers/Azure.Mcp.Server/CHANGELOG.mdand/orservers/Fabric.Mcp.Server/CHANGELOG.mdfor product changes (features, bug fixes, UI/UX, updated dependencies)servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentationeng/scripts/Process-PackageReadMe.ps1. See Package README/servers/Azure.Mcp.Server/docs/azmcp-commands.mdand/or/docs/fabric-commands.md.\eng\scripts\Update-AzCommandsMetadata.ps1to update tool metadata in azmcp-commands.md (required for CI)ToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test promptsconsolidated-tools.json/servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline