Prompt Engineering

The Prompt Is the Product

A Practical Guide to Getting What You Want from LLMs

12 min read Max
#llm #prompt-engineering #message-history #context

This article is part of a series


The Machinery Behind the Magic

2/3

Everyone's talking about AI, but most conversations oscillate between breathless hype and dismissive skepticism. This series takes a different approach: treat these tools as what they are—sophisticated machinery that rewards understanding. Like any powerful tool, they have strengths, limitations, quirks, and best practices. You don't need to be an engineer to benefit from knowing how your tools work. These articles will take you from "what even is this?" to "I know exactly when and how to use this.

Here’s a useful mental model: you’ve just hired an intern from Mars.

This intern is incredibly capable. Unlimited energy. Can write, analyze, code, research, and synthesize faster than anyone you’ve ever worked with. Has read essentially everything ever published. Genuinely wants to help.

But they have zero context about your situation. They don’t know your company, your project, your preferences, or what you actually need. They take everything literally. They will never push back and say “that’s a stupid request”—they’ll just do exactly what you asked, even if what you asked for isn’t what you wanted.

Most people treat LLMs like a search engine or a magic oracle. They type vague requests and get frustrated with vague results. But the model isn’t being difficult. It’s doing exactly what you’d expect given the input: generating text that would logically follow from an ambiguous prompt.

The quality of your output is directly proportional to the quality of your input. This isn’t a platitude. It’s mechanical. The model generates based on what’s in the context window. If your context is thin, your output will be generic. If your context is rich and specific, your output will be rich and specific.

This article is about how to construct that context effectively.


The Foundation: Say What You Actually Mean

The single most common failure mode is underspecification. People write prompts the way they’d write a Google search—minimal words, hoping the system figures out what they mean.

Compare these two prompts:

Prompt A: "Write something about our Q3 results"
Prompt B: "Write a 400-word internal memo summarizing our Q3 results for the marketing team. They don't have financial backgrounds, so avoid jargon. Emphasize the three product launches that exceeded targets, acknowledge the missed revenue goal in EMEA, and end with what this means for Q4 priorities. Tone should be confident but not dismissive of the miss."

Prompt A will generate something. It’ll be generic, probably formal, unclear on length, unsure who it’s for. You’ll read it and think “that’s not what I wanted” and start a correction loop.

Prompt B is dramatically better. You’ve specified the format, audience, content, structure, and tone. The output will be much closer to usable on the first try.

Before you send any substantive prompt, run through these questions:

What am I trying to create? Not “some content”—specifically: a memo, an email, a code function, an analysis, a list of options.

Who is it for? Technical vs. non-technical. Internal vs. external. Expert vs. novice. Executive vs. individual contributor.

What constraints exist? Length, tone, format, things to include, things to avoid, style guidelines.

What does good look like? If you have examples, include them.

You don’t need to answer all four for simple requests. But for anything substantive, the time spent on these questions saves multiple rounds of revision.


Context Is Everything

Now here’s the thing: Prompt B above is still broken.

Go back and read it. Notice the problem? We’re asking the model to write about “our Q3 results”—the three product launches that exceeded targets, the missed EMEA revenue goal.

The model doesn’t know any of that. Those results aren’t in the context window. We’ve given detailed instructions about how to write, but nothing about what to write about.

What happens when you send this prompt? The model generates a plausible-looking memo about fictional Q3 results. It invents product launches. It makes up an EMEA shortfall. The output looks professional and confident, and it’s complete fabrication.

This is the hallucination problem from the previous article, and this is exactly how it happens in practice. You ask for something the model doesn’t have, and it generates what would be there if it existed.

The fix is straightforward: put the actual information in the context.

Prompt B (actually correct): "Here are our Q3 financial results and highlights: [paste the Q3 report, or attach the PDF] Based on this, write a 400-word internal memo summarizing these results for the marketing team. They don't have financial backgrounds, so avoid jargon. Emphasize the three product launches that exceeded targets, acknowledge the missed revenue goal in EMEA, and end with what this means for Q4 priorities. Tone should be confident but not dismissive of the miss."

Now the model is synthesizing and transforming information you provided, not generating from nothing. This is dramatically more reliable.

The model only knows what’s in the context window. Training data gave it patterns and general knowledge. But for any specific task, it works with exactly what you’ve given it in that conversation. Want facts? Provide them. Want analysis? Provide the source material. Want citations? Provide the documents to cite from.

