Prompting

Prompt Engineering Fundamentals

The basics carry across every model: be clear, give context, show examples, set constraints, and evaluate the output. Master these before any trick.

Setuproll Team9 min read2026-06-20

Every model has its own quirks, but the fundamentals of a good prompt do not change. Clarity, context, examples, constraints and evaluation will make your prompts better whether you are using Claude, GPT, Gemini or anything else. Learn these first; the model-specific tricks are easier once the foundation is solid.

Clarity beats cleverness

Say exactly what you want in plain language. Ambiguous prompts get ambiguous answers. If a human reader would have to ask a clarifying question, the model will guess, and it may guess wrong.

VagueClear
Tell me about this code.Explain what this function returns and list its side effects.
Write something for our launch.Write a 50-word announcement for a developer audience.
Summarize this.Summarize this in three bullet points, each under 15 words.

Context is what the model cannot guess

The model does not know your situation, your audience or your constraints unless you tell it. Supply the background that a competent stranger would need. Who is this for, what already exists, what matters here.

Front-load the facts
If your task depends on a specific document, schema or set of rules, put that material in the prompt. The model reasons well over what you give it and poorly over what it has to imagine.

Examples teach the shape

An example is worth a paragraph of instruction. Show one or two cases of the input and the output you want, and the model will infer the pattern, including the formatting details you did not spell out.

few-shot.txt
Classify the sentiment.

Input: "shipping was slow but the product is great"
Output: mixed

Input: "absolutely love it, works perfectly"
Output: positive

Input: "broke after one day"
Output:

Constraints keep it on the rails

Tell the model what it may not do as clearly as what it should. Length limits, format requirements, banned phrases and scope boundaries all reduce the chance of an answer that is technically responsive but useless to you.

  • Length: answer in under 100 words.
  • Format: return a markdown table, nothing else.
  • Scope: only use the information in the document above.
  • Tone: plain and direct, no marketing language.

Evaluate, then refine

Prompting is iterative. Decide up front what a good answer looks like, run the prompt, and compare the output to that bar. When it falls short, change one thing and run it again. Over a few cycles you converge on a prompt that works reliably, not just once.

Prompt iteration log
v1 no example -> output too generic
v2 + 1 example -> format correct, too long
v3 + length limit -> good, but wrong tone
v4 + tone constraint -> ✓ ships
Change one variable per pass so you know what moved the result.
Change one thing at a time
If you rewrite the whole prompt between runs, you cannot tell which edit helped. Treat it like debugging: isolate the variable, observe the effect, keep what works.

The five fundamentals

  1. Clarity: say precisely what you want.
  2. Context: supply what the model cannot infer.
  3. Examples: show the input and output shape.
  4. Constraints: bound length, format, scope and tone.
  5. Evaluation: define good, measure against it, refine.

A great prompt is mostly clear thinking written down. The model is only as good as the brief you hand it.

0 Comments

Sign in to post

Loading discussion...