Building and customizing solutions using Microsoft 365 Copilot APIs and tools
The error message you are encountering, AsyncResponsePayloadTooLarge, indicates that the output returned from the custom search node exceeds the size limit that the agent can handle. To address this issue, you can try the following steps:
- Limit the Search Scope: When configuring the custom search tool, ensure that you are using the Search only selected sources toggle to limit the search to only the most relevant knowledge sources. This can help reduce the size of the output.
- Add Knowledge Sources: If applicable, consider adding specific knowledge sources that are more targeted to your query. This can help in narrowing down the results.
- Use Content Moderation: Configure the content moderation level to filter out unnecessary or irrelevant information that might be inflating the output size.
- Review Output Variables: Ensure that you are selecting a variable to store only the necessary search results, rather than all available outputs.
If these options do not resolve the issue, you may need to consider restructuring your knowledge sources or the way you are querying them to ensure that the output remains within the acceptable size limits.