Using Pre-Trained Models in Copilot Studio
Microsoft Copilot Studio (formerly Power Virtual Agents) allows you to leverage pre-trained AI models such as GPT-4, Azure Cognitive Services, and AI Builder to enhance chatbot responses. You can integrate these models without needing to train them from scratch.
Methods to Use Pre-Trained Models in Copilot Studio
- Using GPT-4 via Azure OpenAI API
- Leveraging Azure Cognitive Services (Language, Vision, Speech)
- Utilizing AI Builder for No-Code AI Solutions
Method 1: Integrating GPT-4 via Azure OpenAI API
Pre-trained GPT-4 and GPT-3.5 models can be integrated with Copilot Studio via API calls.
Step 1: Set Up Azure OpenAI
- Sign in to Azure Portal.
- Search for Azure OpenAI and create a new instance.
- Deploy GPT-4 or GPT-3.5-Turbo.
- Copy the API Key and Endpoint URL from the Keys & Endpoint section.
Step 2: Connect GPT-4 to Copilot Studio
- Open Copilot Studio → Topics → Add a Node.
- Select Call an API.
- Configure the request:
- Method: POST
- URL: Paste your Azure OpenAI Endpoint (e.g.,
https://your-instance.openai.azure.com/v1/completions
) - Headers:
{ "Content-Type": "application/json", "Authorization": "Bearer YOUR_API_KEY" }
- Body:
{ "model": "gpt-4", "messages": [{"role": "user", "content": "{User Input}"}], "max_tokens": 150 }
- Save and test the integration.
Method 2: Using Azure Cognitive Services (Pre-Trained AI)
Microsoft provides pre-trained AI services that can be connected to Copilot Studio:
- Language Service (Text Analysis, Sentiment Detection)
- Speech Service (Speech-to-Text, Text-to-Speech)
- Vision Service (Image Recognition, OCR)
Example: Sentiment Analysis with Language Service
- Go to Azure Portal → Create Azure Cognitive Services.
- Get the API Key and Endpoint URL.
- In Copilot Studio, add a new API call:
- POST request to
https://your-region.cognitiveservices.azure.com/text/analytics/v3.0/sentiment
- Headers:
{ "Ocp-Apim-Subscription-Key": "YOUR_API_KEY", "Content-Type": "application/json" }
- Body:
{ "documents": [{"id": "1", "language": "en", "text": "{User Input}"}] }
- POST request to
- Parse and display the sentiment response in the chatbot.
Method 3: AI Builder for No-Code AI Integration
For non-developers, AI Builder in Power Platform provides pre-trained AI models:
- Document Processing (Extract data from invoices, receipts)
- Business Card Reader
- Category Classification
Example: Extracting Invoice Data
- Open Copilot Studio → Add Action → Select AI Builder.
- Choose Extract Information from Documents.
- Upload an invoice and test the AI model.
Final Thoughts
Using pre-trained models in Copilot Studio allows you to integrate AI without complex training. Choose GPT-4 for conversational AI, Azure Cognitive Services for NLP, Vision, and Speech, or AI Builder for no-code AI solutions.
Would you like a hands-on example or a demo integration?