What is prompting?

Prompting is how you communicate with Same to build your project. Treat a chat as a conversation with Same, where every message is a prompt. Remember, Same is not a human, so it is important to be clear and concise in your prompts.

Simple prompts

Each prompt should relate to a single task or change. This helps keep Same focused on a single task and improves the quality of the output. Instead of: “Rebuild the entire dashboard with a new design and add analytics.” Try:
  1. “Update the color scheme using these hex codes: #…”
  2. “Refactor the dashboard Card component to use Tailwind CSS.”
  3. “Add a chart component here to display user signups.”
  4. “Add analytics tracking for button clicks.”
This helps Same focus and makes it easier to review changes.

Simple chats

Start new chats frequently. Treat each chat as a single task or feature. Benefits:
  • Cost Control: Prevents context windows from becoming too large, reducing token usage.
  • Accuracy: Keeps Same focused on the current task without confusion from old context.
  • Debugging: Makes it easier to isolate issues within a shorter history.
When to start a new chat:
  • After completing a feature.
  • When switching to a significantly different task.
  • If the chat history becomes very long or Same seems confused.
Use the “New Chat” button ( icon, top-right in chat panel) to start fresh.

Be specific

Here is an example of a prompt that is not effective:
the dropdown menu isn't working and the button should be green
This prompt has several issues:
  1. Did not provide context on which dropdown menu isn’t working.
  2. Did not describe what specifically isn’t working.
  3. Added another bug report along with it.
When prompting Same, it is paramount to provide as much context as you can, while keeping your prompt lean of any extraneous details (such as the second bug report in the example). Here is a better version of the prompt:
The "choose provider" dropdown doesn't expand when I click on it. Could you fix this?
With this prompt, we provided the exact dropdown that isn’t working and mentioned how it isn’t working. We also provided a note to Same that we would like it to fix the issue, which communicates our intent clearly.

Things Same should not be asked to do

To avoid unnecessary errors or confusion, keep in mind:
  • Do not ask Same for token estimates.
    Same does not have access to internal token counts and any guess would be unreliable. You can keep an eye on your token usage by clicking on your profile icon or going to the settings page (learn more).
  • Do not ask for downloadable ZIPs.
    While Same can generate or modify files, packaging and serving a ZIP is outside its capabilities. Instead, use the download button in your project (learn more).
  • Do not ask Same to revert files or changes.
    Use the built-in version control system for reverting to previous states. This is more reliable and keeps the chat focused.

Providing context

While Same can search your codebase on its own, providing context directly will help same better understand your needs.
  • Links: Provide URLs to documentation, examples, or inspiration.
    Use the styling from this example: https://ui.shadcn.com/docs/components/button
    
  • Files & Summaries: Use the @ Add context button in the chat input.
    • Select specific project files Same needs to read or modify.
    • Include summaries of previous relevant chats.
  • Conversation History: Refer to previous messages or decisions within the current chat.
Using @ Add context is more efficient than asking Same to search for information.
Screenshot showing the '@ Add context' button in the chat input area.

Use the '@ Add context' button to include files or summaries in your prompt.

Guiding Same’s actions

Usually, prompts are handled as a one-shot action, where Same will attempt to complete the task in one go. When working with complex tasks, it might be helpful to guide Same through the process step-by-step. For example, you could use the phrases like:
  1. “Create a plan for implementing the new user profile feature.”
  2. “Investigate and provide a report for the bug in the payment flow.”
  3. “What are three ways we can improve the performance of this page?”
This instructs Same to think and plan before proceeding with the expected action.

Reviewing and iterating

Same shows code changes (diffs) and updates the live preview.
  1. Review Diffs: Check the tool invocation blocks to see what code changed.
  2. Check Preview: Verify the visual changes in the live preview panel.
  3. Give Feedback: If needed, tell Same what to adjust. Be specific.
    Make the button smaller and change the text color to white in dark mode.
    

Editing your messages

If you need to change a previous instruction:
  1. Hover over your message.
  2. Click the pencil icon.
  3. Edit the text.
  4. Submit the changes.
Same will process the updated instruction. You may be asked if you want to revert the project state to that point, which would clear subsequent messages.
Screenshot showing the edit icon appearing on hover over a user message.

Click the pencil icon on hover to edit a previous message.

Reverting when things go wrong

It is important to keep in mind that generative AI, including Same, is not perfect. It may make mistakes or create unwanted changes. If this happens, you can always revert your project to a previous state or check out our troubleshooting guide.