Learn AI compute, then follow the market
← Back to Compute College

Compute College

What is prompt engineering?

How clear instructions, examples, constraints, and output formats help an AI model complete a task.

Plain-English definition

Prompt engineering is writing the instructions that tell an AI model what to do, what information to use, what rules to follow, and what a useful answer looks like. A prompt may include the task, background, constraints, examples, format, and acceptance criteria. It does not retrain the model; it changes the instructions and information supplied for this request or workflow.

Memory trick: Prompt engineering tells the model what job to do and what a successful result looks like.

Why it matters

A capable model can still produce a weak answer when the request is vague, contradictory, or missing necessary information. Prompt design also affects compute economics: longer prompts consume more input tokens, uncontrolled responses generate unnecessary output tokens, and repeated attempts to correct a poor result add more token usage, latency, and cost. The objective is not the longest possible prompt — it is the smallest set of clear instructions needed to produce a reliable result.

  • Clearer requests reduce ambiguity, produce more consistent outputs, and make results easier for software to process.
  • Explicit length and format rules control how many output tokens a request generates.
  • A higher first-attempt success rate removes the retries and human correction time that quietly dominate workflow cost.

Simple example

Consider the request "Review this report." The model does not know what kind of review is needed, who will read it, which risks matter, or what format to produce. A more useful prompt: "Review the attached report for an executive audience. Identify the three most important findings, two material risks, and any unsupported claims. Return a short executive summary followed by a table of findings and evidence."

  • The second prompt names the audience, the task, and the number of findings expected.
  • It states the evaluation criteria, so the model knows what counts as a material risk.
  • It specifies the output format, which makes the result usable on the first attempt instead of the third.

Example figures are illustrative calculations, not current quoted market prices.

Current example

Primary references on prompt design

OpenAI publishes prompt-engineering guidance describing the practice as designing and refining the inputs that guide a model’s response, with clear instructions, relevant context, a desired format, and examples as the levers that improve results. Use these as terminology references; they are vendor guidance, not independent measurements of any specific workload.

OpenAI: prompt engineering best practices

Official guidance on writing instructions, supplying context, specifying format, and using examples.

OpenAI: step-by-step prompt engineering guide

A longer walkthrough of structuring a prompt and refining it against real tasks.

What is cost per million tokens?

The Compute College lesson that converts prompt size and response length into a priced unit.

Source discipline: prompt-design guidance is vendor documentation. Cost and latency effects vary by workload, model, and provider — measure your own before generalizing.

Common mistake

Prompt engineering is not a collection of magic phrases. Instructions such as "act as an expert" or "think carefully" cannot replace missing data, unclear requirements, or a definition of success. Excessively long prompts create the opposite problem: they can introduce contradictions, distract the model from the main task, and increase input-token cost on every call.

Practical takeaway

What you can do with this

Use a repeatable prompt structure — task, context, constraints, output, examples, success criteria — and test it against a small set of representative tasks rather than judging it from one successful response.

  • State the task, supply the context needed to do it, and say what the model must or must not do.
  • Specify format, length, and audience, and show a representative example when formatting or classification matters.
  • Track success rate, input tokens, output tokens, latency, retries, human correction time, and cost per completed task.

Decision check: a prompt is effective when it reliably produces a useful result without unnecessary instructions, tokens, or retries.

Compute College track

Prompt & Context Engineering

Step 1 of 18: What is prompt engineering