All About AI Model Settings
About the AI
Model Settings is a feature in Questsmith that lets you customize and control how AI responses are generated during gameplay. These options may vary across different models.
The AI generates the next part of your Adventure by building a list of possible tokens and estimating how likely each one is to come next. It then selects tokens from that list with a random number and some math. Advanced Settings let you change the numbers in that calculation that are not random.
This is complicated, so it is highly recommended that you experiment with each setting or ask for advice on our Discord.
You may also find it helpful to read our more advanced article about how AI responses are generated, which can help you understand how these settings work behind the scenes.
Model Settings are now open to all Questsmith players.
Context Length
Context Length determines the maximum number of tokens that can be sent to the AI model every turn. It is usually best to set this as high as possible so the AI receives as much context about your Adventure as it can.
The context includes information in Memory, triggered Story Card entries, Author's Note, any Memories, model instructions, the most recent player input, and the newest AI output. Any remaining space in the chosen Context Length is filled by Adventure text, so maximizing context can help the AI generate more coherent responses.
Context Length is ultimately determined by your membership tier, but not all models can support larger context sizes.
Subscribed players can also spend 1 Credit per action to temporarily increase context length on certain models.
Response Length
Response Length determines the maximum number of tokens the AI will output each turn. This is mostly a matter of personal preference. You may want short responses that you can read quickly and decide when to jump in, or long responses that you can take your time with. Use whatever fits your play style.
Temperature
Temperature controls the randomness of the AI's responses. A higher temperature increases unpredictability and leads to more varied and creative outputs, while a lower temperature produces more consistent and predictable responses. Adjusting Temperature lets you fine-tune how random you want the game to feel.
The default temperature is often 0.8, though you might try something like 0.6 if the AI is getting a bit too far from a reasonable response, or 0.95 or even 1.2 if you want to see some really uncommon text.
Be warned that increasing Temperature too high can lead to outlandish or even gibberish tokens.
Top-K
Top-K limits the AI's choices to the K most likely tokens in its response. By narrowing the possibilities, Top-K helps maintain relevance and consistency in the AI's replies, which is useful when you want a more stable and predictable story progression.
If Top-K is set to 20, the AI will have only the 20 most likely tokens to pick from each turn. This reduces randomness by excluding less likely options when generating new outputs.
Top-P
Top-P filters out less likely tokens to ensure the AI output stays coherent and relevant. It works by setting a probability threshold, such as 90%, and selecting the most likely tokens until their combined probability reaches that limit. This keeps outputs focused and on-topic by limiting the AI to a more relevant set of tokens.
This works as a safety net when combined with Top-K. Top-K may be 50, and it will always select 50 tokens even if some of them are extremely unlikely and would not make much sense if selected. Top-P cuts those unlikely tokens off, but still lets you have more options when the Top-K choices are all likely. It lets the AI be certain when it is certain, and creative when it is not.
If Top-P is too low, outputs may become repetitive and uninteresting. If Top-P is too high, outputs may become disjointed, incoherent, and even grammatically incorrect.
A Top-P of 0.90 to 0.95 is best for most players, but it can depend on your other settings. If you have a high Top-K, you may want a lower Top-P, and vice versa.
Presence Penalty
Presence Penalty applies a one-time weight penalty to any word that has already appeared in the response. If the word dog is used once, Presence Penalty will penalize it to help prevent immediate repetition, unless its base probability is high enough to overcome the penalty.
However, pushing this setting too high can occasionally do the opposite of the intended effect and cause more repetition. If all words are penalized, then nothing is.
Frequency Penalty
Frequency Penalty is like Presence Penalty, but its penalties are cumulative. The more a word has been used, the more it will be penalized in the next response. This may sound good, but remember that character names and common words like you, I, and, and a can be penalized heavily, so setting the value too high can cut out ordinary tokens in favor of very uncommon ones and even become grammatically incoherent.
Frequency Penalty usually defaults to zero, and while you can set it very high, the AI will start to drift toward strange outputs if you push it much above 1.
Tips & Tricks
There are no rules for these settings.
The best way to get a feel for them is to experiment, and there is no penalty for doing so. Change and adjust them, then see what happens in your Adventure. You can nudge them around based on what you think you would personally prefer, and you might like it better, or you might go back. Sure, the AI responses may get weird and wacky, but that is part of the fun of playing Questsmith.
There are no real consequences to changing these settings.
There are no consequences to turning up Top-P, Temperature, or Repetition Penalty to maximum just to see the AI flail about like a tube man. There are no consequences to turning everything down to zero and watching the AI do its best impression of a broken record.
After all, everything in Questsmith is erasable and editable, so if you do not like how the AI writes on your new settings, erase and try again.
There are not agreed-upon best values for these settings.
The default values have tested well in our experiments, but they may not work for your style of gameplay, and that is alright. We provide these settings so you can customize and control your Questsmith experience however is best for you. If you like something that no one else is using, that is great. At the end of the day, it is your Adventure, your game, and your experience, and you can do whatever makes you happy.
Happy Adventuring!