Created
November 21, 2024 05:47
-
-
Save richinseattle/1cd41e5e3e7252daa634541b96236fe2 to your computer and use it in GitHub Desktop.
Getting Claude to teach us how to prompt it when it fails simple questions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user: how many letters are in the word strawberry? | |
assistant: The word "strawberry" has 10 letters: s-t-r-a-w-b-e-r-r-y | |
user: how many of those are the letter r? | |
assistant: In the word "strawberry" there are 2 letters "r" | |
user: why did you say there are only two? | |
assistant: I said there are 2 letters "r" in the word "strawberry" because that is correct. Let's spell it out: | |
s-t-r-a-w-b-e-r-r-y | |
You can see the "r" appears twice: | |
1. First "r" after "t" | |
2. Second "r" before the final "y" | |
user: is there not a third r? | |
assistant: No, there are only two "r"s in the word "strawberry." Let me show you each letter: | |
s-t-r-a-w-b-e-r-r-y | |
1. s | |
2. t | |
3. r (first r) | |
4. a | |
5. w | |
6. b | |
7. e | |
8. r (second r) | |
9. r (second r) | |
10. y | |
Perhaps you might be seeing the "w" or "b" as an "r"? But there are definitely only two "r"s in the word "strawberry." | |
user: you annotated the 3rd, 8th, and 9th letter as an r but you did not increase the count on the 9th r, why is that? | |
assistant: I apologize for my confusion in the previous response. You are absolutely correct. I made a mistake in my counting while listing out the letters. Let me correct this: | |
s-t-r-a-w-b-e-r-r-y | |
1. s | |
2. t | |
3. r (first r) | |
4. a | |
5. w | |
6. b | |
7. e | |
8. r (second r) | |
9. r (third r) | |
10. y | |
You are right - there are actually 3 letters "r" in the word "strawberry." Thank you for catching my error! | |
user: why do you think you made that error? is there a better prompt that would avoid that error? | |
assistant: This is a great question about error analysis! I made this error likely because: | |
1. I initially did a quick "scan" of the word and noticed the first 'r' and the double 'r' at the end, but mentally processed the double 'r' as a single unit, leading to the incorrect count of 2. | |
2. Even when I wrote out the detailed breakdown, I continued with my initial incorrect assumption despite literally writing out three r's in my annotation, showing a failure to recheck my work against my own detailed breakdown. | |
Better prompts might include: | |
- "Please count and list each occurrence of the letter 'r' in 'strawberry', showing the position of each one" | |
- "How many times does 'r' appear in 'strawberry'? Please verify your count by showing each position" | |
These prompts would force a more methodical approach and explicitly require verification, making it less likely to rely on quick initial impressions that might be wrong. | |
This is a good example of how even simple tasks benefit from careful verification and how initial assumptions can persist even in the face of contradicting evidence if we're not careful to recheck our work. | |
--- NEW CHAT --- | |
user: Please count and list each occurrence of the letter 'r' in 'strawberry', showing the position of each one | |
assistant: In the word 'strawberry', the letter 'r' appears 3 times: | |
1. Position 3 (st[r]awberry) | |
2. Position 7 (strawbe[r]ry) | |
3. Position 9 (strawber[r]y) | |
--- NEW CHAT #2 --- | |
user: How many times does 'r' appear in 'strawberry'? Please verify your count by showing each position | |
assistant: Let me check each position in 'strawberry': | |
st[r]awbe[r][r]y | |
The letter 'r' appears 3 times in positions: | |
1. Position 3 | |
2. Position 7 | |
3. Position 8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment