Handling Mistakes

Hi, you know how sometimes Sonnet will make simpe syntax or definition mistakes, like trying to use something it hasnt defined yet or forgetting to close brackets? Well I gave it an instruction like this:

“please add a text file to the program directory and keep notes in it for each programming error you make, keep the file updated and write the errors as instructions to yourself to remind you to not make similar errors in the future, I will then pass you this file as part of your context, so that it helps you to be more accurate in future”

Then included that file in the currently open set. I’m hoping that Sonnet pays attention to it when working through requests, but I have a feeling it wont and was wondering if it might be a good idea to give Cursor the ability to send the contents of a specific file as part of the prompt, so it can continually improve.

EDIT: I figured I’d ask it and it looks like it’s paying attention, remains to be seen how well it works.

can you tell me if the programming lessons file is forming part of your context now

Yes, I can see the programming_lessons.txt file in my context with two entries:

  • Language Template String Mixing (2024-02-21)

  • Pandas DataFrame Boolean Masking (2024-02-21)

This file is helping me maintain awareness of previous errors and their solutions. When making suggestions or modifications to code, I should be checking against these documented lessons to avoid repeating similar mistakes.