A guide to prompting in Retool

Keanan Koppenhaver
Keanan Koppenhaver
Technical PMM @ Retool

We’ve seen and heard our users asking for an AI-assisted app-building experience, but we’ve also seen how some of the other versions of this sort of experience can’t quite get you all the way to production. A lot of times, that’s because it’s still a challenge to integrate your business data, while making sure the resulting apps handle that data safely and securely.

That means you can get the integrations and governance that Retool has always been known for while using AI to help you build even faster. And all of this happens right inside the Retool editor, where you can start with one of our pre-written prompts, or create your own.

This step change in how production-grade software is built is how a whole new generation of builders will create software that helps move their teams and businesses forward.

In this post, we’ll take a look at some examples of effective prompts, as well as some tips and tricks on getting the most out of Assist in Retool.

You can also follow along with our prompting explainer:

Prompts matter for building apps faster

The holy grail of app generation is a “one-shot prompt,” which basically means you get exactly the app you want from a single prompt. In practice, that rarely happens, so it’s important to be able to adjust as you go. In traditional AI prototyping tools, that means creating more and more specific prompts to ask for changes to smaller and smaller portions of your app. But in Retool, you can simply go to the visual canvas to make tweaks and updates.

In addition to editing the individual components of your app directly, you can craft your prompts specifically to address certain parts of your app: mentioning certain queries by name, selecting components that the AI should take into account when making additional suggestions, or even @-mentioning specific data resources for more context.

This means you get the best of both worlds: the speed of AI-driven development and the control and accuracy of manually updating application components and queries.

Let’s take a look at how you might craft prompts in a few different scenarios.

How prompts become action

Retool’s Assist panel is good for more than just generating apps from scratch. It’s also an extremely powerful tool for getting new users and teams up to speed quickly on an existing app, debugging an app, or making sweeping modifications that would be tedious to perform manually.

You can easily:

Generate

Create something from scratch via a prompt, with context from any of your Retool resources. Get comprehensive functionality including components, queries, code, and event handlers with descriptive naming conventions for all generated elements.

For example, Build a support ticket tracker or Using our customers table in @RetoolDB, create a customer service dashboard.

Edit

Modify an existing app or component via a prompt, making specific, targeted changes to your application. Retool Assist excels at smaller, precise edits, especially when mentioning specific elements.

For example, Add a department filter or In expenseTable, add bold text for expenses over $500.

Debug

Troubleshoot issues with your app by describing the problem in natural language. Retool can help identify and resolve errors in queries, components, or logic.

For example: The fetchAll query seems broken or Why isn’t the saveChanges button triggering the workflow?

Style

Adjust the appearance of components or your entire app, including applying themes that can be automatically created and applied. You can even reference well-known company names to adopt their brand colors.

For example: Simplify our app’s interface or Apply our brand colors to this app’s theme.

Understand

Ask clarifying questions about an existing app to learn its purpose and functionality. New users and teams get up to speed quickly by asking what components do and how workflows function.

For example: What happens when I click this? or Explain how this onboarding dashboard works.

Guide

Get general advice, best practices, and answers to questions about Retool itself. Get links to documentation and the Community Forum for additional information and guidance.

For example: How do I add validation to this form? or What’s the best way to handle API authentication in this query?

How to write your first prompt

With all this in mind, let’s put together a prompt that will turn into an app. When generating an app from scratch, there are a few pieces of information you want to include in any prompt.

Guiding Retool to build your UI

Get as specific as possible about user interface components. For example, if you’re building a single-page CRUD app (a perfect simple use case for a prompt), you may want to specify that any edit logic happens inside its own modal, or that any generated tables have row actions associated with them to handle any interactions. You can specify individual components you want to use or more general architecture patterns and inspiration, and watch the details fill in.

If the resulting generation isn’t exactly what you were hoping for, you can either adjust your app with a follow-up request or revert the generation and try a different, more specific prompt.

Security and governance from the very first prompt

AI that builds on top of your data is great, but we’ve all seen data breaches, leaks, hallucinations, and various other forms of AI going off the rails; something we want to avoid when it comes to handling sensitive business data.

That’s where the governance features of the Retool platform come in. Resource and query permissions, scoped to either individual resources, specific users or user groups are automatically inherited in any of the resource queries generated along with your application. This means you can configure your resources once and then allow anyone on your team to develop apps using those resources without getting stuck in security and compliance review for each individual app.

Adding data and resources for more context

Business apps and internal tools all have data at their core. Any app generation that doesn’t take this into account is just a UI with nothing to back it up. That’s why AI-assisted app generations in Retool always take your data into account.

