RTF - Role, Task, Format
Overview
The RTF Framework (Role, Task, Format) is a structured approach to crafting prompts that ensures clear and contextually relevant responses from AI models. By explicitly defining the Role, Task, and Format, you enhance the precision and usefulness of the generated output.
Framework Structure
Act like a [insert role]. Give me a [insert task] in [insert format] format.
Steps for Using the RTF Framework
- Define the Role
- Specify who or what the AI should act like.
- This influences the response style, depth, and expertise.
- Examples: “Software Developer”, “Data Scientist”, “Technical Writer”.
- Specify the Task
- Clearly state what you want the AI to do.
- This could be summarization, analysis, explanation, coding, etc.
- Examples: “Provide a code review”, “Summarize this article”, “Explain this concept”.
- Choose the Output Format
- Define the structure of the response.
- Examples: “Markdown format”, “JSON format”, “Bullet points”, “Table”.
Examples
Act like a Software Developer. Give me a Code Review Summary in Markdown format.
Act like a Data Scientist. Explain the concept of overfitting in Markdown format.
Act like a Business Analyst. Provide a SWOT analysis of Tesla in Markdown format.
Act like a Python Developer. Generate a function that parses JSON in Python code.