API basics · Question 11 of 12
After about 40 messages, a support chat becomes slow and expensive and finally fails with a context-length error. Which measures make sense?
3 answers are correct. Hard Created with AI
Show answer
Answer
- A Summarize older parts of the history and send only the summary
- C Shorten or remove large tool results from earlier rounds
- E Cache unchanging parts such as the system prompt to reduce costs
Explanation
Every round resends the whole history; cost and length grow with it. Summarizing and trimming keep the context small, caching lowers the cost of the fixed part. A higher output limit, by contrast, takes up additional room in the context window.