> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymet.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Write better prompts

> How to brief the agent so the first result is close to what you want.

The agent builds what you describe, so the more it knows about your product, the closer the first result is. Brief it the way you would brief a designer on your team.

## Say who it is for and what it does

"Generate a table" leaves the agent guessing. Say where the screen lives, who uses it and what they need to get done.

```text theme={null}
Create a pricing page for Ledger, a budgeting app for freelancers.
Compare three plans: Solo, Studio and Agency. Highlight invoicing,
client limits and priority support. The Studio plan is the one we
want most people to pick.
```

Describe the product, not the code. What the user sees, what they click, what happens next.

## Start with one screen

A whole app in one prompt usually comes out shallow. Build it up:

1. One screen first, for example the dashboard.
2. Refine it until the style is right.
3. Then add the next screens. They follow the style you settled on.
4. Then add the flows between them.

## Be specific, and set limits

Name the layout, the content and what to leave out. Clear limits get better results than open briefs.

```text theme={null}
Create a hero section with the product screenshot on the right and
the headline and one button on the left. No navigation bar yet.
The audience is product designers.
```

Use real names, real numbers and hex codes: "#FF6600 for the primary button", "show 12 invoices, three of them overdue".

## Answer the quick questions

When a prompt leaves something open, the agent may ask before it builds. The questions appear above the generation input under **Quick questions**. Pick an answer or type your own. A minute here saves a round of fixes.

## Point at what to change

To change one part of a screen, do not describe where it is. Click **Select**, click the element and write the change on it. You can note up to 10 elements and send them together. See [Select and edit with AI](https://docs.polymet.ai/canvas/select-and-edit.md).

For a color, a margin or a line of text, change it yourself in the [visual editor](https://docs.polymet.ai/canvas/visual-editor.md). Saving straight to code there costs no credits.

## Say what to leave alone

The agent changes whatever your prompt touches. Say what must stay as it is.

```text theme={null}
Add a filter bar above the invoice table. Keep the table, the sidebar
and the page header exactly as they are.
```

## Put standing rules in project rules

If you keep repeating the same instruction, write it once in [project rules](https://docs.polymet.ai/canvas/project-rules.md). The agent follows **rules.md** on every generation, and **design.md** for how things should look. This is also where a short version of your design guidelines belongs: when to use which color, how headings and body text differ, spacing habits, which component to use for what, tone of voice. The color and font values themselves belong in your [theme](https://docs.polymet.ai/canvas/themes.md).

## Show it a picture

Attach a screenshot or a sketch to the prompt and say what to take from it: the layout, the colors, the density. "Match the layout of this screenshot, but use our colors" works better than the image alone.

If your design is in Figma, [import the frames](https://docs.polymet.ai/canvas/import-figma.md) instead.

## Ask for options

Not sure which direction is right? Ask for several in one prompt, then put them side by side.

```text theme={null}
Create three options for the onboarding screen, each as its own page:
one with a checklist, one with a progress bar, one with a single step
per screen.
```

See [Compare options side by side](https://docs.polymet.ai/canvas/compare.md).

## Ask for a plan first

For a big change, ask the agent to plan before it edits.

```text theme={null}
Before editing, make a plan for making the whole app work on mobile.
Start with the layout components, then the smaller elements. Show me
the plan before you change anything.
```

## Start a new thread for a new topic

A thread carries everything said in it. When you move to unrelated work, start a fresh one with **New thread** or `/clear`. Earlier threads stay available. See [Threads, context and queued messages](https://docs.polymet.ai/canvas/threads-and-context.md).

## When something goes wrong

* If the preview shows an error, let the agent fix it first. See the error fixer in [Prompt the agent](https://docs.polymet.ai/canvas/prompt.md).
* Tackle one problem per prompt, and paste the exact error text or a screenshot.
* If a change went the wrong way, roll back to an earlier version and reword the prompt. See [Versions and rollback](https://docs.polymet.ai/team/versions.md).

## Limits

A prompt can be up to 15,000 characters.

## Related

* [Prompt the agent](https://docs.polymet.ai/canvas/prompt.md) — attachments, voice, stopping a generation
* [Project rules](https://docs.polymet.ai/canvas/project-rules.md) — instructions the agent follows every time
* [Select and edit with AI](https://docs.polymet.ai/canvas/select-and-edit.md) — change exactly the element you mean
* [Compare options side by side](https://docs.polymet.ai/canvas/compare.md) — choose between options


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.