Resources
Prompting
Prompt Best Practices
The fundamentals that work across all LLMs:
Role/Persona: Who the AI should act as
Context: What background info it needs
Task: What you want it to do explicitly
Format: How you want the output structured
Constraints: What to avoid or limits to follow
CO-STAR Prompt Framework
A great prompt usually includes these specific elements to provide context and direction:
Context: Provide background information on the task.
Objective: Define exactly what you want me to do.
Style: Specify a writing style (e.g., professional, humorous, poetic).
Tone: Set the emotional vibe (e.g., empathetic, direct, enthusiastic).
Audience: Who is this for? (e.g., a CEO, a 5-year-old, a software engineer).
Response: Define the format (e.g., a table, a list, a JSON object).
Additional Components
Few-Shot Prompting/Using Examples: Provide examples of desired output and formatting (e.g., programming language, file type [CSV, Markdown, PNG])
Use Delimiters: Use triple quotes (“““), XML tags (
), or dashes (—) to wrap your content (e.g., Summarize the text delimited by triple quotes:”““[Insert article]”““)
Source: Google Gemini (Prompt: do you have any prompt engineering best practices)