Task Framing

System prompt · Role prompting

Escrito por Darjus Kazakevic · revisado el

Most weak output is a good answer to a task nobody wrote down.

Ask a model to "summarize this" and you have decided almost nothing. Who reads the summary? How long is it? What should it leave out? The model fills each gap with a safe default: neutral, medium length, a little like an encyclopedia. Much of what people call a weak model is really a task that nobody wrote down.

Task framing is the opening block of the prompt. It states three things: the reader (who the answer is for), the job (one verb on one input) and the finish line (what a complete answer contains). Every other pattern in this category refines a task the model must understand first.

En esencia — State the reader, the job and the finish line. Leave them out and the model guesses all three, and its guesses look reasonable.

Cuándo recurrir a él

Recurre a él cuando

  • Every prompt: this is the minimum, not an optimization
  • Output quality varies and nobody can say why
  • One prompt serves several audiences and the tone keeps coming out wrong

Reconsidéralo cuando

  • Never skip it, but keep it short: a page of persona crowds out examples
  • The task has one obvious reading: "translate to French" needs no reader
  • In place of examples, when the standard is easier to show than describe

The three parts

The reader
Who the answer is for, and the standard it must meet. This does more work than a persona: "explain it to a new engineer" and "explain it to the on-call engineer at 3 a.m." produce different documents.
The job
One verb, one input, one depth. A prompt that asks the model to classify, explain and suggest a fix holds three jobs. The weakest of the three sets the quality of the whole reply.
The finish line
What a complete answer contains, and when to stop: length, coverage, and what is out of scope. Without it, the model tries to look thorough, which is not the same as being useful.

Reglas de diseño

Say what a finished answer contains
Give the parts, the length and what to leave out. A prompt that names the input but not the result gets an answer of random length and coverage. This is the usual reason an answer rambles.
Describe the reader, not a persona
"You are a world-class expert" adds little. "The reader is a junior developer who has never seen this codebase" shapes every sentence that follows.
One job per prompt, or split it
If the task needs "and" between two verbs, the model does one job well and the other less well, and you cannot tell which. Pick the one that matters, or use two calls.
Put it first and keep it stable
The framing does not change between requests. That makes it the natural top of the prompt and part of the cached prefix. Data goes below it, in its own block.

Errores habituales

  • Persona flattery ("you are a genius") in place of a real standard
  • Naming the input but not the result, then blaming the model for the length
  • One rule added per incident until the framing is longer than the task