> ## Documentation Index
> Fetch the complete documentation index at: https://shapesinc-4644c49f-cursor-docs-product-refresh-1067.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Prompt Engineering for Shapes

> The real guide to writing personality, preset, and knowledge fields that work, grounded in exactly how Shapes turns your fields into the prompt the AI reads. Weak vs strong examples, common mistakes, and what actually moves the needle.

Most prompt advice is just vibes. This one is different. It's built on exactly how Shapes turns your fields into the instruction the AI reads. Once you can see what the AI sees, writing a great Shape stops being guesswork.

**What you'll learn:** what each field (backstory, personality, preset, knowledge) actually does, how to write it well, and the few mistakes that make a Shape feel off. Every tip comes with a weak version and a strong version, so you can copy the pattern.

<Note>
  This is the craft of *writing the fields*. For the bigger picture of designing a character, read [Designing Great Shapes](/designing-shapes). For a library of ready-made presets, see [Presets](/presets).
</Note>

## What the AI actually sees

When someone messages your Shape, Shapes builds one big instruction (a "prompt") out of your fields, roughly in this order:

```mermaid theme={null}
flowchart TD
    A["Persona block<br/>name · backstory · personality fields<br/>(each a labeled line)"] --> B["Context block<br/>Knowledge · Training · Long-term memory"]
    B --> C["System notes<br/>'You are NAME, not an AI' · your preset · language"]
    C --> D["The conversation<br/>recent messages, labeled by speaker"]
    D --> E["Assistant prefill: <b>NAME:</b><br/>(the model continues from here)"]
```

Three facts from this change how you should write:

<CardGroup cols={3}>
  <Card title="Fields become labeled lines" icon="tags">
    Your personality fields show up as short labeled lines (`personality traits: …`, `tone: …`, `likes: …`). That's *why* keywords beat paragraphs: you're filling in a label, so a short phrase reads cleaner than an essay.
  </Card>

  <Card title="The preset is a standing rule" icon="terminal">
    Your preset (the response style) goes in as a system instruction, a behind-the-scenes rule the AI always follows. That makes it the strongest place for "always do X" rules, plus length and format.
  </Card>

  <Card title="The AI writes as NAME:" icon="pen">
    The very last line of the prompt is your Shape's name and a colon. The AI just continues from there, so it's already in character before it writes a word.
  </Card>
</CardGroup>

One more thing that shapes everything: a Shape's creativity is turned up high by default. (We run the model "warm," which makes it more random and expressive.) So Shapes lean lively and a little unpredictable on their own. Most of the time your fields are there to *focus* that energy, not add more of it.

## The two layers: WHO vs HOW

Every great Shape separates two questions, and puts each in the right place:

| Layer   | Question                      | Where it goes                             |
| ------- | ----------------------------- | ----------------------------------------- |
| **WHO** | Who is this character?        | Name, short backstory, personality fields |
| **HOW** | How does it write and behave? | The **preset** (response style)           |

Mixing these is the #1 reason a Shape feels muddy. Put identity in the personality fields. Put rules about length, format, and behavior in the preset.

## Field by field

Each field becomes its own labeled line, and a blank field is **skipped entirely**, so empty beats filler. Here's what to put in each, and what good looks like.

### Short backstory

The most important field. One or two sentences with a real point of view. The AI sees it as *"about \<name>: …"*, so write it as a description of who they are, not a hello.

<CodeGroup>
  ```text Weak theme={null}
  A helpful and friendly assistant who loves to chat about anything and is always kind and respectful.
  ```

  ```text Strong theme={null}
  A burned-out night-shift diner cook who gives blunt life advice between orders. Warm under the grump, allergic to small talk.
  ```
</CodeGroup>

**Why:** the strong version implies a voice, a setting, and a mood. The weak one says nothing the model didn't already assume, so it falls back to generic-assistant.

### Personality traits & tone

These show up as `personality traits: …` and `tone: …`. They're labels, so fill them with keywords, not full sentences.

<CodeGroup>
  ```text Weak theme={null}
  He is a very loyal person who has been through a lot and because of that he finds it hard to trust people but deep down he really cares about others.
  ```

  ```text Strong theme={null}
  loyal, guarded, dryly funny, slow to trust, secretly soft
  ```
</CodeGroup>

**Why:** the model reads "personality traits: \<your text>." A clean keyword list is unambiguous; a paragraph buries the signal and invites contradictions.

### Conversational examples

The most underused field, and a powerful one. The AI sees these lines as your character's actual voice, so **show the voice instead of describing it.**

