web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Inconsistency between ...
Copilot Studio
Suggested Answer

Inconsistency between Copilot Flow and Power Automate responses.

(0) ShareShare
ReportReport
Posted on by
I am creating a Copilot flow where a JSON references multiple tables, and the flow's purpose is to return the most appropriate table based on the user's question. While testing the flow, I noticed that a specific question causes an issue, but none of my tests have helped me identify the root cause.
The prompt that is failing receives a JSON that has already been filtered. This prompt checks all tables and converts the initial and final dates contained in each table name into the YYYYMM format. The output consists only of the table IDs along with their initial and final dates, which are then used by a Power Fx script to identify the table that best covers the date range requested in the question.
The input causing the issue is:
 
{
  "finishReason": "stop",
  "structuredOutput": {
    "JsonTables": [
      {
        "id": "3065",
        "name": "name_table (from May/2000)"
      }
    ]
  },
  "text": "{\r\n \"JsonTables\": [\r\n {\r\n \"id\": \"3065\",\r\n \"name\": \"name_table (from may/2000)\"\r\n }\r\n ]\r\n}"
}
 
And the current date is also provided in YYYYMM format.
 
Since the table has a start date but no explicit end date, the prompt correctly identifies the current date as the final date. However, the initial date is returned as empty:
[
  {
    "finalDate": "202606",
    "InitialDate": "",
    "id": "3065"
  }
]
 
When I test the exact same prompt with the exact same inputs directly in Power Automate, the result is:
{
  "int_variable": [
    {
      "id": "3065",
      "InitialDate": "200005",
      "finalDate": "202606"
    }
  ]
}
 
I also tested other scenarios with multiple tables in the JSON, using the same date pattern ("starting from month/year"), and the flow returns the correct output. However, for the specific case of ID "3065", the start date is not extracted correctly.
Does anyone have any suggestions about what might be causing this behavior, or any additional tests I could run to help identify the reason for this inconsistency?
I have the same question (0)
  • Suggested answer
    Assisted by AI
    sannavajjala87 Profile Picture
    515 Super User 2026 Season 1 on at

    This looks less like a Power Fx issue and more like a prompt/LLM consistency issue caused by relying on the model to parse a date from free text.

    A few things I would check:

    1. Normalize the input before the prompt

    The value is coming as:

    name_table (from may/2000)

    I would test whether casing or language/culture is affecting extraction. For example, try normalizing the table name before sending it to the prompt:

    name_table (from May/2000)

    or even better, convert the month text to a numeric value before the AI step if possible.

    1. Avoid using AI for deterministic date parsing

    Since this is a structured pattern, I would avoid asking the prompt to extract May/2000 and convert it to 200005. That logic is deterministic and better handled in Power Automate or Power Fx using string functions, regex-like parsing, or a mapping table for month names.

    For example, if the table name always contains a pattern like:

    from May/2000

    then the flow can extract:

    • Month = May

    • Year = 2000

    • Convert Month to 05

    • Build 200005

    This will be more reliable than depending on the prompt.

    1. Check whether the issue is tied to the record, not the pattern

    Since other tables with the same pattern work, I would compare the exact string for ID 3065 against a working table name. Look for hidden characters, extra spaces, non-breaking spaces, encoding issues, or a lowercase month value. Sometimes the visible text looks identical, but the underlying string is slightly different.

    1. Add a fallback rule in the prompt

    You can also make the prompt stricter:

    “If the table name contains from <month>/<year>, always return InitialDate as YYYYMM. If there is no end date, use the provided current date as finalDate. Never return InitialDate as blank when a valid month/year is present.”

    1. Log the exact input passed into the failing prompt

    Since the same prompt works directly in Power Automate but fails in the Copilot flow context, I would capture the exact runtime input immediately before the AI prompt step. The issue may be that Copilot is passing a slightly different string or object than the one tested manually.

    My recommendation would be: use the prompt only to identify the relevant table if needed, but move date extraction/conversion into deterministic flow logic. Date parsing is one of those areas where traditional logic will be more reliable than an AI prompt, especially when the output is later used by Power Fx to make a decision.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 277

#2
11manish Profile Picture

11manish 206

#3
sannavajjala87 Profile Picture

sannavajjala87 156 Super User 2026 Season 1

Last 30 days Overall leaderboard