Context is the background you hand the AI so it can answer for your situation, not a generic one. This guide explains why context matters so much, what kinds are worth giving, audience, purpose, examples, and limits, and how it helps keep the AI honest.
Debug Helper
Paste code that is not working, along with the error message, and get help finding the likely cause and a suggested fix you can understand.
Make it yours
Fill in the boxes and the prompt updates as you type. Then copy it and paste it into your AI tool of choice.
The behaviour you were aiming for
What you see instead, including anything odd
Copy the full error if you have one. If there is none, write "no error, only wrong output".
Paste the code that is misbehaving
Your prompt
My code isn't working and I'd like help fixing it. Here's what I expected it to do: it should add up the numbers in the list and print the total Here's what actually happens: it prints 0 every time, no matter what's in the list Here's the error message I'm seeing: TypeError: unsupported operand type(s)... And here's the code: Paste your code here Please explain what's most likely going wrong and why, in plain English. Then suggest a fix and show me the corrected code. If there are a couple of possible causes, list them in order of how likely they are.
Tips
Pasting the full error message, not a shortened version, gives the AI far more to work with. The line it names is where the problem surfaced, but the real cause is often a few lines above, so include some surrounding code too. If the first fix does not work, tell the AI what changed after you tried it rather than starting a fresh question.
What a good result looks like
A plain-English explanation of the most likely cause, a suggested fix with the corrected code, and, where it applies, a short ranked list of other things that could be behind the problem.
Works well with
Related reading
Good prompts tend to share the same three parts. This guide breaks down the anatomy of a well-structured prompt, the instruction, the context, and the format, so you can build strong requests every time instead of hoping for the best.
More Coding prompts
Code Explainer
Paste a snippet of code and get a plain-English explanation of what it does, line by line, with no assumed programming background.
Use this prompt →