AI and LLMs · Middle · Question 46 of 75

Why count tokens before sending a request?

Show the answer

Correct answer: To stay within context limits and predict cost

Explanation

Libraries or the provider's token counting endpoint let apps trim history or documents before hitting limits.

Further reading

Problem with a question

AI and LLMs · Middle · question 46

Test yourself

Take the AI and LLMs · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz