DEV Community

Siddhartha Ghosh
Siddhartha Ghosh

Posted on

AI asked for one broken JavaScript line. I handed it to the whole kitchen.

😅 More tokens, more chaos. Now I share only the bug, error, and goal. What’s your best trick for giving AI the right context?

Sign in to view linked content

Top comments (1)

Collapse
 
codekithub profile image
CodeKitHub

Great point. I’ve also found that giving AI too much context can sometimes make the result worse.

For debugging, I usually try to provide only the essential parts:

  • the error message
  • the expected behavior
  • the smallest reproducible example

A focused context often helps AI reason better than a huge codebase dump.