Crafting a good prompt is like giving clear directions to a friend. The more specific you are, the less likely they are to do somethign wrong.
A basic prompt can be structured with RCTF - or Role, Context, Task and Format.
This ensures the AI understands who it should be, what’s going on, what you need and how to deliver it.
E.g. -
- Role: Who the AI should be (e.g., a teacher, a chef, a guide).
- Context: The background or situation (e.g., your needs or environment).
- Task: What you want the AI to do (e.g., explain, list, create).
- Format: How the response should be presented (e.g., a list, a paragraph).
Let’s walk through why this approach is powerful.
Why the role is important:
The role tells the AI who it should be during the interaction.
It shapes the tone, style, and perspective of the response.
A large language model is a massive trove of information. If you are specific on the persona, it’ll have context on which information to look for, and how to behave in context.
For example: If I said the bot was a scientist - it’s going to behave completely differently than if I said act like a cheerful tour guide. The two bodies of work are completely different.
You can be generic or as specific as you want.
E.g. If you ask it to behave like a customer service agent, that may come back with a different tone than a writing coach.
You can also write the persona as 2 things.
E.g. You could say you want the bot to behave like a procurement expert, AND an expert in what’s being procured. This could help you write a tender document from requirements for example.
Why context is important:
Context gives the AI the background it needs to understand your situation. It’s the “who, what, where, and why” that makes your request relevant.
Context helps the AI avoid generic answers and focus on what matters to you. Without it, the response might miss the mark.
Examples:
- “I’m a college student studying for a biology exam.”
- “I’m planning a weekend trip to New York on a tight budget.”
- “I run a small bakery and want to attract more customers.”
Why this works:
- Context like “studying for a biology exam” tells the AI to simplify complex topics.
- “Tight budget” signals cost-effective suggestions for the trip.
Keep context concise but relevant. Include only what helps the AI understand your needs.
Why defining the task is important:
The Task is the specific action you want the AI to take. It’s the core of your prompt and what you’re asking it to do.
A clear task ensures the AI knows exactly what you want, reducing the chance of vague or off-topic responses.
Examples:
- “Explain how gravity works.”
- “Suggest three dessert recipes.”
- “Write a short poem about the ocean.”
How it works:
- “Explain” prompts a detailed explanation.
- “Suggest” calls for ideas or options.
- “Write” triggers creative output.
Use strong action verbs (e.g., “describe,” “list,” “generate”) and be specific to get the best results.
Why defining the format is important:
Format tells the AI how to present its response thinking of it as the packaging for the information.
A good format makes the response easier to read and use, especially for detailed or complex requests.
Examples:
- “List the steps in a numbered list.”
- “Write the answer in a single paragraph.”
- “Provide a table comparing the options.”
Match the format to your needs. Want a quick scan? Use bullet points. Need a deep dive? Try paragraphs.
Pulling it all together:
Example 1:
- Role: “You are a fitness trainer.”
- Context: “I’m a beginner trying to build strength at home.”
- Task: “Suggest three exercises.”
- Format: “Present them in a bullet-point list with a short description each.”
Full prompt:
“You are a fitness trainer. I’m a beginner trying to build strength at home. Suggest three exercises. Present them in a bullet-point list with a short description each.”
Example 2:
- Role: “You are a tech journalist.”
- Context: “I’m curious about recent AI advancements.”
- Task: “Summarize the top three breakthroughs in 2023.”
- Format: “Write a short paragraph.”
Full Prompt:
“You are a tech journalist. I’m curious about recent AI advancements. Summarize the top three breakthroughs in 2023. Write a short paragraph.”
Pitfalls to avoid:
Here are three pitfalls to watch out for:
- Vague task:
- Bad: “Tell me about space.”
- Fix: “Explain how stars form in a simple list.”
- Why: Specificity gets you a targeted answer.
- Missing format:
- Bad: “Give me some travel tips.”
- Fix: “List five travel tips in bullet points.”
- Why: Format clarifies how you want the info delivered.
- Irrelevant context:
- Bad: “I like cats. Help me plan a party.”
- Fix: “I’m hosting a party for 10 people. Suggest a menu.”
- Why: Context should tie directly to the task.
Conclusion
The RCTF framework (Role, Context, Task, Format) is your secret to creating effective AI prompts. By clearly defining these four elements, you'll get more accurate, useful responses from AI. Remember that specific prompts lead to specific answers, the clearer you are about what you want, the better results you'll receive.