Skip to content
Saymail is currently in  closed beta — available by invitation only.
浏览文档

Working with LLM prompts

Editing classification prompts, pinning a preferred connection, and assigning prompts to accounts and profiles.

A classification prompt tells the LLM what to do with each email — which scores to assign, which signal tags to use, when to translate, and in what JSON format to return its answer. Saymail ships with a sensible default prompt, and you can edit it or create new prompts for different inboxes.

Prompts live in the LLM Prompts panel. Open it from the command palette or panel menu.

Anatomy of a prompt

Each prompt has:

  • Name — used in dropdowns when you assign the prompt to an account or profile.
  • Content — the user portion of the prompt. This is where you describe the rules in your own words: what counts as important, which tags to use, special handling for senders or topics. Edit this freely.
  • System prompt — the system portion. It contains the JSON-output contract Saymail relies on (field names, allowed values, formatting). Editing the system prompt can break parsing — if you change the JSON shape the LLM returns, Saymail’s parser may reject every response and mark the connection as disconnected. The editor shows a warning when you change it.
  • Preferred connection (optional) — pin this prompt to a specific LLM connection. Useful when one prompt needs a stronger model than the rest of your mail.
  • Disable on connection failure (toggle) — if the preferred connection is disconnected, by default Saymail falls back to the next-priority connection. With this toggle on, Saymail skips the prompt instead, leaving emails unclassified until the preferred connection is back. Useful for prompts that only make sense on a specific model.

Creating or editing a prompt

  1. Open the LLM Prompts panel.
  2. Click New, or select an existing prompt and click Edit.
  3. Fill in the name, content, and optional fields.
  4. Save.

The change takes effect on the next classification run. To apply the new prompt to past emails, reclassify them.

Assigning a prompt

Prompts aren’t used until they’re assigned. Two assignment points:

  • Per account — open the account in Email Accounts and pick a prompt in the Classification prompt dropdown.
  • Per profile — open the profile in Profiles and pick a Default classification prompt. Every account in the profile that doesn’t have its own assignment inherits the profile’s default.

If neither is set, Saymail uses the built-in default prompt for that account.

Tips for writing prompts

  • Be concrete. “Score newsletters lower” is OK; “Score newsletters at 30 unless they’re from news@stripe.com (financial alerts, keep at 70)” is much better.
  • List your domains and senders. The classifier doesn’t know who your boss is. Giving it a few example senders for “important work” goes a long way.
  • Define your tags. If you want a project-x tag, say what counts as project X. Otherwise the LLM invents tag names freely.
  • Don’t fight the system prompt. Keep your edits in the Content field; leave the system prompt’s JSON contract alone unless you understand exactly what Saymail expects.
  • Use the preferred-connection field for expensive prompts. A long, detail-heavy prompt may need GPT-4-class quality. Pin it to your strongest connection so it’s never quietly routed through a weaker fallback.

Testing a prompt

The fastest test loop is:

  1. Edit the prompt and save.
  2. Pick a small batch of emails — five to ten — that you have strong opinions about.
  3. Select them and choose Reclassify in the bulk-action menu.
  4. Compare the new scores and reasoning against what you expected.
  5. Refine the prompt and repeat.

If reclassification fails repeatedly, check LLM connection health — a malformed prompt often shows up as a disconnected connection.