Prompt elements are textual parts that make your LLM interactions more effective and ensure the output you receive aligns with your intent.
Each prompt element makes it easier for the LLM to understand your intent: while you don't need all four elements in every prompt, combining a few will yield the most accurate output.
1. Role (Persona)
Essentially, you instruct the LLM to take on a specific role.
It could be a relevant job title, an authority in a specific field, an industry expert. The key is that the "persona" relates to the output you desire.
If you can't think of a specific persona or role, you can simply use something akin to "the [topic] expert." Remember, the more specific your persona description, the easier the AI's tone and knowledge will adapt.
2. Task
This is where you specify what you aim to achieve with the LLM. The clearer you define the task, the better the LLM will serve your purpose. This is the lifeblood of your prompt, so make sure you assign a clear and concise task!
3. Context
Provide background information to help the AI generate relevant answers: it could be specific examples, detailed explanations, uploaded documents or even your own knowledge base.
4. Format
Define your desired output format to make sure the LLM understands how you expect the output to look like. You can specify formatting elements such as writing style, tone of voice, output length range and style (e.g., bullet point, tables, numbered lists…).
📌 Example I:
As a professional data analyst specializing in customer support tickets, your task is to extract actionable insights and key statistics from a given dataset of customer interactions. This involves identifying recurring issues, quantifying problem frequencies, analyzing resolution times, categorizing sentiment and identifying trends in customer feedback to inform business decisions and improve customer satisfaction. The output should be a comprehensive report summarizing these findings, including relevant visualizations and recommendations for process improvements.Role (Persona):
A professional data analyst specializing in customer support tickets.
Task:
To extract actionable insights and key statistics from a given dataset of customer interactions.
Context:
This involves identifying recurring issues, quantifying problem frequencies, analyzing resolution times, categorizing sentiment and identifying trends in customer feedback to inform business decisions and improve customer satisfaction.
Format:
The output should be a comprehensive report summarizing these findings, including relevant visualizations and recommendations for process improvements.
📌 Example II:
As a professional HR analyst specializing in workforce and employee lifecycle data, your task is to extract actionable insights and key HR metrics from a provided dataset covering employees, hiring, performance, compensation and attrition. This involves analyzing headcount trends, turnover and retention rates, time-to-hire, absenteeism patterns, performance distributions, pay equity and engagement indicators, as well as segmenting results by department, role, location and tenure to identify risk areas and improvement opportunities. The output should be a comprehensive HR analytics report summarizing findings, including clear visualizations (tables, trend charts, cohort analyses, funnel charts) and recommendations for HR process improvements (recruiting, onboarding, performance management, engagement and retention initiatives).Role (Persona):
A professional HR analyst specializing in workforce and employee lifecycle data.
Task:
To extract actionable insights and key statistics from a given HR dataset (e.g., employee records, recruiting, performance, compensation, engagement, attrition).
Context:
This involves identifying headcount and workforce composition trends, quantifying turnover/retention, analyzing time-to-hire and hiring funnel conversion, evaluating absenteeism, mapping performance and promotion patterns, assessing compensation fairness (pay equity) and detecting attrition risk drivers across segments (department/role/location/tenure) to inform HR and leadership decisions.
Format:
The output should be a comprehensive report summarizing these findings, including relevant visualizations (tables, trend charts, cohort analyses, funnel charts) and recommendations for HR process improvements (recruiting, onboarding, performance management, engagement and retention initiatives).