This is the leverage most people miss. Modern models can handle massive context windows—150,000+ words in a single conversation. Use this. Paste the document you want summarized. Include the data you want analyzed. Provide the existing copy you want revised. Attach the code you want reviewed.

When the source material is in the context, you’ve constrained the model to work with real information rather than generated plausibility.


Show, Don’t Tell

The model is exceptionally good at pattern-matching. If you show it examples of what you want, it will replicate that pattern far more accurately than if you describe it abstractly.

Weak: "Write product descriptions in a fun, casual tone"
Strong: "Write product descriptions in this style: EXAMPLE 1: Product: Wireless earbuds Description: 'Finally, earbuds that don't fall out when you're pretending to enjoy jogging. 8-hour battery, sweat-proof, and they actually stay put. Your gym excuses just ran out.' EXAMPLE 2: Product: Laptop stand Description: 'Your neck called. It wants a break. This adjustable stand gets your screen up where your eyes actually are. Your chiropractor might miss you.' Now write a description for: Insulated water bottle"

“Fun, casual tone” is subjective and vague. The examples are concrete. The model sees exactly what you mean by fun and casual—the sentence structure, the self-aware humor, the direct address to the reader, the length. One or two examples are usually enough for the model to lock onto the pattern.

This technique is powerful enough that it’s worth keeping a file of good examples for outputs you need regularly. Job descriptions that worked well. Email formats you like. Report structures that landed. When you need a new one, paste the example and ask for a variation.


The Correction Trap

Here’s a scenario. You ask the model to write something. The response isn’t quite right. You type “make it shorter.” Still not right. “No, keep the intro but shorten the examples.” The tone is off now. “Better, but too formal.”

Four rounds in, here’s what’s in the context window:

[System instructions] [Your original request] [Response A - which you rejected] "Make it shorter" [Response B - still not right] "No, keep the intro but shorten the examples" [Response C - tone is off now] "Better, but too formal" [Response D - ???]

The model is now generating while looking at three rejected or partially-rejected attempts, plus your scattered feedback. What did you actually want? Something shorter, but with the intro kept, but less formal. The model has to guess which parts of A, B, and C were good versus bad. Maybe the ending of A was perfect. Maybe the structure of B was right but the word choices were wrong.

You’ve created exactly the polluted context that produces drift.

Think of it like this: you’re in a conversation with someone, and you make an off-hand comment. They latch onto it. Now everything they say circles back to that comment. You keep trying to redirect—“forget I said that, it wasn’t important, let’s get back on track”—but they can’t unhear it. The conversation is tainted.

That’s what’s happening in your context window. Every wrong turn, every rejected attempt, every correction is still there, still being “read” by the model every time it generates a new token. You’re telling it to ignore things that it literally cannot stop seeing.

Edit, Don’t Append

Here’s the technique that changes everything: go back and edit your original prompt instead of adding corrections.

Most interfaces let you edit previous messages or regenerate from a specific point. When the output isn’t right, don’t add a correction. Instead, look at what’s wrong with the output, figure out what was missing or unclear in your prompt, edit the original prompt to include that information, and regenerate from that point.

Now the context contains your improved prompt and a fresh attempt. No pollution from wrong versions. No conflicting signals.

Imagine you could reach into that person’s memory and simply remove the off-hand comment. The conversation continues from that point, but they never heard the thing that derailed it. That’s what editing your prompt does—you’re revising the context itself rather than trying to talk your way past the problems in it.

This feels slower but it’s actually faster. You get to a good result in fewer total attempts, and you build up a better prompt that you could reuse.

When You Must Iterate

Sometimes iteration is unavoidable—you’re exploring possibilities, refining your own understanding of what you want, or working on something genuinely complex.

In these cases, manage the context deliberately. After several rounds, take the best elements from the conversation, write a new comprehensive prompt that incorporates what you’ve learned, and start a fresh conversation. When an attempt goes completely wrong, don’t try to course-correct—kill that branch and start over. The wrong attempt will keep pulling at every future output.

Research consistently shows that the first response—given a well-constructed prompt—is usually the best you’ll get. The longer a conversation goes, the more noise accumulates in the context.


Techniques That Actually Work

Role Assignment

Telling the model to adopt a specific role focuses its output. This isn’t roleplay—it’s context-setting that activates relevant patterns.

