Prompt effectively
Tips for writing better prompts
Automatically improve your prompt
Bolt has a built-in feature to help you create better prompts:
- Write your prompt in the prompt box.
- Click Enhance prompt
. Bolt generates a recommended prompt, which you can then edit.
Prompting tips
For more detail, a Bolt user has written a great Guide to Bolt.new Prompting.
Some quick tips:
- Start with the application architecture, including your choice of tools, frameworks, and so on.
- Add individual components and features, one by one.
- Add in details in each component with small, specific prompts.
- Be explicit about what should and shouldn’t change. You can tell Bolt to change or not change specific files. When possible, refer to specific elements, classes, or functions to guide Bolt to the exact place where you want the changes made.
Troubleshooting prompting
Some tips for resolving common issues.
Bolt didn’t do everything you asked it to do in your prompt
Break your changes into smaller pieces. Ask the AI to do one thing at a time.
- Make a change.
- Check if the change works.
- Move to the next feature.
Bold forgets what you told it earlier in the same chat
The context window isn’t infinite.
A way to preserve context while keeping the context window small is to get the AI to summarize the conversation so far, then reset the context window. Refer to Reset the AI context window for instructions.
Customize the project and system prompts
The project and system prompts are additional messages sent to the AI model, telling it how to behave, and providing additional context. This is useful if you always want the AI to behave a certain way.
Project versus system prompts:
- The project prompt is specific to your current project.
- The system prompt applies to every project.
Update the prompts:
- Open the menu by hovering over the left side of the screen or clicking Open sidebar
. If you want to update a project prompt, you must be in the project. You can’t update the prompt while Bolt is thinking and the project is building.
- Click Settings > Knowledge.
- Update the Project Prompt or Global System Prompt.
- Click Save prompt. Bolt confirms whether the prompt updated successfully.
Here’s an example, from Bolt’s Vite React starter project: