AI for All
Online BA · Sem 6
0% complete
0/11 lessons
Lesson 5 of 11
Prompt Engineering Techniques
AI for All
About the video
Google's 9 Hour AI Prompt Engineering Course In 20 Minutes
Tina Huang
Study notes
Prompt engineering is the skill of writing clear, specific instructions (prompts) so that a generative AI tool gives useful output. A widely used five-step framework is Task, Context, References, Evaluate and Iterate, supported by iteration methods and advanced techniques such as prompt chaining, chain-of-thought and tree-of-thought. Because AI can make mistakes, the user must always check and refine the output.
The Five-Step Prompting Framework
- Task: state clearly what you want the AI to do; add a persona (the role or expertise the AI should take, e.g. 'act as a news editor') and a format (e.g. table, bullet list, 100-word paragraph).
- Context: give background details such as the goal, audience and situation; more relevant context usually gives better output.
- References: share examples of what you want (sample text, images, past work) so the AI can copy the style or structure.
- Evaluate: check whether the output is accurate, relevant and meets your needs before using it.
- Iterate: refine the prompt and try again; prompting is a repeated cycle, not a one-time step.
Methods to Iterate and Improve Prompts
- Revisit the framework: add the missing persona, context, references or format.
- Break the prompt into shorter, simpler sentences so each instruction is clear.
- Try different phrasing, or switch to an analogous (similar) task, e.g. ask for a 'story' instead of a 'marketing plan' to get a fresh angle.
- Introduce constraints: set limits such as word count, tone, audience age or topics to avoid, to narrow the output.
- Example: 'Write a post about our café' improves to 'As a social media manager, write a friendly 50-word Instagram post announcing our new monsoon menu for college students.'
Advanced Prompting Techniques
- Prompt chaining: split a big task into a series of prompts where the output of one becomes the input of the next (e.g. summarise a book, then create a tagline from the summary, then plan a launch).
- Chain-of-thought prompting: ask the AI to explain its reasoning step by step, which makes errors easier to spot and often improves reasoning.
- Tree-of-thought prompting: ask the AI to explore several reasoning paths or options at once, compare them and develop the most promising one; useful for complex or open-ended problems.
- Meta prompting: asking the AI itself to help write or improve your prompt.
- Multimodal prompting: using inputs like images, audio or files along with text, still following the same framework.
AI Agents and Responsible Use
- An AI agent can be set up with a prompt to play a specific role, e.g. simulating an interviewer for practice or acting as an expert who gives feedback on your work.
- A good agent prompt includes the persona, context, rules of interaction, a stop phrase to end the session and a request for feedback at the end.
- Generative AI can 'hallucinate', i.e. produce confident but false information, so facts must be verified.
- AI output may reflect bias in training data; a human should stay in the loop to review, edit and take responsibility for final use.
- Avoid sharing private or confidential data in prompts and check copyright and organisational rules before publishing AI output.
Key terms
- Prompt
- The instruction or input given to a generative AI tool to get a desired output.
- Prompt engineering
- The practice of designing and refining prompts to get accurate, relevant and useful AI output.
- Persona
- The role or expertise you ask the AI to adopt, such as teacher, editor or marketer.
- Prompt chaining
- Linking prompts so that the output of one prompt is used as input for the next.
- Chain-of-thought prompting
- Asking the AI to show its reasoning step by step before giving a final answer.
- Tree-of-thought prompting
- Asking the AI to explore and compare several reasoning paths at once to reach the best solution.
- Hallucination
- When an AI model produces information that sounds confident but is false or made up.
- Multimodal prompting
- Prompting with more than one type of input, such as text together with images, audio or files.
Takeaways
- Use the framework: Task (with persona and format), Context, References, Evaluate, Iterate.
- Good prompting is iterative: refine wording, add context or constraints until the output fits.
- Chaining, chain-of-thought and tree-of-thought help with complex, multi-step problems.
- Always verify AI output for errors, hallucinations and bias before using it.
- Keep a human in the loop and protect private data when using AI tools.
Contribute
Was this lesson helpful?
We read every rating and fix the weakest lessons first.