Skip to content

Conversation

@fanyang-mono
Copy link
Contributor

@fanyang-mono fanyang-mono commented Dec 1, 2025

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
Screenshot 2025-12-01 at 12 12 27 PM
Screenshot 2025-12-01 at 12 09 34 PM

GitHub issue number?

#1252

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
    • Validate README.md changes using script at eng/scripts/Process-PackageReadMe.ps1. See Package README
    • Updated command list in /servers/Azure.Mcp.Server/docs/azmcp-commands.md and/or /docs/fabric-commands.md
    • Run .\eng\scripts\Update-AzCommandsMetadata.ps1 to update tool metadata in azmcp-commands.md (required for CI)
    • 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 tools with new names, including new tools or renamed tools, update consolidated-tools.json
    • 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 /servers/Azure.Mcp.Server/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

@fanyang-mono fanyang-mono requested a review from a team as a code owner December 1, 2025 17:21
Copy link
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 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

@fanyang-mono
Copy link
Contributor Author

cc/ @MadhuraBharadwaj-MSFT

@fanyang-mono fanyang-mono self-assigned this Dec 1, 2025
@@ -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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

2 participants