L2U Education

How to Write AI Prompts That Work: 4-Part Formula

Most bad answers from an artificial intelligence happen because your questions are vague. You can fix this by using a four-part prompt formula that covers the job, context, an example, and the format.

The Job

Most bad answers you get from an artificial intelligence come from vague questions. If you ask it to write an email to your landlord, the chat assistant writes something generic and polite. It sounds like a robot because it does not know anything about you. A chat assistant only knows what you tell it.

You can fix this with a recipe made of four parts: job, context, example, and format. Part one is the job. You tell the assistant what role to play and what to do. For example, tell it that you are a polite but firm tenant and direct it to write an email asking your landlord to fix the heater. Now it understands the tone and the task. You can use specific job words such as summarize, compare, rewrite, list, or explain it like you are new to this.

Context

Part two is context. Context includes the information that only you know. In the heater example, your heater has been broken for 6 days. You reported it on the 3rd, nobody came, and the temperature drops below 50 degrees at night.

Context provides most of the quality in your answer. A helpful rule is that if a smart stranger would need to know the information, the artificial intelligence needs to know it too. The job tells it what to do, and the context tells it what it needs to know.

Examples and Format

Part three is an example, which is a step people often skip. If you have a sample of what good looks like, paste it directly into your prompt. You can paste an old email you wrote, a paragraph in your own voice, or a layout you like, and tell the tool to match this style. Examples beat descriptions because telling it to sound like you is vague, but showing it how you write is clear.

Part four is format. You tell the chat assistant the exact shape of the answer you want. You can ask for an answer under 150 words, 3 bullet points, a subject line followed by the email, or a table with two columns. The format decides whether you get an answer you can use right away or one you must fix yourself. Combining these parts makes your prompt longer, but the first answer will be close to done.

Two Bonus Moves

You can use two bonus moves to get better results. First, ask the assistant to ask you questions before it starts writing. You can tell it to ask you anything it needs to know before it writes.

Second, do not start over when the result is not quite right. Instead, reply with the changes you want. You can instruct it to make the text shorter or tell it to make the tone more firm.

Safety Rules and Homework

You must remember two safety rules when using chatbots. Never paste passwords, account numbers, or anyone's private details into the chat. In addition, always check the facts yourself because an artificial intelligence can sound sure and still be wrong.

For your homework, pick one task you would normally do by hand this week. Write out a prompt using all four parts: job, context, example, and format. Then, compare the response to what you usually receive.

Key takeaways

Check yourself

1. Why do chat assistants write generic responses to basic prompts?
2. What rule should you use to decide what context to include?
3. Why is providing an example better than describing your desired style?
4. What is the first bonus move suggested for your prompts?
5. Why must you check the facts in an AI response?