Working Context Blocks
Learn about context blocks and the best practices for managing them.
Written By Will (F&F Dev)
Last updated 4 months ago
Context Blocks
Context blocks are a shared resource for both players and AI to manage. Context blocks are essentially a shared notepad between players and AI to bring in the most relevant context to the current scene.
We’ve designed our context block system to be as hands free as possible while giving you full control over managing your context. Our research agent will automatically scan lore, memories, and entities to update context blocks before Franz responds. Context blocks will expire and free up space on their own as you play. Newer blocks have priority over older ones, so even if your context is maxed out, Franz should get the most relevant context on every message.
Block States
Blocks can be in one of the following states:
Active: Currently used in context
Idle: Valid block, but not used because context budgets are full. In line to be used when space frees up.
Archived
How do we decide which context blocks are included?
Your plan determines your total context budget.
Each group of context blocks (grouped by type) has a soft context budget. A soft budget means that you can exceed the budget for one group, as long as you are under the total context budget. If all group budgets are exceeded, the soft budget guarantees that at least that much of the total context is allocated towards that group.
Context block groups are each assigned a priority (which you can edit in settings). If all groups exceed the budgets, we use these priorities to determine which blocks to set as idle. For example, if you are at 1500/1000 (500 over) your
miscsoft budget and 1500/1000 (500 over) yourlorebudget and all other budgets are full. Ifloreis a higher priority thanmisc, themiscblocks that exceed the budget will become idle (not used). When space frees up, they will automatically be used as long as they have not expired.
Context Block Group Settings
You can manage the priority and limits of your context block groups. If you care more about one type of block over another, you can set its soft budget to be higher than another group in the settings tab.
How Franz’s Research Step Works
Franz has multiple tools he can use to pull in information about your campaign. When he uses these tools, he will get a lot of data back, and then decide to use only the most relevant parts for context blocks.
Lore
It’s important to know that Franz researches Lore based off the folder titles, page titles, and page headings of lore pages. Franz initially has access to all of the Lore page titles and headings, and based on the research questions asked, he will pick the most relevant lore pages and sections denoted by headings to read and potentially bring into context.
We recommend that world builders use detailed titles for folders, pages, and headings for best search results.
If Franz decides to perform research, you can see the topics he researched along with the blocks created and the source of the lore/memory/entity.
Entities
Franz can search through the sheets and stat blocks for characters, items, monsters, spells, factions, areas, and pois. He will receive the full sheet.
Long Term Memories
Franz will search long term memories using semantic queries. This search is less reliable than lore/entities because there can be hundreds of thousands of memories in a campaign with similar text content.
FAQ
What happens when I go past my context block character limit?
Don’t worry! Going over your context block limit does not impact performance and you are not penalized for it in any way. It is actually designed so that you can go over the limit!
We’ve designed context blocks so that it automatically prioritizes the most relevant blocks. Think of your context block tab as a waiting room for information that might get used on the next turn. When you run a turn, the system will select the most relevant blocks to be used that turn.
Your plan limits how much information Franz can see at once, but you can guarantee Franz sees the information you want him to see by prioritizing important blocks. Our system does its best to automatically prioritize the blocks for you, but you can manually prioritize blocks if needed.
Do I need to manage context myself?
No! The system is designed to work automatically. You should never need to touch it unless you want to. There may be times where you find Franz is going in a direction with the campaign that you find odd. In these cases, you may want to inspect his context and edit it.
Do I need to clean up context blocks all the time?
You may find some context blocks to be irrelevant to the current campaign, either because Franz decided to create a block you find irrelevant, or because a block that was once relevant has not expired but is no longer relevant.
In either case, you don’t need to clean this out. Having some irrelevant context is OK. To squeeze out maximum performance from Franz, higher relevancy of context blocks = better output. However, for most play, it is totally fine to have a few blocks that are no longer relevant, they will expire on their own in time.
Why isn’t Franz pulling in the information that I want him to?
Franz does his best in his research step, but just like a human, he may run into some situations that cause him to miss some information during his research step:
He made search queries that did not pull up the right information, i.e searched for “martial arts” as a key word but the relevant memories talked about “kung fu”.
He may have a different interpretation of what is most important to you
Another thing to note here is that we have to use smaller language models for the research step because it is extremely context heavy. As language models get better, we can expect the research step to get better as well!
How do I make sure Franz knows [insert info]?
You can:
Add the information to context blocks yourself
Ask Franz to research the information and create context blocks
Can I turn the research step off?
Yes, just go into the settings!
