Building and customizing solutions using Microsoft 365 Copilot APIs and tools
Hi Kshitij,
I can see from your screenshots that the agent is displaying your formatted list correctly, but then it's also generating its own additional response about "Purchase Orders for Sales Order 425." This is a common issue in Copilot Studio when using generative AI responses.
Why This Happens
Root cause:
- Create generative answers node is still active after your custom response
- AI continues processing even after you've displayed the data
- Multiple response sources (your formatting + AI generation) are both triggered
Solutions
1. Disable Generative AI for This Topic
In your topic configuration:
- Go to Settings → AI capabilities
- Turn off "Create generative answers" for this specific topic
- Save and test
2. End Topic After Your Response
Add "End current topic" node:
- After your message with the formatted list
- Add "End current topic" action
- This prevents further AI processing
Your flow should look like:
Get Data → Format Data → Display Message → End Current Topic
3. Use System Topic Override
Create a specific topic:
- Topic name: "Production Orders Query"
- Trigger phrases: Include your OData query terms
- Turn off generative AI for this topic only
- Handle the response completely in your custom logic
4. Modify Agent Instructions
In your agent's system instructions, add: IMPORTANT: When displaying formatted lists or structured data, do not provide additional summaries or interpretations. Only show the requested data format and stop. If a custom formatted response is provided, do not generate additional responses about the same data.
5. Use Conditional Logic
Add a condition after your formatted response: Condition: Topic.DataDisplayed = true If True: End current topic If False: Continue with generative answers
Set the variable before displaying: Set Variable: DataDisplayed = true Display your formatted list End topic
6. Response Mode Configuration
In Copilot Studio settings:
- Generative AI → Response mode
- Set to "Restrictive" instead of "Generative"
- This reduces unsolicited AI responses
Recommended Implementation
Here's the complete flow: 1. Detect OData query intent 2. Call OData service 3. Format data into your list structure 4. Set variable: ResponseComplete = true 5. Display formatted message 6. End current topic (prevents AI continuation)
Quick Fix
Add this immediately after your formatted list message:
- "Set a variable value" action:
- Variable: ResponseSent
- Value: true
This will prevent the agent from generating additional responses after your custom formatting. Alternative: Suppress AI in System Instructions Add to your agent's instructions: When structured data (lists, tables, formatted output) is displayed: - Do not provide summaries - Do not reformat the data - Do not add explanatory text - Stop processing after the formatted display
The key is using "End current topic" right after your formatted response to prevent the generative AI from continuing to process and respond.
Try the "End current topic" approach first - it's the most reliable solution for this issue.
Thanks,
Karan Shewale.
*************************************************************************
If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via [Microsoft Teams Developer Feedback] link. Click here to escalate.