All guides
RTFAdvanced·Beginner6 min

The RTF Framework: Role, Task, Format

RTF stands for Role, Task, Format: who the model should be, the single concrete action it must perform, and the exact shape the answer must arrive in. It is the smallest framework that still prevents the two most common prompt failures — an answer aimed at the wrong reader, and an answer in a shape you cannot use.

RTF is three slots and no ceremony, which is why it is the first framework worth learning and the one most everyday requests should use. This guide takes each letter in turn: what goes in it, what people put in it that should not be there, and the point at which three slots stop holding the task.

By Andrei Bădulescu, Founder at VantagePrompt·Updated

Most prompts fail in one of two ways. They get an answer pitched at the wrong reader — a database explanation written for a beginner when you needed one for a DBA — or they get the right answer in a shape you cannot use, three paragraphs of prose when you needed a JSON object. RTF exists because those two failures have one cause each, and each has a slot.

What does RTF stand for?

Role, Task, Format. Three slots, filled in that order, and nothing else. The order is not decorative: the Role frames how the Task is read, and the Format constrains what the answer may look like once the Task is understood. Reversing them produces a prompt that reads like a list of afterthoughts.

LetterSlotThe question it answersOne line of it looks like
RRoleWhose expertise and vocabulary should the answer come from?You are a senior PostgreSQL DBA.
TTaskWhat single action must be performed?Rewrite this query to avoid the sequential scan.
FFormatWhat exact shape must the answer arrive in?Return only the SQL, no commentary.
The three slots of RTF, and the question each one closes.

What makes a Role worth writing?

A Role earns its place when it changes the answer. "You are a senior PostgreSQL DBA" changes which index the model reaches for and which trade-offs it mentions unprompted. "You are a helpful assistant" changes nothing — it describes the default, so it costs tokens and buys silence.

The test is subtraction: delete the Role and imagine the answer. If it would come back the same, the Role is decoration. If it would come back shallower, aimed at the wrong reader, or missing the caveat a specialist would have raised, the Role is doing work.

A Role is not a personality. "You are a witty, world-class, 10x engineer" adds adjectives, not expertise — and the tone it invites is the one thing RTF has no slot to control. If tone matters to the deliverable, RTF is the wrong framework.

Why must the Task slot hold exactly one verb?

Because two verbs make the Format slot ambiguous. "Refactor this function and write tests for it" produces one answer that has to be two shapes at once, and the model resolves that by guessing — usually by doing the first thing thoroughly and the second thing thinly.

If your Task has an "and" in it, you have either two prompts or a task with ordered steps. Two prompts is the cheaper answer. A task with genuinely ordered, verifiable steps has outgrown RTF and belongs in RISEN, whose Steps slot exists precisely for it.

Task (bad):  Refactor this handler and add tests and update the docs.
Task (good): Rewrite this handler to use async/await instead of .then() chains.
One verb, one object, one finish line.

How specific does the Format slot have to be?

Specific enough to be checkable. "Return JSON" is a preference; "Return a JSON object with keys query, explanation and estimatedRowsScanned, and nothing else" is a contract — you can hold the answer up against it and see immediately whether it complied.

The phrase that does most of the work in a Format slot is "and nothing else". Left out, models tend to wrap a correct answer in a preamble and a summary, which is exactly what breaks a downstream parser. Output shapes and the wording that resolves them are covered in depth in the output format guide.

Role:   You are a senior TypeScript engineer.
Task:   Convert this REST handler to use async/await instead of .then() chains.
Format: Return only the rewritten function, no commentary, no explanation.
A complete RTF prompt. Three lines, three closed questions.

When do three slots stop being enough?

RTF has no slot for who is reading, no slot for how it should sound, and no slot for what to leave out. Those absences are the framework — they are why it stays short — but they are also its ceiling.

The signalWhat RTF cannot holdWhere it belongs
The deliverable is read by a specific audienceAudience and ToneCO-STAR
The task has ordered steps you would verify one at a timeStepsRISEN
There are things the answer must not do or includeNarrowingRISEN
You do not yet know the output shapeA checkable FormatNo framework — write a plain, clear request first
Four signals that the task has outgrown three slots.

When does VantagePrompt pick RTF for me?

On the Coding use case, unless the request looks complex — meaning you stated explicit success criteria, or stacked at least two hard constraints. Either of those routes the prompt to RISEN instead. On the Auto use case, RTF is selected when the classifier extracted a task, a target and a format from your input, but found no audience-and-tone pair and nothing that reads as complexity.

When RTF is selected, the optimizer restates your persona as the Role, reduces your request to a single concrete action as the Task, and pins the exact output shape as the Format — keeping the result tight rather than stacking sub-tasks. You do not have to write RTF yourself to get an RTF-shaped prompt; knowing the three slots is what lets you read the output and see which one your input left empty.

Frequently asked questions

What does the R stand for in the RTF framework?
Role — the expertise and vocabulary the answer should come from, such as "You are a senior PostgreSQL DBA". The T is Task, the single concrete action to perform, and the F is Format, the exact shape the answer must arrive in.
Is RTF the same as a system prompt?
No. A system prompt is where instructions are placed in an API call; RTF is how those instructions are structured. An RTF prompt can live entirely in a system prompt, entirely in a user message, or be split between them — the three slots are the same either way.
Can I use RTF for writing tasks?
You can, but it will underperform. RTF has no slot for audience or tone, and for writing those are where persuasion lives. Use CO-STAR, which separates them into slots of their own.
What happens if I leave the Role slot out?
You get the model default, which is a generalist. That is fine when the task is mechanical and has one correct answer. It costs you when the task has expert trade-offs — those are what a Role surfaces without being asked.
Does adding more detail to an RTF prompt make it better?
Only inside the three slots. Detail that does not fit one of them — background, rationale, adjacent requests — dilutes a framework whose whole value is that it is short. If the extra detail genuinely matters, the task has outgrown RTF.

Sources

Put it into practice.

Run this technique in the optimizer.

Open the optimizer

Keep reading