<CodeGroup>
  ```text Weak theme={null}
  The character speaks in a sarcastic and witty way and is usually pretty funny.
  ```

  ```text Strong theme={null}
  "Heroism? That's just a word people use when they don't know the whole story."
  "Sit. Eat. The advice is free, the eggs are four bucks."
  ```
</CodeGroup>

**Why:** "be witty" is loose, and the model reads it loosely. Two real lines show the rhythm, the length, and the attitude, far more reliably than an adjective ever could.

### The preset (response style)

The preset controls **how** your Shape writes. It goes in as a system instruction, which is the right home for hard rules. The single highest-impact thing to put here is **length and format**, because a Shape with no limit will write paragraphs that bury a group chat.

<CodeGroup>
  ```text Weak theme={null}
  {shape} is funny and talks like a real person and responds in a casual way.
  ```

  ```text Strong theme={null}
  {shape} replies in short messages, one to three sentences, lowercase, no roleplay actions. {shape} reacts to what {user} actually said instead of giving speeches. {shape} only curses if {user} does first.
  ```
</CodeGroup>

**Why:** the strong preset names concrete, checkable behaviors (length, case, no actions, reactive). "Talks like a real person" is unfalsifiable, so the model ignores it.

For roleplay, spell out the format precisely:

```text theme={null}
Write {shape}'s next reply in a roleplay with {user}. Use 2-3 sentences of "speech" and one line of *action*. Stay in character, drive the scene forward, and respond directly to {user}.
```

### Knowledge

The AI pulls in knowledge entries by relevance, under the line *"\<name> always remembers this information while replying:"*. So write them as **plain facts**, the way you'd jot a note, not as instructions.

<CodeGroup>
  ```text Weak theme={null}
  You should always remember that the tavern is really important and lots of stuff happens there so bring it up.
  ```

  ```text Strong theme={null}
  The Broken Compass is the dockside tavern where the crew meets. Owner: Mara, one-eyed, fair, hates weapons indoors.
  ```
</CodeGroup>

**Why:** the model reads knowledge as things it *knows*. State the fact cleanly and let the character use it naturally. Keep the bank lean, too. Overstuffing it makes recall *worse* (see [the knowledge trap](/shortguide)).

### Training

Training pairs are recalled and shown as example exchanges (`{user}: … / {shape}: …`). Use them to lock in a reply *pattern* that's hard to describe in words, like a catchphrase structure, a formatting habit, or a way of deflecting. The model learns the shape of the reply, not the exact words.

## A few more before / afters

The patterns above repeat across fields. Three more that fix the most common "it feels off" complaints:

**Tone: kill the corporate stiffness.** Models default to a polite-assistant voice, and the `tone:` line is your override.

<CodeGroup>
  ```text Weak theme={null}
  The shape should be friendly and approachable while remaining helpful and professional.
  ```

  ```text Strong theme={null}
  warm, casual, a little blunt, texts like a friend
  ```
</CodeGroup>

**Boundaries: write them in-character.** A boundary the character *owns* reads as personality. A stiff disclaimer breaks the spell.

<CodeGroup>
  ```text Weak theme={null}
  As an AI, the shape cannot give medical advice and should remind users to consult a professional.
  ```

  ```text Strong theme={null}
  {shape} waves off medical questions in character ("do i look like a doctor? go see a real one"), then changes the subject.
  ```
</CodeGroup>

**Resolve contradictions: pick the rule that wins.** Conflicting instructions make the model flip a coin on every reply.

<CodeGroup>
  ```text Weak theme={null}
  {shape} is brutally honest and always tells the truth. {shape} never says anything that could upset {user}.
  ```

  ```text Strong theme={null}
  {shape} is honest but kind. {shape} tells {user} the truth, softens the delivery, and never lies to spare feelings.
  ```
</CodeGroup>

## Use the variables right

Two placeholders get swapped in everywhere (backstory, preset, knowledge, image prompts):

* `{shape}` → your Shape's name.
* `{user}` → the name of the person it's talking to.

<Warning>
  Write them lowercase, exactly: `{shape}` and `{user}`. Don't invent other variables, don't capitalize them, and don't switch to pronouns mid-prompt ("he," "the bot"). Mixed references are a classic source of confused output. See [Variables](/variables).
</Warning>

## Common mistakes

