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.

Certifications & exams

Which exam comes next?

You can already practise for 60 exams, and 7 are up for a vote. See all certifications with their official information, cast your vote or suggest your exam.

See all certifications