What are Tokens and Context Length?
About the AI
AI models do not read words the way humans do. They process information in Tokens. A token can be a single character, part of a word, or an entire word. In Questsmith, a rough rule of thumb is: 1 token equals about 4 characters (or roughly 0.75 words).
1. How Tokens Work
Think of tokens as the building blocks of language. When you send a prompt, the AI breaks it down into these building blocks, analyzes patterns, and predicts which building block should come next. This is why the AI can sometimes waver on very complex or made-up words, since it has to find the best token match.
2. What is Context Length?
Context Length is the AI's short-term memory. It determines how much of your Adventure the AI can keep in view at the same time when generating a response.
As your story grows, more actions, dialogue, character details, and story information are added to the context. When the amount of information exceeds the selected Context Length, the earliest parts of the Adventure may gradually fall outside the AI's active context to make room for newer information.
A higher Context Length allows the AI to keep track of more of your Adventure at once, helping maintain better story continuity, character consistency, and overall story flow, especially during longer Adventures.
Pro Tip: To keep your story coherent even at the context limit, use Story Cards and Memory. These anchored details are always sent to the AI so it retains quest goals and character names, even after the actual text from chapter 1 has already fallen out of the context window.
Pro Tip: If you add more than 5 Story Cards to your Adventure, we recommend increasing your Context Length to more than 4,000 tokens. This gives the AI more room to process your Story Cards along with the ongoing Adventure, helping maintain better story continuity and flow.