How to troubleshoot when things go wrong

Same.new uses the power of AI, or more specifically: LLMs, to bring your prompts to life. Sometimes, these LLMs may not work as expected. Here are some tips to troubleshoot Same (our AI) effectively.

Reviewing Same’s output (chat history)

In the chat history, you will see diffs of the changes made, files viewed, and commands executed. This helps you understand what Same did and why: When Same generates code or makes changes, it will also provide a summary of what it did. Review this summary to ensure it aligns with your expectations: Always compare the changes with the generated summary to confirm that Same understood your request and executed it correctly.

Reviewing your website

After Same makes changes, check the live preview of your website. This helps you see the actual impact of the changes made. If something doesn’t look right, don’t panic.

Reverting or adjusting changes

If the changes made by Same are not what you expected, you can either:
  1. Give Feedback: Provide specific feedback to Same about what needs to be adjusted.
    The button is too large, and the text color in dark mode is not visible.
    
  2. Revert Changes: If the changes are not satisfactory, you can revert to a previous state of your project. This will restore your project to a known good state, before the changes were made.
Reverting can be a better option if you are looking for better performance and lower costs as it keeps the context window smaller. Alternatively, moving forward and providing feedback allows Same to improve the existing changes rather than starting over. It’s up to you to decide which approach works best for your situation.

Common issues and how to handle them

Sometimes, even with careful prompting, things may not go as expected. Below are some common pitfalls and how to approach each of them when using Same.

Same fails to implement your request (sometimes loops or stalls)

This can happen when the prompt is too broad, contains multiple tasks, or lacks enough context. To resolve:
  • Ask Same to think first. You can prompt Same with:
    Before making any changes, create a plan for implementing this feature.
    
  • Provide context. Use the @ Add context button to include relevant files, code snippets, or summaries (learn more).
  • One task at a time. Break complex changes into small prompts and submit them individually.
  • Create new chats. Starting over with a fresh chat often improves accuracy and reduces confusion, especially if looping occurs.
  • Chat with Same. Feel free to discuss ideas or constraints with Same before requesting implementation. This can surface edge cases or reveal misunderstandings early.

Same breaks or mangles code

If your website breaks, or existing features are accidentally changed:
  1. Revert to a previous state. Reverting avoids compounding the problem and helps reduce token usage in long chats.
  2. Then re-prompt. Try again with a new chat and improved instructions:
    • Add limits:
      Do not modify any existing CSS classes or unrelated components.
      
    • Explain what went wrong:
      You removed the login modal, which wasn't part of the request. Please preserve existing functionality.
      
Starting fresh with better constraints usually leads to better results than trying to repair an over-complicated chat history.

Same uses too many tokens (or gets slow/confused)

LLMs perform best in short, focused conversations. If you’re running into performance issues:
  • Start a new chat. Large chats increase token usage and slow down response quality.
  • Narrow the scope. Provide only the necessary files or summaries with @ Add context (learn more).
  • Be direct. Avoid vague or compound requests. Instead, explicitly state the task and scope.