Prompts consist of several key components that work together to guide artificial intelligence. Not every prompt includes all of these components, but understanding how each one works can help you create clearer and more effective requests.
The main components of a prompt are:
Directive
Examples
Persona
Output Formatting
Additional Information
1. Directive
A directive is the primary instruction in a prompt. It tells the AI exactly what task it needs to perform. Without a clear directive, the AI may produce a generic or irrelevant response.
What is a directive?
It is a brief instruction or question that tells the AI what to do. It may involve writing text, solving a problem, or presenting information in a specific format.
Example:
Prompt with an explicit directive: Recommend five good books for me to read.
Some prompts also contain implied directives: Night – Evening; Morning – ...
Although the instruction is not explicitly stated here, the example format implicitly assigns a translation task to the AI.
Best practices for writing directives:
Be clear and concise.
Avoid vague or ambiguous instructions.
Whenever possible, use action verbs such as “write,” “list,” and “translate.”
2. Examples
When a task is complex, providing examples can help explain the expected result to the AI. This approach is particularly useful in one-shot and few-shot prompting, in which the model is given one or more sample responses.
Why use examples?
Examples demonstrate the expected format, style, and structure of the output. They guide the AI’s responses and help produce more accurate results.
Example:
Translate the following sentences:
English: I like apples.
Uzbek: Men olmalarni yaxshi ko‘raman.
English: I enjoy walking.
Uzbek: –
The AI learns the translation pattern from the examples and applies the same approach to subsequent sentences.
Best practices:
Provide clear examples relevant to the task.
Demonstrate the expected structure and content of the output.
Adjust the number of examples according to the complexity of the task.
3. Persona
Assigning a specific role to an AI – such as an expert, doctor, or journalist – influences the style and content of its response. It helps the model adopt an appropriate tone and use the relevant context.
What is a persona?
A persona is an instruction that specifies the role the AI should assume when responding. Assigning a role can improve the relevance of the response, particularly when specialized knowledge or a particular communication style is required.
Example: Assigning a legal expert persona
You are a legal professional. Based on the following case, provide a legal assessment of the situation.
Best practices:
Choose a professional role that matches the task.
Use a persona when a specific style or tone is required.
Provide additional context alongside the role.
4. Output Formatting
Sometimes, it is important for AI-generated results to follow a specific structure. These formats may include lists, tables, regular paragraphs, CSV, or Markdown. Specifying the format helps prevent outputs that do not meet the user's requirements.
Why does formatting matter?
Without explicit formatting instructions, the AI may provide correct information in a form that is not useful to the user. Specifying the output format also makes the results easier to analyze or process in software applications.
Example: Requesting output in CSV format
Case: 2024_ABC_International
Client: XYZ Corporation
Jurisdiction: European Union and United States
Status: Active
Lead Attorney: John Doe
Next Hearing: 2024-10-15
Request: Present this information in CSV format.
Output:
Case,Client,Jurisdiction,Filed Date,Status,Lead Attorney,Next Hearing
2024_ABC_International,XYZ Corporation,EU & USA,2024-09-01,Active,John Doe,2024-10-155. Additional Information
Sometimes referred to as context, this component provides the background information the AI needs. It is particularly important for complex or specialized tasks where accurate and relevant responses depend on understanding the circumstances.
What is additional information?
It consists of relevant facts, historical details, statistics, or other background information that helps the AI provide a more precise answer. If the AI does not have access to the necessary information, you need to supply it.
Example: Additional information
May 12, 2020: The client struck a pedestrian while driving a car. The victim sustained minor bodily injuries. Following the preliminary investigation, a criminal case was initiated under Article 266, Part 1, of the Criminal Code.
June 25, 2020: A reconciliation agreement was reached with the victim, and the civil claim was satisfied. The court terminated the proceedings.
December 3, 2022: The client violated traffic regulations again. The client was held administratively liable under Article 131 of the Code of Administrative Responsibility for driving under the influence of alcohol.
Prompt:
You are a defense attorney. Based on this case, assess the likelihood of the client facing criminal or administrative liability in the future. Draw conclusions based on applicable legislation and legal practice.
Best practices:
Include only relevant information. Do not send unnecessary details to the AI.
Ensure that the background information is directly relevant to the task.
Supply any essential contextual information that the AI may not otherwise have access to.
Recommended Order of Prompt Components
There is no single universally correct order for arranging prompt components. However, the following sequence is recommended for obtaining effective results:
Examples, if needed
Additional information
Persona – the role the AI should assume
Directive – the specific task to perform
Output formatting instructions
Example:
1. Example
February 20, 2024: The client was dismissed from their company without any valid reason. The one-month notice period stipulated in the employment contract was not observed. After reviewing the case, the court ruled that the dismissal was unlawful and awarded compensation.
Conclusion: Employment legislation was violated, and the decision was made in the client's favor.
2. Additional information
April 5, 2025: The client's employer decided to reduce its workforce due to a financial crisis. Despite having worked for the organization for three years, the client was selected for redundancy. The client received only two weeks' notice, and the required payments were not made on time.
April 25, 2025: The client formally notified the company in writing that their employment rights had been violated and requested reinstatement but received no response.
Prompt:
You are an experienced employment law attorney. Analyze the above situation from the perspective of employment legislation and assess, on legal grounds, whether the client has a viable opportunity to be reinstated.
Present your answer in the following format:
Legal analysis based on the legislation of Uzbekistan
Assessment of whether the client's claim is legally justified
Prediction of the likely court decision
Recommended next legal steps
Why Is This Order Important?
Placing the directive at the end of a prompt allows the AI to process the background information before reaching the specific task. If the directive appears at the beginning, the model may continue generating based on the initial context without fully addressing the intended task, since AI models are generally trained to predict the next token in a sequence.
In conclusion, understanding the main components of a prompt is essential for writing effective instructions: directive, examples, persona, output formatting, and additional information. By combining these elements appropriately, you can obtain more precise, accurate, and useful responses from AI. Experimenting with different combinations can also help you develop optimal prompts for different tasks.
- #data jurnalistika
- #sun'iy intellekt
- #data science
Media Design Group
Websites, book and periodical layout, infographics, graphic design and AI solutions.



