Share via

Bug? - character limit on generative answer nodes

Rob Maher 0 Reputation points
2026-04-29T04:27:17.88+00:00

I have topics that use generative answer nodes.

In the edit settings for these nodes there is an ability to "customize your prompt with variables and plain language" which is fantastic. The dialog box specifies a limit of 8000 characters for this customization.

However when I use these nodes I receive an error even when the customisation is much smaller.

Error Message: The length of the prompt instructions exceeds the threshold Error Code: OpenAIAdditionalInstructionsLengthExceededLimit Conversation Id: 05797175-5e07-43ea-a779-2dea300fcd39 Time (UTC): 2026-04-29T04:25:52.997Z

It appears to interact with the main agent instruction and is occurring for me when total instruction (main Agent + Topic node) is over 5300 characters

Microsoft Copilot | Microsoft 365 Copilot | Development
0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-04-29T04:27:33.1266667+00:00

    OpenAIAdditionalInstructionsLengthExceededLimit indicates that the combined prompt instructions being sent to the model are over an internal limit, not just the visible 8,000‑character field on the generative answers node.

    From the documented behavior:

    • The custom instructions field on a generative answers node is limited to 8,000 characters on its own.
    • In addition, the overall request sent to the model includes:
      • Main agent instructions (from Generative AI settings / agent description)
      • Topic‑level custom instructions (your generative answers node field)
      • Other prompt elements (such as variables or logic added via Power Fx)
    • There is also a request size limit for calls to OpenAI: if the request (user input + tools + conversation history + prior outputs) is too large, Copilot Studio returns a size‑related error such as TooMuchDataToHandle.

    In practice, this means:

    • The 8,000‑character label on the node is a per‑field limit, not a guarantee that any 8,000‑character text will succeed once combined with the rest of the agent’s instructions.
    • If the sum of main agent instructions + node custom instructions + other system text crosses the internal threshold, the platform returns an error like OpenAIAdditionalInstructionsLengthExceededLimit, even if the node’s own field is under 8,000 characters.

    Given that the error appears around a combined ~5,300 characters in the current configuration, this is consistent with an internal safety/size threshold being hit before the UI field limit.

    Mitigations and workarounds based on current limits and guidance:

    1. Shorten main agent instructions
      • Reduce the length of the global Generative AI instructions (agent description, personality, global guardrails) so more room is available for topic‑level custom instructions.
      • Move long examples or detailed guidance into knowledge sources (web pages, documents, SharePoint, etc.) instead of embedding them directly in instructions.
    2. Shorten topic‑level custom instructions
      • Apply the best practices for custom instructions:
        • Be specific and concise.
        • Use only a few, focused examples.
        • Avoid complex or redundant wording.
      • Keep the node’s custom instructions to only what must be different from the global agent behavior.
    3. Use variables and external content instead of long inline text
      • Store larger guidance or templates in documents or data sources and let generative answers retrieve and summarize them, instead of pasting the full content into the instructions.
      • Use variables and Power Fx logic to inject only the minimal context needed into the prompt.
    4. Reduce overall request size when using generative answers
      • If the conversation or tools are returning large payloads, the platform can also hit size limits (see TooMuchDataToHandle and related guidance). Scope down connector outputs and avoid passing large JSON or long text blocks into the same turn as heavy instructions.

    If, after aggressively shortening both the main agent instructions and the node‑level instructions, the error still occurs at relatively low combined lengths, this would indicate a product bug or a regression in the enforced threshold. In that case, capture:

    • Conversation Id
    • Time (UTC)
    • Exact sizes of main agent instructions and node instructions and open a support ticket so the product team can review the backend limits for OpenAIAdditionalInstructionsLengthExceededLimit.

    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    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.