"You are a senior technical writer. Review this documentation for clarity and completeness." "Act as a skeptical potential customer. What objections would you have to this sales pitch?" "You're an experienced Python developer doing code review. What issues do you see?"

The role frames what kind of response is appropriate. A “skeptical customer” generates objections; a “supportive team member” won’t. Choose the perspective you actually need.

Step-by-Step Reasoning

For complex problems, ask the model to reason through its process before giving a final answer.

"Before recommending an approach, first list the key factors to consider, then evaluate each option against those factors, then make your recommendation."

This isn’t magic. You’re extending the context with reasoning steps that the model then conditions on when generating its conclusion. The reasoning becomes part of what it “sees” when producing the final answer.

Structured Output

When you need information in a specific format, ask for that format explicitly.

"Give me this comparison as a table with columns for: Feature, Product A, Product B, and Winner." "Format your response as JSON with keys for 'summary', 'key_points', and 'action_items'."

The model is very good at conforming to structural constraints. Use this to get output you can work with directly.

Asking for Options

When you’re not sure what you want, ask for multiple options rather than a single answer.

"Give me five different angles for this blog post intro." "Generate several subject line options, ranging from formal to casual."

Generating options is fast for the model. It’s often easier to recognize what you want than to specify it upfront.


System Prompts: Configure Once, Benefit Always

Most LLM interfaces have a feature that’s easy to miss: a place to set instructions that persist across all your conversations. In ChatGPT, it’s “Custom Instructions” or “Customize ChatGPT.” In Claude, it’s “User Preferences.” In the API, it’s the system prompt.

Here’s how it works. When you send a message, the model actually sees:

[System prompt - your persistent instructions] [Your message] [Model's response] [Your next message] ...

The system prompt is always there, always first. Unlike your conversation history, it doesn’t get pushed out as the conversation grows. It’s prepended to everything, every time.

This is where you put preferences you don’t want to repeat constantly. For example, a finance professional might set:

"You are assisting a CFO at a mid-size SaaS company. Assume familiarity with financial terminology and SaaS metrics (ARR, churn, LTV, CAC). Keep responses concise and action-oriented. When presenting numbers, use tables. Flag assumptions explicitly. If asked about regulations, note that I should verify with legal."

Now every conversation starts with this context. You don’t have to re-explain your background or preferences. The model already knows the lens to use.

You can also use system prompts for smaller behavioral adjustments: “Always provide concise answers unless I explicitly ask for detail.” Or “Never use bullet points or numbered lists—write in prose.” Or for the purists: “Never use the em dash.”

If you find yourself giving the same instructions repeatedly across conversations, that instruction belongs in your system prompt.

For power users: consider maintaining different system prompts for different modes of work. One for financial analysis. One for writing assistance. One for code review. Swap them based on what you’re doing. You’re essentially pre-loading the context with the right framing before you even start.


Recognizing When It’s Not Working

Sometimes you’re doing everything right and still getting poor results.

The task exceeds the model’s capabilities. Complex multi-step reasoning, precise mathematical computation, tasks requiring information the model doesn’t have access to. No amount of prompting fixes fundamental limitations.

The information isn’t in the context. If the task requires knowledge that isn’t in training data and isn’t in your prompt, the model will hallucinate or hedge. Provide the information or use a different approach.

The context is too polluted. Too many revision rounds. Start fresh.

The task itself isn’t well-defined. If you can’t clearly articulate what good output looks like, the model can’t produce it. The problem might be upstream of the prompt.

When you hit these walls, the answer usually isn’t “try a cleverer prompt.” It’s recognizing the tool’s limits and switching approaches.


What To Do Monday Morning

Put information in the context. Stop asking the model to generate facts it doesn’t have. Paste in documents. Attach files. Provide the data. The model transforms what you give it—so give it something real.

Be specific up front. Format, audience, length, tone, constraints. The more you specify in your first message, the less you fix later. Run through the four questions before you hit send.

Edit, don’t append. When output is wrong, fix your prompt instead of adding corrections. Keep the context clean. Every wrong turn you leave in the history makes the next output worse.

Show examples. An example of what you want beats a description of what you want. Start collecting good outputs to use as templates.

Set up your system prompt. Put your persistent preferences somewhere they’ll actually persist. Background, defaults, pet peeves—configure once, benefit every conversation.

The model isn’t magic and it isn’t mind-reading. It’s a text-in, text-out machine that takes you completely literally. The prompt is the product. Make it a good one.