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 the practice of designing instructions that help an AI model understand what task to perform, what information to use, what rules to follow, and what the final answer should look like. A prompt can include the task, relevant background, constraints, examples, the desired format, and quality or acceptance criteria. Prompt engineering does not change the model’s trained weights — it changes the instructions and information provided to the model for the current 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 ComputeTape 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.

Market signal

How to read the market signal

Prompt engineering can change the amount of inference work needed to complete a task. The most useful metric is often not cost per token or cost per request — it is the total cost of producing one acceptable result.

  • Input-token growth: larger instructions and examples increase the tokens processed before generation begins.
  • Output-token control and retry rate: clear length rules prevent unnecessary generation, and weak prompts can require several model calls to obtain one acceptable result.
  • Model routing: a well-structured task may let a smaller or less expensive model complete work that otherwise requires a frontier model.

Market read: better prompts can reduce retries and wasted tokens, but long prompt templates and large examples can increase input-token demand. Measure the complete workflow rather than assuming a longer prompt is automatically better. Figures here are illustrative unless explicitly sourced and dated — see our methodology.

Common mistake

A common mistake is treating prompt engineering as 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. The opposite mistake is equally costly: excessively long prompts can introduce contradictions, distract the model from the main task, and increase input-token cost on every single 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

Turn the lesson into a number

Use the GPU-Hour Cost Calculator, AI Training Cost Calculator, or Model Serving Cost Calculator.

Use the calculators

Compute College track

Prompt & Context Engineering

Step 1 of 2: What is prompt engineering