Here’s how you can configure your Copilot Studio bot to retrieve and attach images from a knowledge source.
Step-by-Step Guide
1. Enable Knowledge Sources
Go to Copilot Studio and open your bot.
Navigate to the Knowledge page.
Click Add knowledge source and select the type:
Documents (PDFs, Word files in Dataverse)
SharePoint (retrieves organizational data)
OneDrive (business storage)
Dataverse (structured business data)
Upload your documents containing images.
2. Configure Generative Answers
In Copilot Studio, go to Settings.
Enable Generative AI and Conversational Boosting.
Ensure Knowledge sources are linked to the bot.
This allows the bot to retrieve relevant information dynamically.
3. Allow Image Extraction
Ensure your documents contain high-quality images.
Images should be in JPG, PNG, WebP, or GIF format.
The bot can reference images stored in Dataverse or SharePoint.
4. Display Images in Responses
Use Adaptive Cards to format responses with images.
In the bot’s response node, add:
json
{
"type": "AdaptiveCard",
"body": [
{
"type": "Image",
"url": "{image_url}",
"size": "Medium"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.2"
}
Replace {image_url} with the actual image path from the knowledge source.
5. Test Your Bot
Use the Test chat feature in Copilot Studio.
Upload a document with images and ask the bot to retrieve content.
Verify that images appear correctly in responses.