← Back to AI Basics
AI BASICS · PROMPTING
BeginnerLevel 1

How to prompt AI.

A good prompt is half words, half context. What a prompt actually is, what makes one good, and a structure you can copy for bigger tasks.

7 minTested · July 10, 2026

Overview

By the end of this page, you should be able to write a prompt that gets you the result you actually wanted, often on the first or second try, and understand what separates a good prompt from a bad one.

Prompting is not just the text you give the AI. It is also the context you give it: the files you attach, the examples you show it, the instructions for how you want the work done, and the data and apps it can reach. The words matter, but they are only half of it.

To write this guide, we analyzed about 2,800 of my real prompts to Codex and Claude from the past ten months. Everything in here is a mix of how I actually prompt every day and the best practices from the leading AI companies.

What you need

  • Access to any AI assistant, such as ChatGPT, Claude, or Gemini. The free tiers are fine.
  • One real task to practice on, ideally something you have been having trouble getting AI to do well.

Instructions

  1. 01Step

    Let's define what a prompt is

    A prompt is how you point the AI at what you want: your request, plus any instructions for how to get there. OpenAI's official guide keeps the definition loose: a prompt "can be a question, an instruction, or a goal." There is no one-size-fits-all formula.

    A prompt can be seen as three components that shape what you get back:

    • Your message: the task you are asking for.
    • Your standing instructions: preferences you have saved in settings, like "keep answers short" or "I run a small landscaping business."
    • What it can see: the files you attach, the screenshots you paste, the apps you connect, and anything you tell it to go find.

    That is why two people can type the same words and get completely different results. One asked the AI to "review my budget" with nothing attached. The other attached the spreadsheet, or just said where to find it. Same words, completely different prompt.

  2. 02Step

    State the goal, the context, and what done looks like

    The three big AI companies each published a prompting guide (OpenAI, Anthropic, Google), and what they agree on at the core is what a good prompt is made of:

    • The goal: what should it do, specifically?
    • The context: what does it need to see or know, and where does that live?
    • The result: format, length, audience, level of detail.
    • The boundaries: what to avoid, what must stay unchanged, and when to check with you before acting.

    Not everything needs a long, carefully built prompt though. It depends on the ask. Asking your AI to check your email inbox for unread emails can be a one-liner, but bigger, more important tasks should use the components above.

    Anthropic's guide recommends treating your AI like a brilliant but new employee. It is smart, but it is new, so it does not know your norms, your clients, or how you like things done unless you say so.

    Before you send your prompt, ask yourself: would a colleague reading this with no other context know what to do? If not, the AI will not either.

    Also, skip the tricks. Researchers at Wharton tested them: "act as an expert" personas did not improve factual accuracy, and politeness, tips, and threats washed out to noise.

  3. 03Step

    Now let's transform a vague prompt into a strong one

    Here is the difference in practice, with a task someone at a nonprofit might face. The vague version:

    "Write a thank-you email to the sponsor."

    The AI has to guess which sponsor, what they did, what you want next, and how your organization sounds. You get something generic, then spend three messages fixing it.

    The strong version:

    "Write a thank-you email to the company that sponsored our fundraiser dinner last night. My notes from the event are attached. Thank them for the $5,000 sponsorship, mention that we hosted about 200 guests, and invite their team to visit one of our programs this fall. Keep it under 150 words, warm but professional. Don't ask about next year's sponsorship yet."

    Same task. What changed:

    • The situation and the audience are named.
    • The AI can see the actual notes instead of guessing (if attaching notes is a hassle, pointing to it works too: connect your notes app, and "pull my notes from last night's event from [connected app]" does the same job).
    • "Done" is defined: three specific points, a length, a tone.
    • One boundary is explicit.
  4. 04Step

    Copy this structure for bigger tasks

    To make this easier, here is a helpful structure. When we analyzed our real prompts, this same skeleton kept showing up in our bigger asks, and it lines up with the parts OpenAI, Anthropic, and Google teach. Below is not a checklist, just the shape of a good prompt (skip any line that does not apply).

    When you are giving the AI a longer or more complicated task, copy it and fill in the parts. It takes 30 seconds and should save you from having to correct the AI three times later.

    What I want: [the task and the outcome, in one or two sentences]
    
    What you need to see: [attach the files, paste the notes, or name the source the AI should use]
    
    What done looks like: [format, length, audience, and anything that must be included]
    
    What to avoid: [anything off-limits, plus mistakes you have seen AI make on this before]
    
    Before you act: [for big or risky tasks: "show me a plan first and wait for my go-ahead"]
  5. 05Step

    Turn good prompts into standing instructions

    Want to take this to the next level? Notice when you keep repeating yourself: the same background, the same preferences, the same setup before every ask. That is the signal to turn a prompt into something reusable. Every major AI tool gives you layers for this:

    • Custom instructions: account-wide preferences that apply to every chat. Who you are, what you do, how you like answers.
    • Projects: a workspace for one client, topic, or job, with its own files and instructions that stay out of your other chats. We walked through Claude Projects in an earlier issue; ChatGPT has the same idea.
    • Memory: facts the AI saves automatically as you go. Useful, but review what it has saved now and then.
    • Skills: a reusable set of instructions that tells the AI how to act in particular situations. Unfamiliar with skills? Ask the AI itself to help you create one in Claude, Codex, or ChatGPT: tell it what you keep asking for, and it will write the skill with you.

    My rule: the third time I type the same preference, it moves up a layer. A phrasing I keep reusing becomes a custom instruction. A client's background becomes a project. The prompt gets shorter because the context is already loaded.

    You can even make the AI do this housekeeping: ask it to look back at your recent chats, spot what you keep repeating, and suggest what should become a saved instruction.

  6. 06Step

    How I prompt AI agents

    Chat tools answer you once. But AI agents, like Codex and Claude in their agent modes, can open files, use tools, and keep working for minutes or even hours. That is where context becomes a necessity: the agent needs the right information to make the right decisions. Three techniques show up over and over in my real prompts:

    • Ask for a plan before it touches anything. For basic asks I skip this. But for anything semi-complex, my most repeated line, by far, is some version of: "Don't make any changes right now. I just want you to plan and think with me." A plan is easier to approve than finished work is to undo, and when the agent is done, you can check the result against the plan. The tools support the habit directly: Codex has a /plan command and Claude's agents have a plan mode, or you can simply say it in the prompt.
    • Point, don't paste. I almost never retype context. I name the file, tell the agent to pull my notes through a connector (a connected app; ChatGPT calls them apps), or capture the window I am looking at. In the ChatGPT desktop app on Mac, where Codex now lives, tapping both Command keys captures the app in front of me so I do not have to describe what is on my screen (OpenAI calls this Appshots).
    • Dictate, then land the ask. I speak most prompts instead of typing them nowadays, and you should too. If you worry that you take too long to form your thoughts, leave dictation running and talk it out; it is still faster than thinking, then typing. Speaking lets me give the agent two paragraphs of real context in the time typing would give it two sentences. On a Mac, press Command+D to dictate inside Claude. In Codex, press Ctrl+Shift+D. If your shortcut differs, click the microphone button. For every other app, I use Wispr Flow, a dictation app that works in any text box. My dictated prompts tend to ramble, but that is fine. The rambling is more context. An important rule to remember: end with a single clear sentence that says exactly what you want back.
  7. 07Step

    Treat it like a conversation, not a slot machine

    OpenAI's guide has a line worth framing: "Your first prompt doesn't need to be perfect." When the output misses, do not start over and re-explain everything. Name the specific thing that is wrong and trust the AI to keep the rest: "The tone is right, but cut the second paragraph, it repeats the first."

    And know when to fold. If two or three corrections have not fixed a problem, more arguing rarely does. I start a fresh chat with a better brief, or ask the AI to summarize the task so I can hand it to a new session. A clean start with a sharper prompt beats round eight of a fight.