Structure your requests with the 4 ingredients - context, task, constraints, format - to get genuinely useful answers.
Open this lesson in KodokonA prompt is simply the message you send to the AI: your question, your request, your instructions. It is the only lever you have, and it is decisive: the same AI can produce a mediocre or an excellent answer depending on the quality of the prompt. The rule is the same as with a human: a vague request gets a vague answer. Let's compare.
Explain loops to me.Faced with this prompt, the AI has to guess: loops in which language? For what level? In one line or in ten pages? With or without examples? It will pick average answers to all these questions, and you will get a generic explanation, neither tailored nor memorable. Now let's add the missing information.
CONTEXT: I'm a complete beginner in programming. I know variables and if/else conditions in JavaScript, nothing else. Loops are a totally new concept for me.
TASK: explain what a loop is and what it's for, with an everyday-life analogy, then a single ultra-simple example in JavaScript, commented line by line.
CONSTRAINTS:
- Simple vocabulary, every technical term defined at its first appearance.
- Maximum 15 lines of explanation.
- Show only one type of loop for now.
FORMAT: 1) the analogy, 2) the commented example, 3) a question to test my understanding.This second prompt contains the 4 ingredients of a good request. The context: who you are, what you already know, what you don't know yet - this is what allows for an answer at YOUR level. The task: what you expect, with a precise verb (explain, compare, correct, quiz…). The constraints: the limits of the answer (length, vocabulary, what NOT to do). The format: the expected shape (list, numbered steps, table, closing question…).
CONTEXT: I'm a beginner in [topic]. Here's what I already know: [what you know]. Here's what's blocking me: [your difficulty].
TASK: [explain / compare / correct / ask me questions about] [the precise concept].
CONSTRAINTS:
- Adapt to my level, define every technical term.
- Don't give me the full solution: guide me step by step.
- [maximum length, language, other limits]
FORMAT: [numbered list / explanation + example / question-and-answer], and end with a question that checks my understanding.One last essential point: a prompt is not an exam you have to pass on the first try. A conversation with an AI is iterative: if the answer is too complicated, reply "rephrase it more simply"; too long, "sum it up in 5 lines"; off topic, add the missing context. Each follow-up refines the result. The best AI users are not those who write a perfect prompt, but those who hold a dialogue.