Understanding prompting frameworks (part I)
Let’s start with RTF and RAILS, don't let the acronyms scare you 😅
If you’ve spent more than twenty minutes reading about AI, I’m sure you’ve seen this type of prompt floating around, more than once:
“Act as a __________ and help me ______________________”
You’ve probably used it yourself.
Well, this kind of recipe is what we call a prompting framework, and they’re nothing more than structured ways of asking questions to ChatGPT, Claude, or your favorite AI assistant.
There are so many of these frameworks that covering them all in a single post would be way too boring long, so I figured I’d make this a series. Today we’re looking at RTF and RAILS, the basics (but don’t let that fool you, they’re still useful). I’ll walk you through the rest in future posts.
RTF: Role, Task, Format
I’m not going to start with a joke about how every time I see RTF I think of WTF... (oops). OK fine, I’ll be honest, instead of thinking Role, Task, Format, my brain immediately goes to “Role, The, Fu##” (but that’s just me, right?).
This framework showed up in 2023, when ChatGPT was only a few months old and we were all figuring out how to use it. It didn’t come from OpenAI, a university, or a research paper. It came from users experimenting and sharing what worked for them.
How does RTF work?
The idea is that your prompt should have three elements:
Role: You tell your AI who you want it to be. “You’re a Marketing expert,” “act as a Peruvian chef,” “imagine you’re a college professor.” This sets the context and tone for the response.
Task: This one’s easy. Just tell it what you want it to do. Try to be specific, this is the heart of your prompt. Don’t say “tell me what to make for lunch.” Try something like “I have 15 minutes to cook, I’ve got leftover rice from yesterday, scallions, soy sauce, and some leftover meat.” If your assistant is any good, it’ll suggest you make arroz chaufa (Peruvian-style fried rice. Trust me, it’s amazing).
Format: Here you tell it how you want the answer. A list? Three paragraphs? A table? You get the idea.
Remember, it’s not enough to tell your assistant it’s “an expert in X.” You need to be clear about what you actually need from it. That alone will make a huge difference in the responses you get.
I don’t personally use RTF (at least not consciously), but when I look at my prompts I realize some of them follow that structure. So I can tell you it works.
From 2023 to 2026
This framework was created about 3 years ago, which is 21 in dog years and roughly 178 in AI years. So we could say it’s old a classic.
It still works great with today’s language models like ChatGPT 5 and Claude 4, so don’t be afraid to use it.
The example
“You are a personal finance expert….” hmmmm…
No! Let’s find a more fun example… how about…
“You are Cantinflas. Explain how ChatGPT works, but do it in your style: with lots of rambling, long sentences, tangles of words, and funny contradictions, so that it seems like you’re explaining a lot but you’re actually saying nothing concrete. Keep it to three or four lines max.”
Note: If you’re not familiar with Cantinflas, Charlie Chaplin himself called him “the greatest comedian alive.” He’s often referred to as Mexico’s Charlie Chaplin, a master of talking endlessly while saying absolutely nothing. It’s an art form, really.
Here’s ChatGPT’s response (I’m keeping it in Spanish because Cantinflas’ magic is inseparable from the language. Basically, ChatGPT rambles on and on about how ChatGPT “knows everything and nothing at the same time” and how “it answers what it thinks you meant to say, even though that’s not what you said,” ending with “between yes and no, well, there we go.” Classic Cantinflas):
¡Ah pues mire usté! El ChatGPT viene siendo como un cuate que sabe mucho sin saber nada, porque sabe de todo y de nada al mismo tiempo; entonces cuando uno le pregunta, él contesta lo que cree que quiere decir lo que usted dijo, aunque a veces no es lo que usted quiso decir, ¿me explico? Porque en resumidas cuentas, el asunto es que se arma una plática muy platicada donde parece que hablamos claro, pero entre que sí y que no, pos total, ahí la llevamos.

