How to Stop Copilot agent from answering on it's own

Kshitij Saxena 0 Reputation points
2025-07-23T11:46:08.6466667+00:00

I have created an agent in Copilot studio which reads the data via Odata service. I format and then display the data in an array format. In some cases the agent displays the data in it's own format.

How can I stop the agent from displaying the data if I have already displayed it? For eg the first one is my output and the second one is the agents.

PO SO design

Duplicate answer

Regards

Kshitij

Microsoft Copilot | Microsoft 365 Copilot | Development

1 answer

Sort by: Most helpful
  1. Karan Shewale 2,585 Reputation points Microsoft External Staff
    2025-07-24T10:37:36.72+00:00

    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:

    1. Go to Settings → AI capabilities
    2. Turn off "Create generative answers" for this specific topic
    3. Save and test

    2. End Topic After Your Response

    Add "End current topic" node:

    1. After your message with the formatted list
    2. Add "End current topic" action
    3. 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:

    1. Topic name: "Production Orders Query"
    2. Trigger phrases: Include your OData query terms
    3. Turn off generative AI for this topic only
    4. 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:

    1. Generative AI → Response mode
    2. Set to "Restrictive" instead of "Generative"
    3. 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:

    1. "Set a variable value" action:
      • Variable: ResponseSent
      • Value: true
      "End current topic" action

    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.

    https://learn.microsoft.com/en-us/microsoft-copilot-studio/advanced-generative-actions?utm_source=chatgpt.com

    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.


    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.