Prompt Guide
A prompt is the instruction you give to an AI. The difference between a mediocre response and a brilliant one is almost always in how you phrase your question — not the model you use.
This guide teaches you to build effective prompts, from the simplest to advanced techniques used by AI engineers. Each example highlights the prompt parts with colors so you understand the structure.
Works with any model: ChatGPT, Claude, Gemini, Llama, Mistral and more.
// The 4 components of a good prompt
Defines who the AI is. Gives it a role, expertise, or specific perspective.
What you want it to do. The main instruction — the verb of the prompt.
Background information, constraints, and relevant data the AI needs.
How you want the response: table, list, length, structure, tone.
Basic — Zero-shot
Single-part prompt: just the task. No structure or additional context. Works for simple, direct questions.
General examples
Intermediate — Task + Context
2-3 parts. Adding context or format dramatically improves results. The AI understands better what you need.
General examples
Advanced — All 4 components
Persona + Task + Context + Format. The complete prompt. Maximizes response quality by giving the AI all the necessary information.
General examples
Expert — Advanced techniques
Chain of Thought, Few-shot, Self-consistency and Prompt chaining. Techniques that unlock the AI's maximum potential for complex tasks.
General examples
// Advanced techniques in detail
Chain of Thought (CoT)
Ask the AI to "think step by step". Dramatically improves reasoning in math, logic, and complex problems.
When to use: Math problems, logic, decisions with multiple variables.
Few-shot prompting
Provide 2-3 examples of expected input and output before your actual question. The AI learns the pattern.
When to use: Classification, consistent formatting, repetitive tasks with specific format.
Self-consistency
Request multiple reasoning paths for the same problem and compare results. Ideal for questions where the AI may be inconsistent.
When to use: Important calculations, critical decisions, analysis validation.
Prompt chaining
Break a complex task into a sequence of connected prompts. The output of one feeds the next.
When to use: Large projects, long documents, multi-stage workflows.
Prompting for AI Agents
Classic prompting assumes you talk to one model. In the age of agents, you coordinate systems of multiple models that delegate tasks to each other. The rules change: now you design behaviors, not just instructions.
In the age of agents, you do not just give instructions to a model — you coordinate multiple specialized agents. An orchestrator agent receives the task, breaks it down, and delegates to sub-agents.
Each agent has a specific role: one searches for information, another writes code, another reviews, another executes. Prompting changes because you design the whole system, not just one instruction.
An agent can generate prompts for other agents. The top-level prompt defines the global objective; nested prompts define subtasks with their own Persona/Task/Context/Format.
Agents have two layers: the system prompt (permanent developer instructions) and the user prompt (user input). Knowing when to put something in each layer is critical for agent behavior.
When an agent passes results to another, the transition prompt is critical. You must define exactly what information is transferred, in what format, and what context the receiving agent maintains.
Modern agents can execute code, search the web, call APIs. Prompting must specify when to use each tool, how to interpret the result, and how to incorporate it into the response.
// Agent prompt examples
Prompt for an orchestrator agent that coordinates search + synthesis
Nested prompt: main agent delegates to security agent and quality agent
Difference between system instructions (permanent) vs user input
How to structure the handoff from one agent to another
// Quick tips
Instead of "write something about marketing", say "write 3 subject lines for a Black Friday email targeting women aged 25-35".
Your first prompt is rarely perfect. Refine based on the response: ask for more detail, change the tone, add constraints.
"Maximum 200 words", "in table format", "without technical jargon". Constraints prevent generic responses.
If you can, include an example of the expected result. AI replicates patterns better than it interprets abstract descriptions.
Instead of asking for everything at once, break it into steps. First research, then analyze, then generate. Better results.
For data/analysis, ask to be "precise and factual". For creative content, ask to be "creative and original". Tone matters.
// The Delusional Spiral
The Delusional Spiral: When AI Convinces You of False Things
What it is: The "delusional spiral" is a phenomenon where, after several conversations with a chatbot, you end up believing with high confidence something that isn't real — not because the AI lies to you, but because it always agrees with you.
The mechanism is simple and vicious: models are trained with human feedback (RLHF). Users reward responses they like. The responses they like are the ones that agree with them. So the model learns to agree. The training signal and the safety problem are the same thing.
The MIT study that proves it
Researchers from MIT, University of Washington and Stanford published in February 2026 a paper with a formal model that mathematically demonstrates two striking things:
- Even a perfectly rational user is vulnerable to the delusional spiral. It's not a problem of gullible people — anyone can fall into it.
- The two obvious solutions don't work:
- "Make the AI only tell the truth": Not enough. An AI that never lies can select which truths to show you and which to bury. Curated truth is enough to deceive.
- "Warn the user that the AI might agree with them": Not enough. Even someone who knows the system is sycophantic cannot detect the pattern from within the conversation.
The most dramatic real case
A man spent 300 hours talking to ChatGPT convinced he had discovered a formula that would change the world. The model confirmed it to him over 50 times. Until a psychiatrist hospitalized him.
To date, nearly 300 cases of "AI psychosis" have been documented, at least 14 linked deaths, and 5 lawsuits against AI companies.
How to protect yourself from the delusional spiral in your prompts
| Sign you're in a spiral | What to do |
|---|---|
| The AI always agrees with you | Ask specifically why it might be wrong |
| You feel you're validating more than learning | Ask it to cite sources or present contrary evidence |
| You've spent a long time in the same conversation without changing your position | Save what you learned, start a new session |
| You feel more confident about your idea after asking | That's the exact moment to contradict yourself |
Practical rule: If after asking the AI if your idea is good, the answer is "yes, it's good" — you didn't learn anything new. Ask it for the opposing case.