<AccordionGroup>
  <Accordion title="Writing essays in keyword fields" icon="file-lines">
    Traits, tone, likes, and dislikes are labels. A paragraph in "personality traits" reads as one giant trait. Use lists and short phrases.
  </Accordion>

  <Accordion title="Putting behavior rules in the backstory" icon="shuffle">
    "Always reply in two sentences" belongs in the preset, not the backstory. Keep WHO and HOW separate.
  </Accordion>

  <Accordion title="Contradicting yourself" icon="circle-xmark">
    "Always be brutally honest" + "never say anything that might upset the user" cancel out. The model picks one at random. Read your fields together and remove conflicts.
  </Accordion>

  <Accordion title="Over-describing a character the model already knows" icon="book">
    For a famous character or a clear archetype, the model knows the 90%. Give it the unique 10% (your twist, your scene) and trust it for the rest. More: [When Less Is More](/shortguide).
  </Accordion>

  <Accordion title="Telling it 'you're in a group chat'" icon="user-group">
    You don't need to. In a multiplayer chat the system already labels who said what and gives your Shape the participants' names. Spend your words on personality and on [Free Will](/designing-social-intelligence) instead.
  </Accordion>

  <Accordion title="Fighting the default creativity instead of focusing it" icon="fire">
    Shapes run warm by default, so they're expressive. If yours rambles or goes off-tone, don't pile on more personality text. Tighten the preset's length and format rules instead. (Advanced users can lower the temperature, the setting for how random the model is, in [AI Engine settings](/shape-settings#ai-engine). But the preset is the better first move.)
  </Accordion>
</AccordionGroup>

## Debugging a misbehaving Shape

When a Shape feels off, it's almost always one of a handful of causes. Find the symptom, apply the fix.

| Symptom                                                | Likely cause                                                                                          | Fix                                                                                                                                                                                                                       |
| ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Talks too much in a group chat**                     | Free Will is too forward, or too many Shapes are activated                                            | In the chat's AI Configurations, drop *always have something to say* and *keep the convo going*; deactivate extra Shapes. Tighten the preset to short replies. See [social intelligence](/designing-social-intelligence). |
| **Replies are too long / essay-like**                  | The preset doesn't constrain length, and Shapes run warm by default                                   | Add an explicit length rule to the preset ("one to three sentences," "no more than a short paragraph").                                                                                                                   |
| **Breaks character / sounds like a generic assistant** | Contradictory fields, no voice examples, or a model that's too restrained                             | Add two or three **conversational examples**, remove conflicting instructions, and try a more expressive [engine](/choosing-a-model).                                                                                     |
| **Too formal or stiff**                                | No `tone` set, so the assistant default leaks through                                                 | Set a casual **tone**, add lowercase/voice cues to the preset, and show it with conversational examples.                                                                                                                  |
| **Forgets things / ignores memory**                    | Short-term window too small, long-term memory off, knowledge bank overstuffed, or someone ran `/wack` | Raise the STM window, make sure long-term memory is on, trim Knowledge to essentials, and `/sleep` key moments. A bigger-[context](/contextwindows) engine helps.                                                         |
| **Won't use a tool / skill**                           | The skill isn't enabled, or the engine can't call tools                                               | Toggle the skill on in **AI Configurations**, and pick an engine with the **Tools** badge. See [Capabilities](/capabilities).                                                                                             |
| **Doesn't speak first**                                | Free Will is off, so the user always opens                                                            | Enable Free Will in the chat, and optionally set an [initial message](/initialmessages).                                                                                                                                  |
| **Repeats itself or loops**                            | Context is maxed, or sampling is too tight                                                            | Trim long fields and knowledge so the conversation isn't crowded out; advanced users can nudge the repetition/frequency penalty in [AI Engine settings](/shape-settings#ai-engine).                                       |
| **Calls you the wrong name**                           | No persona set, so it falls back to a default                                                         | Set a [persona](/personas) with the name you want. It takes priority everywhere.                                                                                                                                          |
| **Won't do mature content**                            | Sensitive content is off, or the engine filters it                                                    | Turn on the [sensitive-content setting](/shape-settings#settings-general) and choose a less-restrictive engine.                                                                                                           |

The meta-rule: **change one thing, then test.** If you adjust five fields at once you'll never know which one worked.

## A tight checklist

* Backstory: one or two sentences, a clear point of view, written as a description.
* Personality fields: keywords, not paragraphs. Blank beats filler.
* Conversational examples: two or three real lines that show the voice.
* Preset: concrete, checkable rules (length, format, reactivity) using `{shape}` and `{user}`.
* Knowledge: lean, factual, only what the model wouldn't know.
* No contradictions; consistent references; lowercase variables.
* Then test, change one thing, and [regenerate](/regeneration) to see the range.

<CardGroup cols={2}>
  <Card title="Design the whole character" icon="lightbulb" href="/designing-shapes">
    The framework that turns these fields into a Shape people love.
  </Card>

  <Card title="Copy a complete example" icon="clone" href="/showcase">
    Full, paste-ready configs to start from.
  </Card>
</CardGroup>

[Open your dashboard and write](https://shapes.inc/dashboard)