Not bad, but who could ever truly imitate the great Mario Moreno? Nobody.
Let’s move on to the next framework!
RAILS: Role, Action, Input, Logic, Style
Is it just me, or does it feel like someone is trying WAY TOO HARD to give their frameworks a cool name? This is another one from 2023, also created by the community.
How does RAILS work?
Unlike WTF RTF, which has only 3 elements, RAILS has 5 (though the “S” is optional).
Role: Same as RTF. Who do you want your AI to be? “You’re an expert crisis communications manager,” “Act as a ninja obsessed with conspiracy theories,” or whatever you prefer.
Action: It’s the same as the task in RTF (except if they had called it “task,” the acronym wouldn’t have sounded nearly as cool). Just tell your assistant , in detail, what you want it to do.
Input: This is where the framework gets demanding. It doesn’t assume your assistant has all the information, it asks you to provide the data it needs. For example, last quarter’s sales figures, the comments you get on your blog, your ex’s WhatsApp messages, etc.
Logic: This part of the prompt is for detailing how you want it to think. Things like “explain your reasoning,” “think step by step,” etc.
Style: What tone do you want the response in? Do you prefer long and formal answers, or something more conversational? This is where you define that.
Does it work with modern LLMs?
Yes. The logic component is actually really interesting when it comes to ChatGPT 5. This latest version of OpenAI’s assistant can decide on its own whether to reason or not before giving a response. With RAILS, we make sure it always uses the same way of thinking.
Just like RTF, I don’t use RAILS in my day to day either😱. What I do take away from these frameworks is that they help us understand how to structure our messages to an LLM.
An example
Prompt:
Act as a Chef specialized in Peruvian cuisine. Your task is to give me a recipe for a dish I can prepare in 15 minutes. Ingredients: Leftover rice from yesterday, meat leftovers, scallions, egg, soy sauce. Explain your reasoning step by step. Give a concise and conversational response.
As I mentioned, this prompt made my assistant stop and think before responding….
… and guess what?
It gave me its recipe for Chaufa!!! (Peruvian fried rice)
ChatGPT:
Let’s make a quick chaufa with what you’ve got!…
Sorry, I had to test if it would actually say that 😅
Wait, you don’t use these frameworks?
OK, ok… I can imagine you’re thinking why I’m writing a post about tools I don’t use. Fair enough.
To be honest, if you look at my prompts you’ll probably see some of the elements from these recipes. Just not with the exact structure.
I think these kinds of tools are designed to get really good responses from our assistants, but my day to day is a little different. More than a question-and-answer thing, I try to have a conversation.
It’s similar to how I cook. I never follow a recipe to the letter, I just keep adding ingredients, tasting, and trying to be creative (accompanied by a bottle of wine, a baguette, and maybe some cheese).
It usually works, although there’s an inedible butter fish that my kids will never let me forget.
Let me put it this way: after a couple of years talking to AI every single day, you get the hang of it.
And that’s the thing. If you’re just starting out (or if your brain just prefers structure), I’m sure these frameworks will be really useful.
Let’s get serious for a second
I’ve seen a lot of prompts like: “You are a Harvard MBA…” or “You are the world’s greatest expert on topic X.”
Please, don’t think this magically turns AI into a genius. These frameworks work because they help you organize your ideas and present them clearly and in a structured way to your AI. They don’t give ChatGPT superpowers.
What’s next
As I said at the beginning, this is a series of posts. We still need to talk about CRISP, CLEAR, PEACE, COSTAR, and more.
And since I mentioned Cantinflas, in mine and Chaplin’s opinion the greatest comedian of all time, here’s a clip from the movie “Su Excelencia” (Your Excellency), which has what I think is one of the most beautiful speeches ever written.
The movie is from 1967, and in it Cantinflas plays a diplomat who ends up delivering a powerful speech about peace, freedom, and the dignity of small nations. It’s funny, it’s moving, it’s perfect, and it’s in Spanish.
I have beautiful memories of sitting and watching those movies with my dad ❤️
No matter how old you are, if you haven’t seen it, I really recommend you look it up. It’s a masterpiece. Please set audio to be in Spanish (AI cannot auto-dub Cantinflas) and use captions in English.
Hope you enjoyed the post, see you next time!
G




