Skip to main content

Prompting guide

To get the best results from an AI, think of your prompt not as a single question but as a comprehensive set of instructions. A well-crafted prompt gives the AI everything it needs to understand your intent and deliver a precise, useful response. Structure your prompts around four fundamental pillars: Persona, Knowledge, Format, and Context.

1. Persona: define the AI's role

The persona sets the tone, style, and expertise level of the response. By telling the AI who it should be, you guide its voice and perspective.

  • What it is: Assigning a specific role or character to the AI.
  • Why it matters: It aligns the AI's output with the intended audience and purpose. A response from a "legal expert" will be more formal and cautious than one from a "creative storyteller."
  • Examples:
    • "Act as a senior software engineer specializing in Python."
    • "You are a professional travel blogger writing for a budget-conscious audience."
    • "Assume the role of a helpful librarian assisting a student with research."

2. Knowledge: provide the necessary information

The AI needs the right raw material to work with. Providing explicit knowledge ensures the response is based on the specific data you care about, rather than the model's general training data.

  • What it is: The specific data, text, code, or facts the AI should use to generate its response.
  • Why it matters: It grounds the AI's output in reality, improves accuracy, and prevents the AI from making up information (hallucinating).
  • Examples:
    • "Using the following customer review, identify the key points of feedback: [paste review here]"
    • "Based on this CSV data of sales figures, what are the top three trends? [paste CSV data]"
    • "Here is an error log from my application. Please diagnose the problem: [paste error log]"

3. Format: specify the output structure

Telling the AI how you want the information presented saves time and ensures the output is immediately usable.

  • What it is: Explicit instructions on the layout and organization of the final response.
  • Why it matters: It provides predictable, well-organized results that can be easily parsed or integrated into other workflows.
  • Examples:
    • "Provide the answer as a JSON object with the keys 'productName', 'features', and 'price'."
    • "Summarize the key findings in five bullet points."
    • "Write the output as an HTML file with a table that includes a header row."

4. Context: the core of effective prompting

Context provides the "why" behind your request — the background, the goal, the constraints, and the overall situation. This is often the most powerful element because it helps the AI understand your true intent and reason through ambiguity.

  • What it is: Background information, constraints, goals, or any other situational details that shape how the AI should approach your request.
  • Why it matters: Without context, the AI responds generically. With context, it responds to your specific situation.
  • Examples:
    • "I'm writing a proposal for a non-technical executive audience. Explain the benefits of switching to a microservices architecture in plain English, avoiding all jargon."
    • "Our company style guide requires an active voice, short sentences, and a maximum reading grade of 8. Rewrite this paragraph accordingly: [paste paragraph]"
    • "I have 10 minutes to present this data to the board. What are the three most important takeaways from the following report? [paste report]"

Putting it all together

Here's a prompt that uses all four pillars:

Persona: "You are an expert B2B copywriter specializing in SaaS."

Knowledge: "Here is our product feature list: [features]. Here is the competitor's landing page copy: [competitor text]."

Format: "Write a 150-word value proposition paragraph followed by three bullet points that each highlight a key differentiator."

Context: "Our target audience is IT managers at mid-sized companies. They are technically savvy but time-poor. We're launching next month and this copy will appear on our homepage above the fold."

Combining all four pillars like this dramatically improves the relevance, accuracy, and usability of the AI's output.

Tips for iterative prompting

Once you have an initial response, treat it as a conversation:

  • Refine: "Keep the same format but make the tone more formal."
  • Expand: "Add a section on pricing considerations."
  • Constrain: "Shorten the second paragraph to two sentences."
  • Challenge: "What are the weaknesses in this argument?"

Iterative prompting often produces better results than trying to write the perfect prompt on the first attempt.