The Prompt Engine
How Inkstone assembles prompt layers, preserves priority content, and trims safely.
The Prompt Engine
The most complex system you'll never have to think about.
Every time you send a message, Inkstone assembles your system prompt, character card, lorebook entries, and chat history into one coherent block that gets sent to the AI. Here's how.
Tokens
The chunks an AI processes text in. ~4 characters per token. "Roleplay" = 2 tokens. A paragraph = ~75.
Context Window
The AI's working memory. A desk with limited space. When it's full, something comes off the edge to make room.
Context Assembly Order
Every message you send, this stack gets built from top to bottom:
The post-history position carries the most weight. Instructions placed there are the last thing the AI reads before responding — they have the strongest influence.
Want to understand why field placement matters? Read Understanding the Fields
That's the whole machine. Each system is designed to stay out of your way when you don't need it and be there when you do.