What are context tokens? How exactly they are calculated when using Assistant API for retrieval? Is there a way to estimate the amount of context token that can be used when accessing Assistant APIs for retrieval?

I’m trying to summarize and extract information from the uploaded document using the Assistant APIs with retrieval as tool. Wanted to know how exactly the “In - tokens” are being calculated. If it is only input text then it should not be very huge number of In-tokens but what is observed in usage is that there is something called context tokens which is included when calculating “In-Tokens”. Is it that data being retrieved from storage when queried is also considered as “context tokens”?