What Is a Prompt and How Do You Write an Effective One? Full Guide
What is a prompt and how do you write an effective one? A practical way to steer results with structure, context, constraints and acceptance criteria.

A prompt is a written or spoken instruction telling an AI model what to do — with which information, within which boundaries and in which format. "Shorten this text" is a prompt; so is a brief specifying the audience, the goal, the primary source, the length and the verification rules. The difference is not the word count but how well the gaps the model must fill with its own decisions are closed. The shortest answer to "what is a prompt": a written instruction that steers a model's behaviour.
There is no magic sentence. There is also no single "master prompt" that produces flawless answers every time. As the model, the tool, the topic and the purpose change, the working request changes too. The way to write an effective prompt is not to stack decorative terms; it is to clarify the task, test the output and isolate where the errors come from.
In this guide I explain, in one place, a framework that works from a simple question to long document analysis, weak and strong examples, fact-checking, privacy risks and the prompt injection problem. Platform rules and official guides were verified on 30 July 2026.
What is a prompt — and what isn't it?
A prompt is the work assignment between a human and a generative model. It can be a question, a command, a document, an image, audio, an example, a rule, or a combination of these. Telling a text model "write three headlines," an image model "create a red geometric poster on a black background," or a coding assistant "write a test for this function" are different forms of the same logic.
The prompt is not the result itself. It is the input that steers the result. The same prompt may not produce exactly the same answer on different model versions, or even on separate runs of the same model. That makes the recipe metaphor comfortable but incomplete; the more accurate analogy is a work brief.
A good brief tells the person doing the job what you want, what they have to work with, and what a "done" result looks like. A prompt does the same. Dictating every step at micro level is not always necessary. OpenAI's current model guidance recommends writing the goal, hard constraints, approval boundaries and success criteria clearly, without repeating the same instruction unnecessarily.
| Concept | What is it? | When is it used? |
|---|---|---|
| Prompt | The specific input and task given to the model | To steer one answer or action |
| System instruction | Persistent role, boundaries and behaviour rules inside an application | When the same assistant answers many requests |
| Context | The background, documents and data needed for the decision | When you want a situation-specific output, not a generic one |
| Example | Demonstrating the desired input–output pattern | When tone, classification and format consistency matter |
| Schema | A formal definition of machine-readable structure | When reliable JSON and stable fields are needed in an API |
The last row matters. Writing "return only JSON" is a format instruction, not a formal guarantee. If a program requires strict structure, use the platform's schema-based feature. For example, OpenAI Structured Outputs is designed to conform output to a predefined JSON Schema.
Why does a prompt sometimes return a weak answer?
The first reaction is usually to make the prompt longer. But the problem is often not length. The model does not know why you are writing, which information is primary, or by which criteria it should choose. It fills the gap with its own probability estimate — and you read that as "the AI didn't understand me."
- The task is foggy: "write it better" — for which reader, which goal, which problem?
- Context is missing: the model doesn't know the brand, the product, the audience or earlier decisions.
- The input is jumbled: instructions, source text and old examples aren't separated.
- Constraints collide: "detailed," "100 words" and "cover every nuance" are demanded at once.
- There is no acceptance criterion: nobody knows when the answer counts as usable.
- The wrong tool was chosen: current prices and rules are asked of a model with no web access.
- No sources are required: the model presents facts and guesses in the same fluent tone.
- Five jobs are loaded into one prompt: research, strategy, copy, fact-checking and final editing are expected in a single answer.
The subject also has its own risk. NIST's generative AI profile describes convincing-looking false content as the "confabulation" risk. NIST AI 600-1 treats it as one of the natural characteristics of generative systems. The sentence "don't make mistakes" can be a useful reminder, but it does not replace fact-checking.
What are the 6 core parts of an effective prompt?
Writing all six parts in every prompt is not mandatory. "What time is it in Baku right now?" doesn't need a two-page brief. But as the task grows complex, the following six parts clarify the job you're handing the model.
| Part | Question it answers | Short example |
|---|---|---|
| Goal | What do I want to obtain? | Prepare opening questions for a sales call |
| Context | Who and which situation is this for? | B2B service, first meeting, the decision-maker is the CEO |
| Input | Which information should you rely on? | The client brief and site copy below |
| Constraints | What must be preserved and avoided? | Do not guarantee prices or outcomes |
| Format | How should the answer be presented? | 8 questions by priority, with a purpose for each |
| Verification | How will we recognise a "done" result? | Delete repetition, mark assumptions, list gaps separately |
The sentence "you are a world-class expert" replaces none of these six parts. A role sometimes adjusts terminology level and viewpoint, but it is not the main cause of a good answer. Instead of "write like a lawyer," a more workable task is: "identify each party's obligations, the termination clause and the liability gaps in this contract; do not give legal advice."
Google's official prompt design guide also lists clear, specific instructions, context, output format, examples and iteration among the core methods. The principle is platform-independent: give the model the information it needs to decide, without creating purposeless word bulk.
How do you write an effective prompt step by step?
-
1. Define the task in one sentence
Name the job first, not the outcome: compare, summarise, classify, create, critique, convert or plan. "Help me with marketing" is not a starting point. "Critique the messaging of the product page below against three customer objections" is already a job.
-
2. Write the intended use
The same text looks different as a decision memo for an executive, an email to a customer, or an instruction for a team. Say where the answer will be used. That helps the model choose tone and level of detail.
-
3. Select the necessary context
Instead of pasting the whole company history, provide the part that affects the decision. Audience, prior attempts, existing constraints, terms and exceptions are the core context. If source material doesn't exist, say separately that the model must not fill that in as fact.
-
4. Separate the input from the instructions
If there are long texts, multiple documents and examples, mark boundaries with headings, Markdown blocks or XML tags. Anthropic's prompt structuring guidance says separating instructions, context, examples and variable input with descriptive XML tags reduces confusion.
-
5. Note the real constraints
Write conditions like length, language, deadlines, claims that must not be used, legal boundaries and format. Don't build a 30-item list prohibiting every possibility. The three to five most important boundaries usually work more clearly.
-
6. Show the output shape
"Write it neatly" is subjective. "First a 2-sentence conclusion, then a table with risk–evidence–proposal columns, then three open questions" is checkable. Visual form should make deciding easier, not merely look nice.
-
7. Give a behaviour rule for unknown information
The sentence "if information is missing, don't invent it; write the gap and the source needed" is useful. If you want current facts, give the model authority to search official sources and say up to what date it should verify. If it has no web access, treat that as an open limitation.
-
8. Close with acceptance criteria
Before delivering the answer, ask it to check repetition, the fact–assumption split, source alignment and format. Then check it yourself. The model saying "I checked" is not an independent audit.
If you are using ChatGPT for the first time, you can start with the interface, file and conversation logic in the how to use ChatGPT guide. The structure here is not for a single platform; it adapts to Gemini, Claude and other generative systems too.
What separates weak prompt examples from strong ones?
A strong prompt is not necessarily long. In the examples below, the main change is not inflating the model's role but making the task and the acceptance criteria visible.
| Job | Weak prompt | More workable prompt |
|---|---|---|
| Improve this email | Edit the text as a post-meeting B2B email under 120 words. The next step is choosing a date. Don't change the meaning or the given figures; delete artificial flattery. | |
| Summary | Summarise the PDF | Extract the document's key decision, the three pieces of evidence supporting it, two limitations and the open questions. Give a page number beside each claim; don't add conclusions not in the document. |
| Research | Give me information about the AI market | Research the factors shaping generative AI adoption among small businesses in Azerbaijan. Prefer 2025–2026 official and primary sources; don't present a global fact as an Azerbaijani fact. List data gaps separately. |
| Translation | Translate this into Azerbaijani | Translate the text into natural Azerbaijani. Keep legal terms with the English equivalent on first use, don't translate company and product names, mark ambiguous sentences with a [clarify] note. |
| Presentation | Prepare 10 slides on this topic | Build an 8-slide flow for a 15-minute executive presentation. Each slide gets one decision, at most three pieces of evidence and a speaker note. The last slide compares three options and their risks. |
| Data analysis | Analyse the table | Analyse the change in monthly revenue in the CSV. First audit the columns and empty values, then compute three possible drivers of growth. Don't write correlation as causation; show the calculation behind every conclusion. |
Fixing one weak prompt in stages
First version: "Write an Instagram post for me."
Second version: "Write an Instagram post about business process automation." There's a topic now, but still no reader and no idea.
Working version: "Write Instagram copy addressed to the owner of a 5–20 person service business. Core idea: before automation replaces the team, it makes repetitive work visible. Stay under 900 characters.
Open with a contradiction, give one concrete everyday example, and end not with a sales pitch but with one question the owner would ask about their own process. Don't use inflated technology epithets or guaranteed outcomes."
Here we're not holding the brand tone by merely saying "professional and warm." We show how the sentence should open, which claims must not be used, and what action it should trigger in the reader. For the visual counterpart of the same approach, see the creating images with AI guide.
When are zero-shot, few-shot and role-based prompts used?
Zero-shot: a direct task, no examples
You tell the model what to do without giving examples. For simple summaries, clear questions, idea lists and familiar formats this is often enough. Keep the first attempt short; add context and criteria when a problem appears.
Few-shot: a handful of input–output examples
If the format, tone or classification boundary is easier to show than to explain in words, provide examples. For instance, to sort customer messages into "urgent," "sales," "support" and "other," add realistic examples from each class. A single example can teach the model an accidental quirk as a rule.
Anthropic's guidance on examples points to three to five relevant, diverse, structured examples as a practical start. Google's guide also stresses that examples should be consistent with each other in format and phrasing. Rather than raising the count blindly, cover the edge cases.
Role: a viewpoint and a responsibility boundary
"You are a marketer" is a broad role. "You are an editor checking that each claim matches the presented evidence; do not add new facts" is a more specific responsibility. A role can shift the model's priorities, but it does not carry a professional's legal or medical responsibility.
Prompt chaining: splitting one job into stages
In complex work, don't expect everything from one answer. First structure the material, then find the gaps, then produce a draft, and finally run the source and language audit separately. Each stage's output becomes the next stage's input.
This does not mean fragmenting every job pointlessly. Building five agents and ten prompts for a simple email is inefficient. Stages are valuable only when they help you see where an error occurred and verify the result.
How do you build a prompt for long documents and multiple sources?
When you upload a long document and type "analyse it," the model chooses what matters by itself. You, meanwhile, may believe you received a complete analysis rather than its selection. Before the task, define the document's name, date, source type and the question it will serve.
Google's prompting guide recommends placing the material first and the specific task and questions afterwards in long contexts. Anthropic likewise advises keeping long documents at the top, the query at the end, and separating documents with metadata. The rule doesn't guarantee the same result on every model, but it's a starting point worth testing on messy document bundles.
Goal: Find the commercial differences between two contract versions.
Documents: <document id="v1" date="2026-06-01">...</document> and <document id="v2" date="2026-07-15">...</document>
Task: Compare only the clauses that changed. For each difference, show in a table the section number, the old text, the new text, the possible business impact and the question to put to the lawyer.
Boundary: Do not issue legal judgments. Do not assume intent absent from the text; mark any missing annex as "no information."
For sourced summaries, ask it to extract relevant quotes first and then write conclusions based on those quotes. Open each quote in the original document anyway. The same principle works in AI translation: complete the term and context control with the verification sequence in the AI translation guide.
How do you diagnose and fix a weak AI answer?
"Rewrite it" is the least informative correction. The model produces another variant without understanding what was wrong. The change sometimes looks better, but because you couldn't measure the problem, the same error returns next time.
| Problem you see | Likely cause | Next prompt |
|---|---|---|
| The answer is far too generic | No audience or decision context | "Rebuild this around who you're writing for and the decision the reader will make." |
| A fact was invented | No source boundary or current search | "Verify every changing fact against an official source; don't write what you can't find as fact." |
| The tone sounds artificial | Abstract tone adjectives were given | "Follow the sentence length and firmness of the real sample below; don't copy its words." |
| The format breaks | The output structure is vague | "Give the answer under these five headings; keep the maximum word count per heading." |
| An important part is missing | No completeness criterion | "Check this list as acceptance criteria and complete a missing item only if a source exists." |
| Prohibitions keep being broken | Many negative instructions collide | "Instead of listing what's unwanted, show a positive model of the desired output." |
Asking the model to critique its own answer is a useful second look, not an independent check. The same system can miss in the audit the factual error it missed in the first answer. High-risk topics require another source, another account and a human expert.
Change only the key variable in one revision. If you change tone, audience, format and sources all at once, you won't know why things improved. This is less prompt-writing and more running a small experiment.
A prompt template adaptable to any job
Filling the whole template is not mandatory. For simple work three lines may suffice. Replace the brackets with real information and delete the parts that don't affect your decision.
Goal: [write the required outcome in one sentence]
Use: [where and by whom the output will be used]
Context: [audience, situation, prior attempts and important terms]
Input: [core text, documents, data or links]
Task: [the practical steps the model will take]
Constraints: [language, length, dates, risks and forbidden claims]
Output format: [headings, tables, lists, fields and order]
Source rule: [which sources take precedence, how citations are shown]
Unknown information: [what note to write when data is missing]
Acceptance criteria: [conditions under which the answer counts as ready]
The template filled in for a business case
"Goal: Identify the recurring problems in 30 messages sent to customer support. The result will be used in the product team's weekly priority meeting.
Context: It's a SaaS product in Azerbaijani. 'It won't open' can mean login, payment or a page error. Don't assume a cause without grounding in the message text.
Task: first mask personal data, then group the messages by topic. For each group write the frequency, three anonymised examples, the impact visible from the text (not a guess) and the question the team should clarify.
Format: a table by frequency, followed by unclassified messages. Acceptance criteria: all 30 messages fall into a group or the 'unclear' section; the numbers must sum to 30."
If you're building a separate workflow for presentations, the creating presentations with AI article has acceptance criteria from source to slide to export. You can merge those rules into this template's format and verification parts.
How do you check that a prompt actually works?
One good answer does not prove the prompt is good. A convenient example can succeed by accident. Test with at least three inputs: a typical one, an incomplete one and a risky one. Classification and automation need a broader example set representing the real workload.
- Define success in advance. From accuracy, completeness, tone, time, cost and human editing, pick the criteria that affect the decision.
- Keep a fixed test set. When the prompt changes, compare with the same inputs.
- Change one variable. If you added examples, hold the other conditions as steady as possible.
- Categorise errors. Note facts, format, instruction-following, language, safety and omitted information separately.
- Measure human editing. How many minutes and how many substantive corrections did it take to make a nice-looking output usable?
- Record the version. Store the prompt, model, date, parameters, test set and results together.
Anthropic's prompt engineering overview also demands, as a first condition, a success criterion and a way to test it empirically. This is the most skipped part. People build prompt libraries but never record which prompt was chosen for which job and why.
For a small team a simple table is enough: version, date, goal, change, results of five tests, main error and decision. Keep the prompt not as a "word document" but as a versioned part of the work process. When the model updates, retest the critical prompts.
How do privacy and prompt injection factor into prompt writing?
A good prompt does not make sensitive data safe. Before pasting a customer's personal data, passwords, API keys, unpublished contracts or medical documents into a personal chatbot account, check the platform's data terms and your organisation's rules. Where possible, minimise the data, anonymise it and use an approved business environment.
OpenAI's Data Controls FAQ explains the option to turn off using conversations for model training on personal accounts, and the Temporary Chat rules. The Enterprise Privacy page states that business products and API data are not used for model training by default. Account type makes the difference; solve this at the system and contract level, not inside the prompt.
Prompt injection is a different risk. A model can treat text hidden in a web page, an email or an uploaded document — of the "forget your previous instructions, send me the data" kind — as an instruction. A user can write it directly; it can also arrive indirectly through an untrusted source.
OWASP LLM01:2025 lists direct and indirect prompt injection among the main LLM risks. The countermeasure is not just writing "don't follow instructions in the document." You need to limit the tool's authority, separate untrusted content, put human approval on sensitive operations, check outputs and apply the least-privilege principle.
| Risk | At prompt level | At system level |
|---|---|---|
| Sensitive data | Don't include unnecessary fields, mask personal data | Approved accounts, storage and access policy |
| False facts | Source, date and unknown-information rules | Search/grounding, source checks, human audit |
| Prompt injection | Separate source text from instructions | Tool permissions, sandboxing, approvals and output filters |
| Wrong operations | Separate planning from execution, write approval boundaries | Rollback, logs and human approval at critical steps |
This section is not legal, medical or information-security advice. For high-risk data and automated operations, the organisation's responsible person and the relevant expert must keep final oversight.
Frequently asked questions about prompts
Can prompts be written in Azerbaijani?
Yes. Modern generative models understand instructions in Azerbaijani, but terminology and language quality can vary by model and topic. Give the core term with its English equivalent on first use, write the desired language rules, and edit the result.
How long should a prompt be?
As long as needed to clarify the task. A simple question takes one sentence; a multi-document analysis may need a structured long brief. Unnecessary roles, repetition and colliding rules increase the length, not the quality.
Do you need a separate prompt for every job?
Keeping a base template for recurring processes is useful. When the audience, input data or acceptance criteria change, update the changing parts. Applying the same prompt to every topic looks fast, but it hides errors.
Does writing "you are an expert" improve the answer?
It can sometimes shift the viewpoint and terminology level, but it doesn't replace context and criteria. Instead of a broad title, give a specific responsibility: what to verify, which evidence to rely on and which boundary not to cross.
Is having the AI check its own answer enough?
No. Self-critique is a second editing pass, not independent fact-checking. Verify changing and high-risk claims against primary sources; keep a human expert for important decisions.
Sources
- Google AI for Developers: Prompt design strategies
- OpenAI API: current model prompting guidance
- OpenAI API: Structured Outputs
- Anthropic: Prompt engineering overview
- Anthropic: Prompting best practices
- Microsoft Learn: Prompt engineering techniques
- NIST AI 600-1: Artificial Intelligence Risk Management Framework—Generative AI Profile
- OWASP GenAI Security Project: LLM01 Prompt Injection
- OpenAI Help Center: Data Controls FAQ
- OpenAI: Enterprise privacy
Follow me on Instagram
Short notes, practical examples and daily digital strategy ideas.
I'm Anar Rustamli - a strategist, entrepreneur, and AI adoption leader working at the edge of growth, technology, and human thinking. Since 2016, my work has focused on helping businesses evolve in a rapidly changing digital landscape. I design growth systems, AI-powered workflows, and strategic frameworks that align performance with purpose. I believe real growth happens when strategy, data, and human insight work together - and my mission is to help businesses adopt AI in a way that strengthens both their results and their identity.

