From 50672654903b9447c73231046f81321c21018220 Mon Sep 17 00:00:00 2001 From: Liam Thompson <32779855+leemthompo@users.noreply.github.com> Date: Fri, 21 Nov 2025 15:06:07 +0100 Subject: [PATCH 1/2] Add context length exceeded error mitigations --- .../search/agent-builder/limitations-known-issues.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/solutions/search/agent-builder/limitations-known-issues.md b/solutions/search/agent-builder/limitations-known-issues.md index 3676959566..8af435cba0 100644 --- a/solutions/search/agent-builder/limitations-known-issues.md +++ b/solutions/search/agent-builder/limitations-known-issues.md @@ -40,7 +40,16 @@ Error: Invalid function call syntax Error executing agent: No tool calls found in the response. ``` -$$$conversation-length-exceeded$$$ +### Context length exceeded error [conversation-length-exceeded] + +This error occurs when a conversation exceeds the maximum context length supported by the LLM. This typically happens when tools return very large responses that consume the available token budget. + +To mitigate this issue, consider the following strategies: + +- **Optimize queries**: Narrow your questions to reduce the scope of data retrieval +- **Start a new conversation**: Begin a fresh conversation, optionally providing a summary of the previous context +- **Refine tool descriptions**: Update tool descriptions and agent instructions to guide the agent toward requesting only essential data +- **Limit tool response size**: Create custom tools that filter or paginate data to return smaller, focused datasets ### {{esql}} limitations From 309b75eabdda74c34c3fb629545b948b6187fa4d Mon Sep 17 00:00:00 2001 From: Liam Thompson <32779855+leemthompo@users.noreply.github.com> Date: Fri, 21 Nov 2025 15:09:50 +0100 Subject: [PATCH 2/2] don't use very --- solutions/search/agent-builder/limitations-known-issues.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solutions/search/agent-builder/limitations-known-issues.md b/solutions/search/agent-builder/limitations-known-issues.md index 8af435cba0..3198135817 100644 --- a/solutions/search/agent-builder/limitations-known-issues.md +++ b/solutions/search/agent-builder/limitations-known-issues.md @@ -42,7 +42,7 @@ Error executing agent: No tool calls found in the response. ### Context length exceeded error [conversation-length-exceeded] -This error occurs when a conversation exceeds the maximum context length supported by the LLM. This typically happens when tools return very large responses that consume the available token budget. +This error occurs when a conversation exceeds the maximum context length supported by the LLM. This typically happens when tools return large responses that consume the available token budget. To mitigate this issue, consider the following strategies: