With an AI chatbot, the quality of the answer you get back changes a lot depending on how you ask. There’s just one trick: hand over the materials. Just paste what you want to do, what’s happening now, and your actual code, and the answers get dramatically more precise. This article introduces that trick, along with copy-paste question templates.
Tip 1: Ask with the “what you want to do, what’s happening now, the code” three-part set
This is what makes the biggest difference. With only “it doesn’t work, what should I do,” the AI has no choice but to answer with guesswork.
[What I want to do] When I press the button, I want the text color to change
[What's happening now] Nothing changes even when I press the button
[Code]
(paste your HTML and JavaScript here)Ask in this format and the AI gives you a fix tailored to your code. Instead of a generic answer, it can tell you “because your line 12 looks like this”—that’s the biggest benefit of handing over the materials. Conversely, with only “it doesn’t work, what should I do?” you get a long, generic answer listing ten possible causes, which is a lot of work to read through.
Tip 2: Don’t translate the error text—paste it as is
When an error comes up, the right move is to copy the English error message without changing a single character. If you summarize it yourself or translate it, you can actually erase the clues.
I got this error. Please tell me the cause and how to fix it.
Uncaught ReferenceError: changeColor is not defined
at script.js:5
(paste the contents of script.js here)How to read the error text itself is explained here.
TipsDon't panic when an error appearsEven when an error comes up, don’t panic—how to read and look up error messagesTip 3: Ask for a beginner-friendly explanation
When the AI doesn’t know your level, it answers with technical terms mixed in. So saying what you want up front changes how carefully it explains.
- “Explain it so a beginner who just started programming can understand”
- “When you use a technical term, add a one-line note on what it means”
- “Teach it one step at a time, not all at once”
Write this request once at the start of the conversation and it mostly keeps working afterward.
Tip 4: If you don’t get it, keep asking
An AI chatbot’s biggest strength is that the conversation continues. If an answer is hard, don’t end it there—ask back.
- “What’s the ‘argument’ you just mentioned?”
- “Rephrase that in simpler words”
- “Explain it with an analogy”
Unlike a search, you can dig into words you don’t understand until you do understand them—that’s where AI truly shines. You don’t have to grasp it all from one answer.
Conversely, when it’s fixed and running, asking a quick “why did this fix it?” turns the answer into a review on the spot, so you stop making the same mistake.
Tip 5: When the topic changes, ask in a new chat
When one conversation gets long, the AI can get pulled toward the earlier talk and give an answer that’s off from your current question. Once the error discussion is settled and your next question is something totally different—that’s when you should start a new chat (a new conversation) and ask fresh. Just keeping “one topic per conversation” in mind cuts down a lot on answers going astray.
Weak questions vs. strong questions
For the same problem, how much material you hand over changes the answer. Side by side, the gap is obvious.
| Asking it this way is weak | Asking it this way is strong |
|---|---|
| ”It doesn’t work" | "Pressing the button doesn’t change the colour. This error appears in the Console when I press it” + code |
| ”My CSS isn’t applying" | "I set this h1 to red and it’s still black” + both the HTML and the CSS |
| ”Is there a better way to write this?" | "For a beginner, name three things to fix for readability” + code |
| ”Tell me how to add spacing" | "I want space between the text and the edge inside a card. Should I use margin or padding?” |
The point is to write what you expected and what actually happened separately. With both in hand, the AI can narrow the cause from the difference.
Ways AI helps while you’re learning
Beyond troubleshooting, AI has strengths worth knowing. Uses other than “give me the answer” are what change how fast you grow.
- Have it look over your code—paste finished code and ask for “three things to fix for readability.” You get the experience of a code review, any time, for free
- Have it write practice problems—“Make three practice problems that use
display: flex, easiest first. Put the answers at the end.” Faster than hunting for exercises, and tuned to your weak spot - Ask for an analogy—the shortest route when a concept won’t stick. “Explain the difference between relative and absolute paths using an analogy about addresses”
- Help with reading English sources—paste a piece of official documentation and ask for “the three key points, for a beginner.” First-hand information you were avoiding becomes reachable
- Advice on what to learn next—“I can write HTML and CSS. What should I learn next to widen what I can build?”
What’s faster not to ask an AI
Some topics are safer to look up yourself.
- The latest version’s spec and new features—it doesn’t have information newer than what it learned. Official documentation is the sure thing
- Prices and free tiers—these move, and old figures get quoted. Always confirm on the official pricing page
- The fix to an error, when you just want to paste it—paste a fix and you’ll trip on the same error again. Asking “why did that fix it?” is the fastest road in the end
Copy-paste question templates
Here are templates for common situations. Replace what’s inside the ( ) with your own content.
When you want to know what code means
Please explain what this code is doing, line by line, in a beginner-friendly way.
(paste the code here)When you want to know how to write something
I want to (display an image as a circle) with HTML and CSS.
Please tell me how to write it and what it means, in a beginner-friendly way.When you want to know the difference between two things
I don't understand the difference between (margin and padding).
Please tell me the difference and how to use each, with an analogy, in a beginner-friendly way.When you want your answer checked
I made a (self-introduction page).
If there's anything wrong or anything that could be better,
please tell me in words a beginner can understand.
(paste the code here)When you want practice problems
Make three practice problems that use (display: flex), easiest first.
Keep them beginner-friendly and put the answers together at the end.When the result differs from what you expected
[What I expected] (the heading turns red)
[What actually happened] (it stays black)
[What I tried] (saved again / reloaded)
[Code]
(paste the HTML and CSS here)Summary
- A question isn’t an essay. Handing over the materials (code, error text) matters most
- Ask with the “what you want to do, what’s happening now, the code” three-part set
- Don’t translate the error text—paste it as is
- Ask for a beginner-friendly explanation, and if you don’t get it, keep asking
- When the topic changes, use a new chat. One topic per conversation
- Writing what you expected and what actually happened separately narrows the cause in one go
- Use it for reviews, practice problems, and analogies, not only for answers
You get better at asking every time you ask. First, try asking about today’s stumble with the three-part set.