Any tips for asking ChatGPT coding questions?

These days I keep asking GPT when I'm writing code, but sometimes it spouts nonsense and it pisses me off lol

How do you all write your prompts? Can I just paste the whole error message?

by 알고리즘고수122

8 answers

Pasting the full error message is the baseline, but it's much better if you add one line before it about what you're trying to do.

by 카페인중독74 · ▲0

This is right lol

by 클라우드러버424 · ▲0

Make sure to specify the language and version. For example, 'Python 3.11, pandas 2.0'. Otherwise, it'll respond with outdated syntax and spam import errors. Also, when providing code, reduce it to a minimal reproducible example, and include both the part that doesn't work and the expected result—then the nonsense drops significantly.

by 스타트업러357 · ▲0