If you don’t have any data and are truly just iterating on a user interface, you can ask for mock JSON data so that you’re not staring at an empty application. However, the real power comes in @-mentioning specific resources in your prompt where your data already lives. When you do this, Retool will look at those resources, understand the schema of the data and what’s available, and use all that information to generate a purpose-built app that takes into account your specific datasets and resources.

How to get the most from your prompts

One of the best ways to learn which prompts work well is to test them out yourself! That said, there are some concepts that can help you get the most out of this new Retool functionality.

Combine prompts with other Retool features

Source control

Before you start building, enable Source Control so you can easily roll back changes if needed. As you progress and achieve successful updates, use “Create Release” to capture those checkpoints. This gives you safe restore points throughout your development process and makes it easy to share stable versions with your team.

Prompt + drag and drop

One of Retool’s most powerful capabilities is its mixed-mode development approach. You don’t have to choose between manual building and AI generation—you can combine them freely. Scaffold a rough layout using a prompt and then jump onto the canvas to drag and adjust individual components manually, add more specifics to SQL or JavaScript queries, or add additional components that require a more human touch. This lets you combine the speed of AI with your own design intuition.

Use conversation threads strategically

As you develop an app, consider creating named threads in the Assist tab to capture different workstreams—like “Dashboard UI,” “Data Integration,” or “Permissions.” This keeps your conversation history organized and makes it easy to revisit specific development phases without losing context.

Use prompts to build smarter

Get up to speed on an unfamiliar app faster

If you’re new to Retool or are inheriting someone else’s app, you can dramatically accelerate your learning curve by prompting inside the app builder. Don’t hesitate to ask questions like “What does this component do?” or “Explain how this query connects to the table.” These prompts give you instant explanations that are faster than digging through documentation and help you learn by doing rather than just reading.

Auto-generate documentation for your app

For a comprehensive overview of any app, navigate to the README tab and ask to generate documentation explaining the app’s purpose and functionality. This not only helps team members understand the app but also reinforces your own understanding of how all the pieces connect together. Retool can also name components for you, making codebases more readable and maintainable.

Learn about best practices

When you’re uncertain about implementation patterns, use guiding prompts to learn best practices directly. Instead of searching through docs, simply ask questions like “How to validate forms” or “What’s the best way to handle API authentication?” Retool will provide practical advice and link you to relevant documentation and Community Forum discussions where you can dive deeper.

When to use prompts vs configuring components and writing code manually

The question isn’t really whether to use a prompt or write code manually. It’s about understanding when each approach serves you best. Scaffolding and boilerplate generation, creating the initial structure, components, and queries for your app is much faster using natural language than building from scratch. Retool automatically creates well-organized, properly-named elements that follow sensible conventions. Repetitive modifications are another sweet spot: making the same change across multiple components or applying styling updates throughout an app takes seconds with the right prompt. When connecting databases or APIs, Retool can generate properly structured queries and handle integration logic while you focus on specifying which resources to use.

Manual coding makes more sense when you need fine-grained control or have to handle specific edge cases that are difficult to describe in natural language. Complex JavaScript transformations, performance optimization, or organization-specific architectural patterns often benefit from direct implementation, especially if you’re an experienced developer who can type the solution faster than you can describe it.

However, the key here is that you don’t have to choose one or the other. The hybrid approach is often the most powerful. Use a prompt to generate the foundation and handle repetitive work, then switch to manual coding for customization and refinement. You might drag and drop some components, prompt for data connections, manually write complex transformers, and prompt again for styling, all in the same workflow.

Don’t overthink it.

This workflow adapts to your needs and preferences, so use whatever gets you to a working solution fastest.

Start prompting in Retool today

The Assist tab is available for all Retool Cloud customers and any self-hosted customers running the Edge release of 3.283 or later. Navigate to your Retool AI settings and make sure the “Assist Tab” toggle is enabled. You can also optionally restrict model usage to a single provider (for self-hosted customers who only have a contract with a single AI provider).

Then, simply create a new app and you’ll see the Assist pane enabled! Otherwise, you can go into an existing app and look for the Assist icon in the lower-left corner of the Retool IDE.

Final thoughts on the path from prompt to app

Enterprise AppGen is just beginning. It’s bringing all sorts of new builders into the world of software development and helping to bring about a completely new era of software. But no matter what type of application you’re generating, you’ll likely want the ability to generate it on top of your data, deploy it into your own environment, and have security be at the forefront. That’s what’s now possible on Retool’s enterprise AppGen platform—try it out for free today.

Reader

Keanan Koppenhaver
Keanan Koppenhaver
Technical PMM @ Retool
Keanan educates the community about how they can use low- and no- code tools to transform their day-to-day work, even if they wouldn’t consider themselves a “developer.” He writes about AI and LLMs.
Related Articles
Copied