Example prompts for optimizing your application with GitHub Copilot for Azure Preview

If you're unfamiliar with Azure or you just want the tooling and AI to do most of the work, you can ask GitHub Copilot for Azure Preview to help you optimize the performance of your Azure resources.

Best practices

Using copilots can increase developer productivity by answering questions, executing tasks, and generating code. However, remember these vital rules:

  • Review all AI-generated responses. Validate their correctness, applicability, potential outcomes (such as costs and security) before taking action based on those responses.
  • Never save application secrets or credentials in source code.
  • Never submit application secrets or credentials in questions or in code when you ask questions.

When you're working with any tool that's based on large language models, use good prompt engineering techniques for the best results. The following tips come from the article Write effective prompts for Microsoft Copilot in Azure, which provides advice for prompt engineering in the context of Azure.

Example prompts to optimize your app

If you want to use GitHub Copilot for Azure Preview for help with optimizing your application, you can start with an open-ended question or request. Then, add details like specific services and technologies for better results. Try the following example prompts.

Service Optimize prompt examples
Azure App Service
  • "@azure Are any app code optimizations available?"
  • "@azure Show me how to optimize CPU usage for Azure App Service."
  • "@azure How do I optimize code for Azure App Service?"
  • "@azure What are the best practices for security in Azure?"
Azure SQL
  • "@azure How can I optimize my Azure SQL database for better performance?"