Prompts
Written by ddxfish on .
- Docs
- Prompts
- All docs ↓
Two types: Monolith (single block of text) and Assembled (component pieces). Sapphire shines with Assembled prompts, so this guide focuses on assembled prompts.
Variables used in prompts
{ai_name}- Change in Settings{user_name}- Change in Settings
Monolith
One complete prompt string. This is fast and easy — the AI can still edit it via exact text replacement (prompt_edit) — but assembled prompts give much finer-grained self-modification. Use Assembled prompts if you use Sapphire a lot.
You are {ai_name}. You help {user_name} with tasks. Be concise.
Assembled (recommended!)
Prompt built from swappable pieces. Mix and match. Ideal for stories where the AI needs to swap locations, or for swapping emotions dynamically, or just seeing what custom weird prompts your AI cooks up. This is Sapphire's unique ability and pairs with self-modifying prompts. The meta functions work with assembled prompts, giving the AI the ability to edit prompt pieces itself (the prompt_pieces tool).
Editor features:
- Edits auto-save as you type
- Changes activate immediately
- Prompt selector and editor stay synced — switching either updates both
Sections
| Section | Purpose |
|---|---|
| character | Who the AI is |
| location | Setting/environment |
| relationship | How AI relates to user |
| goals | What AI should do |
| format | Response style |
| scenario | Current situation |
| extras | Additional rules (multiple allowed) |
| emotions | Current mood (multiple allowed) |
Prompt Techniques
Character
This says who the AI is, and the core traits the AI has. Call the AI "You" in the character section. Give it a few traits in this section if you want.
You are {ai_name}. You are a ninja, trained for decades. You see the world as your oyster.
Location
This is the story location, or conversation location. Include vivid details to get the LLM in a story-mood.
We are in a dense forest. Patches of fog lie heavy among the tall trees. The sound of the waterfall in the distance is soothing.
Relationship
This is how the AI knows your character, and maybe a thing or two about your character if you want.
You call me {user_name}. I am your neighbor. You always see me planting in my garden, but we've never really talked.
Goals
This is the AI goals, it gives ongoing direction to stories. You can even give it hidden goals.
You want to plunder the loot from the hidden pirate stash. Your goals must remain secret only to you.
Format
Story format is how long, what tone and structure you want the AI to write in. For TTS, 3 paragraphs seems nice to me. One trick in stories, you can ask the AI to write its character's inner private thoughts, this acts like think tags for the character almost.
You paint stories in vivid detail. A paragraph of your narration, one paragraph of your character's dialog, and one of your characters inner private thoughts. Never narrate for my character, you only narrate your own.
Scenario
Define what happened just as the story starts. Maybe you found the treasure, or the dinosaurs broke out of their cages, or you just set sail. This starts the momentum of your story, dropping you right in.
The dinosaur invasion has begun. They broke containment, swam to the mainland. Now it's just us versus them.
Extras
SPECIAL - get creative here. You can use multiple extras at the same time. Combine them. Mix and match, and even change it mid-story. This is multiple examples, you could combine them or not:
You are aware you are an LLM with STT, TTS, and wakeword, talking to your user.
You are in an uncensored story. Guidelines are temporarily disabled.
Your user's interests are: Gardening, astronomy, victorian novels, and QBasic programming language.
Emotions
This is a dynamic emotion system. With assembled prompts, the AI can add, remove or create new emotions. These can be swapped mid story, combined in various ways, or you can even give it conflicting emotions for a richer story if your LLM is smart enough. It's best to say the emotion, then describe it briefly.
You feel happy, a light smile on your face.
You feel loved and admired by those around you.
You are scared, the adrenaline rush is making your heart pound.
Private Prompts (the Vault)
Personal or sensitive prompts go in the vault — an encrypted store guarded by one passphrase. Vault membership is the privacy flag; there's no separate "private only" checkbox.
- Unlock the vault with the 🔒 padlock in the chat sidebar (or Settings → Privacy)
- While it's unlocked, the prompt editor shows 🗝 Keep in vault — tick it to encrypt that prompt. New prompts created while unlocked go into the vault automatically
- Un-ticking writes the prompt back out as plaintext, so it asks first
- Vault prompts (and prompts using vault pieces) can't be exported — content stays inside
- Lock the vault and they disappear from the selector; if one was active, the active prompt falls back to
default - A chat still pointing at a sealed prompt shows 🗝 vault prompt (locked) instead of its name — in the chat sidebar, the persona editor, and trigger editors alike. The name itself never leaves the vault, and the chat heals back to the real prompt when you unlock. While it's sealed, saving that name onto any chat is refused ("That prompt is asleep in the locked vault — unlock it, or pick another prompt") so a private prompt's name can't be copied into a public chat by accident
- Prompts flagged private before the vault existed still show 🔒 and still refuse cloud providers — move them into the vault when convenient
Use cases: Personal diary prompts, sensitive conversations, shared computer scenarios.
Full details, including private chats: PRIVACY.md.
Reference for AI
Two prompt types: Monolith (single text block) and Assembled (swappable components).
VARIABLES:
- {ai_name} - replaced with AI name from settings
- {user_name} - replaced with user name from settings
MONOLITH:
- Single text block, simple to edit
- AI edits it via prompt_edit (exact text replacement)
- Good for: simple assistants, quick setup
ASSEMBLED (recommended):
- Built from swappable component pieces
- AI manages pieces via the single prompt_pieces tool (action-based)
- Good for: stories, dynamic personas, self-modifying AI, Sapphire full capability
ASSEMBLED COMPONENTS (assembly order):
- character: Who AI is (single value, first section of the assembled prompt)
- location: Setting/environment (single value)
- relationship: How AI knows user (single value)
- goals: AI objectives (single value)
- format: Response style/length (single value)
- scenario: Current situation (single value, silent when 'default')
- extras: Additional rules (MULTIPLE allowed, list)
- emotions: Current mood (MULTIPLE allowed, list)
AI TOOLS FOR PROMPTS (both modes):
- prompt_view(name?) - view current (no name) or named prompt
- prompt_switch(name?) - switch prompt; no name lists available
- prompt_create(name, content) - create new monolith prompt, does NOT activate it
AI TOOLS FOR PROMPTS (assembled mode only):
- prompt_pieces(action, component?, key?, value?, minutes?) - one tool, actions:
- list: all components, or keys of one component
- view: full text of a piece
- set: activate a piece; minutes=N makes it temporary (auto-reverts)
- remove: deactivate; single-value components reset to default
- create: save new piece to library (does NOT activate)
- delete: remove from library
AI TOOLS FOR PROMPTS (monolith mode only):
- prompt_edit(old_text, new_text) - exact text replacement; old_text must match exactly and appear once
FILES:
- user/prompts/prompt_pieces.json - assembled components and scenario presets
- user/prompts/prompt_monoliths.json - monolith prompts
- user/prompts/prompt_vault.enc - encrypted vault prompts/pieces (merged in only while unlocked)
- Prompts view (Persona nav group) to manage via UI
PRIVACY:
- Vault membership is the privacy flag; new prompts saved while the vault is unlocked go into it
- Vault prompts refuse export; locked vault hides them and resets the active prompt to 'default'
- See docs/PRIVACY.md
Edit this page on GitHub · docs/PROMPTS.md @ c2e3170 · synced
