Skip to content

Commit 4774daa

Browse files
authored
Add context length exceeded error mitigations (#4032)
docs component of elastic/search-team#11643
1 parent 0b2d653 commit 4774daa

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

solutions/search/agent-builder/limitations-known-issues.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,16 @@ Error: Invalid function call syntax
4040
Error executing agent: No tool calls found in the response.
4141
```
4242

43-
$$$conversation-length-exceeded$$$
43+
### Context length exceeded error [conversation-length-exceeded]
44+
45+
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.
46+
47+
To mitigate this issue, consider the following strategies:
48+
49+
- **Optimize queries**: Narrow your questions to reduce the scope of data retrieval
50+
- **Start a new conversation**: Begin a fresh conversation, optionally providing a summary of the previous context
51+
- **Refine tool descriptions**: Update tool descriptions and agent instructions to guide the agent toward requesting only essential data
52+
- **Limit tool response size**: Create custom tools that filter or paginate data to return smaller, focused datasets
4453

4554
### {{esql}} limitations
4655

0 commit comments

Comments
 (0)