Prompting best practices
Best practices for writing prompts for Assist.
Consider the following best practices for writing effective Assist prompts.
Reference content from your organization
You can @ mention resources, code, and components in your prompt.
Give as much context as possible
Be as specific as you can about the type of app you want to create or the edits you want to make. The more detail you include about what you're trying to build, the better Assist can do on the first pass.
Iterate and refine
If the first output isn't exactly what you expected, add more info or adjust your prompt. You can also manually edit your app and come back to Assist to continue where you left off. Working with Assist is designed to be an iterative process.
Switch between Ask and Build mode
Use Ask mode when you want Assist to answer questions, explain how a part of your app works, or recommend an approach — without making any changes. Switch to Build mode when you're ready for Assist to modify the app. You can toggle between modes using the dropdown in the Assist panel.
Ask mode is especially useful before starting a large build: ask Assist to describe the current app structure or evaluate an approach, then switch to Build mode once you're aligned.
Be specific about resource nuances
Databases (Retool Database, Postgres, MySQL, etc.) can be queried or modified using similar patterns, so Assist can reliably generate SQL queries. On the other hand, API request structures and specifications can vary widely between endpoints. Giving details about how your system is configured, or pasting API documentation into your prompt helps Assist understand the structure.
When configuring your resource, be as detailed as possible in the Description setting on the Resource configuration page. If you're using a REST API specification, consider connecting an OpenAPI or Swagger specification. This information is passed to Assist, and it provides valuable context on when or how the resource should be used.
Plan before you build
For complex apps, ask Assist to create a wireframe or technical spec before writing any code. Reviewing the plan gives you a chance to correct the approach before Assist starts making changes.
Scope requests to one feature at a time
Assist works through tasks in steps, pausing to check in as it goes. Breaking a large request into smaller, focused prompts, such as one feature or section at a time, gives you more control and leads to more complete results than asking Assist to build an entire app in a single message.
Ask Assist to wire up event handlers
When building or editing features that create, update, or delete data, explicitly ask Assist to wire up all event handlers. This ensures mutations are followed by the right data refreshes and UI updates.