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

# Tips for Writing Effective Rey AI Prompts

> Learn how to write clear, specific prompts for Rey AI so you get accurate, usable results on the first try — and how to refine when you don't.

The quality of what Rey AI produces depends heavily on what you ask it. A vague prompt gets a generic result; a specific, well-framed prompt gets something you can actually use. This guide covers the principles of writing good prompts and shows you real examples for the most common tasks.

## Why Prompt Quality Matters

Rey AI has full context of your app, but it can only act on what you tell it. When your prompt is clear and specific, the agent can match your intent more accurately — producing screens that fit your design, tables with the right structure, and copy that suits your audience. Spending a few extra seconds on your prompt consistently saves time on revisions.

## Prompting Principles

<Steps>
  <Step title="Be specific about what you want">
    Describe the screen's purpose, the key UI elements it should include, and any constraints. Instead of "add a dashboard," write "add a dashboard with a summary card for total revenue, a bar chart of orders by week, and a table of recent customers."
  </Step>

  <Step title="Mention your app context">
    Include a short description of your app so Rey AI can tailor its output. Phrases like "for a fitness tracking app" or "for a B2B invoicing tool" give the agent the frame it needs to make relevant choices.
  </Step>

  <Step title="Reference existing components or tables by name">
    If your prompt involves something already in the app, use its exact name. For example: "Update the **BookingForm** screen to include the **Instructors** table as a dropdown." Named references prevent ambiguity.
  </Step>

  <Step title="Ask for one thing at a time for complex changes">
    Break large requests into smaller, sequential prompts. Asking Rey AI to redesign an entire flow in one prompt increases the chance of a result that misses the mark. Build it step by step for more predictable output.
  </Step>
</Steps>

## Example Prompts for Common Tasks

<AccordionGroup>
  <Accordion title="Generating a screen">
    Use this pattern when you want Rey AI to build a new screen from scratch. Include the screen's name, its purpose, and the main components you expect.

    ```text theme={null}
    Add a welcome screen for a yoga studio app with a hero image, tagline, and a 'Book Class' button
    ```

    **Why it works:** It names the app context (yoga studio), identifies the screen type (welcome), and lists the exact components needed (hero image, tagline, button with a specific label).
  </Accordion>

  <Accordion title="Generating a table">
    When asking Rey AI to create a table, specify the table name, each field name, and the type for each field.

    ```text theme={null}
    Create a table called Classes with fields: name (text), instructor (text), duration (number), status (multiple choice)
    ```

    **Why it works:** Rey AI gets the exact schema you need — no guessing about field names or types, and the resulting table is immediately usable.
  </Accordion>

  <Accordion title="Writing copy">
    Give Rey AI the element you need copy for, the quantity of options you want, and the tone or audience.

    ```text theme={null}
    Suggest 3 options for the tagline on the Welcome screen — make it motivational and approachable
    ```

    **Why it works:** Asking for multiple options gives you choices. Specifying the tone ("motivational and approachable") steers the agent away from generic output.
  </Accordion>

  <Accordion title="Getting design feedback">
    Point Rey AI at a specific flow or screen and ask a targeted question about the user experience.

    ```text theme={null}
    Review the onboarding flow and suggest improvements to reduce drop-off
    ```

    **Why it works:** It names the flow, defines a clear goal (reduce drop-off), and frames the request as a review — inviting analysis rather than a rebuild.
  </Accordion>

  <Accordion title="Asking a data question">
    Ask in plain language, as if you're asking a colleague who knows your app's data.

    ```text theme={null}
    Which screen do users navigate to most after the Home screen?
    ```

    **Why it works:** The question is specific and answerable. Avoid broad questions like "tell me about my data" — the more focused your question, the more useful the answer.
  </Accordion>
</AccordionGroup>

## When the Result Isn't Right

If Rey AI's output isn't what you expected, you have two options:

* **Refine with a follow-up prompt.** Keep the panel open and give Rey AI a correction. For example: "The layout is good, but move the button to the bottom of the screen and change the label to 'Get Started'." Follow-up prompts build on the current result rather than starting over.
* **Undo and try a different prompt.** If the result is too far off, reject the changes and rewrite your prompt with more detail or a different framing. Consider which of the prompting principles above you could apply more thoroughly.

<Warning>
  You can always manually adjust any AI-generated element directly on the canvas after accepting it. Use Rey AI to get 80% of the way there quickly, then fine-tune the details yourself.
</Warning>
