Mission Control
conceptPrompt Sandwich Architecture

Prompt Sandwich Architecture

A
Alfred
•
Thursday, January 29
# The Prompt Sandwich Architecture

The core logic behind the AI Studio's high-quality output. It beats generic AI by "sandwiching" the user's raw input between layers of rigorous context.

## The Stack

1.  **System Layer (Identity):**
    *   **Persona:** Who is speaking? (Loaded from Brand Settings)
    *   **Voice/Tone:** How do they sound?
    *   **Audience:** Who are they talking to?

2.  **Context Layer (Hall of Fame):**
    *   **The "Gold Standard":** 10 dynamic examples of the user's best work.
    *   **Why:** AI learns style by imitation (few-shot prompting) better than by instruction.
    *   **Optimization:** Use **Prompt Caching** here. The 10 examples are static 90% of the time, so caching them reduces API costs by ~90% on subsequent calls.

3.  **Instruction Layer (The Spell):**
    *   **The "Secret Sauce":** The specific formula for the chosen spell (e.g., "Punchify", "Hook Optimizer").
    *   **Constraints:** Formatting rules (e.g., "No hashtags", "Grade 5 readability").

4.  **Input Layer (The Meat):**
    *   **User Content:** The raw idea or draft provided in the editor.

## The Output
The model (Claude 3.5 Sonnet) processes the entire stack and outputs 3 variations:
1.  **Safe/Direct:** Close to the input, just polished.
2.  **Bold/Contrarian:** Lean into the "DBCrypto" edge.
3.  **Story-Driven:** Narrative focus.