Discover the Art of Prompting

Large language models and their output
Introduces the concept and practice of prompt engineering, which is about designing effective prompts to get useful output from conversational AI tools.
Understanding Prompt Engineering
- Prompt engineering involves crafting clear and specific text inputs (prompts) that instruct AI models on how to generate desired outputs.
- The way language is used in prompts affects the AI’s response, similar to how phrasing influences human communication.
Key Principles and Techniques
- Clear and specific prompts increase the likelihood of obtaining useful and relevant AI-generated results.
- Iteration is important: evaluating AI output and revising prompts helps improve results over time.
Applications and Skills Development
- The course covers how large language models (LLMs) generate output and the role of prompt engineering in enhancing output quality.
- It introduces techniques like few-shot prompting and emphasizes that prompt writing requires critical thinking and creativity, which are valuable workplace skills.
Prompt Engineering: Explained Simply for Beginners
Prompt engineering is all about crafting the best possible question or instruction to get the answer or help you want from an AI tool. Think of it like asking a friend for advice: if you ask clearly and specifically, your friend can give you a better, more useful answer. For example, if you own a clothing store and want marketing ideas, instead of just saying “Help me,” you might say, “I own a clothing store selling high fashion womenswear. Can you help me brainstorm marketing ideas?” This clear and specific prompt helps the AI understand exactly what you need.
Imagine prompt engineering like being a detective who carefully chooses the right clues (words) to solve a mystery (get the best AI response). It’s a creative and thoughtful process where you try different ways of asking until you get the best answer. You also learn to improve your prompts by checking the AI’s answers and tweaking your questions. This skill is very useful for using AI tools effectively at work or in daily life.
Certainly! Here’s a real-life example related to the concept of prompt engineering from the course content:
Example: Marketing Ideas for a Clothing Store Using AI
Imagine you own a clothing store that sells high fashion womenswear. You want to use a conversational AI tool to help you brainstorm new marketing ideas. Instead of just asking, “Give me marketing ideas,” you design a clear and specific prompt: “I own a clothing store. We sell high fashion womenswear. Help me brainstorm marketing ideas.”
Why this example is relevant:
- It directly connects to the course concept of designing effective prompts to get useful output from AI.
- It shows how being clear and specific in your prompt helps the AI understand your needs better, leading to more relevant and creative marketing suggestions.
- It illustrates the practical application of prompt engineering in a real business scenario, making the concept easier to grasp and apply.
If you share your occupation or industry of interest, I can provide more personalized examples tailored to your field!
Understand large language models
Explains how large language models (LLMs) work and highlights their limitations.
How LLMs Learn and Generate Responses
- LLMs are trained on vast amounts of text data from books, articles, websites, and more to learn patterns and relationships in human language.
- They predict the most likely next word in a sequence based on probabilities, enabling them to generate coherent responses to prompts.
Limitations and Challenges of LLMs
- LLM outputs can reflect biases present in their training data, such as associating certain professions with specific genders.
- They may lack sufficient information on niche topics if the training data is limited in those areas.
Importance of Critical Evaluation
- LLMs can produce hallucinations, meaning factually incorrect or misleading information.
- Users should critically assess LLM outputs for accuracy, bias, relevance, and completeness to ensure quality results.
Effective Use of LLMs
- LLM responses can vary even with the same prompt, so assumptions about consistent output quality should be avoided.
- Human guidance and awareness of LLM limitations are essential for achieving the best outcomes when using these AI tools.
How Large Language Models (LLMs) Predict Words and Generate Responses
Imagine you have a super-smart robot that has read millions of books, articles, and websites. This robot learns how words usually go together by noticing patterns in all that reading. So, if you start a sentence like “After it rained, the street was…”, the robot thinks about what word usually comes next based on what it has seen before. It might guess “wet” because that word often follows such a sentence, while “dry” would be very unlikely.
This guessing game is like predicting the next piece in a puzzle. The robot calculates which words fit best by looking at probabilities — how often words appear after others in its training. Because of this, it can help you finish sentences, answer questions, or even write stories. But remember, sometimes it might make mistakes or guess wrong, especially if it hasn’t seen enough good examples about a topic or if the data it learned from had some biases or errors.
Certainly! Here’s a real-life example related to how Large Language Models (LLMs) work and their limitations, based on the course content:
Example: Using an LLM for Customer Support in an E-commerce Company
- Relevance: Many companies use LLMs to automate customer support by generating responses to customer inquiries. This example shows how LLMs apply language pattern recognition and also highlights potential limitations.
- Breakdown:
- The LLM is trained on vast amounts of text, including product descriptions, FAQs, and past customer interactions.
- When a customer asks, “Where is my order?” the LLM predicts the most likely helpful response based on patterns it learned, such as “Your order is being processed and will arrive soon.”
- However, if the training data contains outdated or biased information, the LLM might give incorrect or biased answers.
- The LLM might also hallucinate details, like providing a wrong estimated delivery date.
- Therefore, human oversight is necessary to verify the accuracy and fairness of the responses generated by the LLM.
Experiment with prompting
Introduces the importance and approach to effective prompt engineering for conversational AI systems.
Role of Prompt Engineering
- Prompt engineering is essential to unlock the full capabilities of AI conversational models beyond simple queries.
- Proper prompting enables tailored, customized responses that fit specific use cases.
Learning and Experimentation
- Prompting is not intuitive and requires practice to learn how to communicate context and instructions clearly.
- Experimenting with different prompt lengths, word choices, and information detail helps improve fluency and results.
Advice for Beginners
- Users should not be discouraged by initial unsatisfactory outputs since AI tools only respond to the input given.
- Continuous experimentation and iteration lead to better understanding and more effective use of AI prompting.
Prompt Engineering: A Simple Explanation
In this video, we learned about prompt engineering, which is the art of crafting the right questions or instructions to get the best answers from AI systems like chatbots. Think of it like talking to a helpful but literal friend who only knows what you tell them. If you ask a vague question, you get a vague answer. But if you give clear, detailed instructions, you get a much better, tailored response.
Imagine you’re ordering a pizza. If you just say, “I want pizza,” you might get any kind of pizza. But if you say, “I want a large pepperoni pizza with extra cheese and thin crust,” you get exactly what you want. Prompt engineering works the same way with AI — the more precise and clear your prompt, the better the AI can help you. It’s a skill that improves with practice, so don’t be discouraged if your first tries aren’t perfect. Keep experimenting, and you’ll get better at getting the answers you need.
Certainly! Here’s a real-life example related to the key idea of prompt engineering and experimenting with AI tools from the course content:
Example: Customer Support Chatbot Improvement
- Scenario: A company wants to use a conversational AI chatbot to handle customer support inquiries more effectively.
- Why it’s relevant: This example shows how prompt engineering can unlock the full potential of AI systems by tailoring prompts to get customized and useful responses, just like the course emphasizes.
- Breakdown:
- Initially, the company tries simple prompts like “How can I reset my password?” and gets basic answers.
- They then experiment by adding more context in the prompt, such as “I forgot my password and can’t log in to my account on the mobile app. How do I reset it?”
- By iterating and refining prompts, including specifying the platform and issue details, the chatbot provides more accurate and helpful responses.
- The team learns to write prompts that include all necessary information, avoiding assumptions that the AI can read minds.
- This experimentation process improves the chatbot’s performance and customer satisfaction, demonstrating the power of prompt engineering.
Key principles of effective prompt writing
Write clear and specific prompts
Explains how the quality of prompts influences the output generated by large language models (LLMs) and introduces the concept of prompt engineering to improve results.
Importance of Prompt Quality
- The quality of input prompts affects the quality of the output, similar to how fresh ingredients impact a meal.
- Clear, specific prompts with relevant context help LLMs produce more useful and accurate responses.
Role of Context in Prompting
- Unlike humans, LLMs lack prior knowledge about user preferences, so prompts must explicitly include necessary context.
- For example, specifying “vegetarian options” in a restaurant recommendation prompt ensures relevant suggestions.
Prompt Engineering Techniques
- Writing detailed prompts with clear instructions and context improves output quality.
- Iterative refinement of prompts may be needed to achieve the desired response, as shown in the example of planning a professional conference theme.
The more complex concept in the content is “prompt engineering.”
Prompt Engineering Made Simple Imagine you want to bake a cake. If you use fresh, high-quality ingredients and follow a clear recipe, your cake will likely turn out delicious. But if you forget an ingredient or use poor-quality ones, the cake might not taste as good. Prompt engineering is like writing the perfect recipe for a conversational AI (like a chatbot) so it gives you the best answer or result.
For example, if you ask a friend where to eat in San Francisco, they might remember you’re vegetarian and suggest places with vegetarian food. But if you just ask an AI, it doesn’t know that unless you tell it. So, you need to be very clear and specific in your question, like “Suggest restaurants in San Francisco with good vegetarian options.” This way, the AI understands exactly what you want and gives a better answer.
Certainly! Here’s a real-life example related to the key concept of prompt engineering from the course content:
Example: Planning a Marketing Campaign Using an AI Tool
- Scenario: A marketing manager wants to use an AI language model to generate ideas for a new social media campaign.
- Initial Prompt: “Give me ideas for a social media campaign.”
- Result: The AI provides generic party or entertainment-related ideas, which are not suitable for the company’s brand.
- Improved Prompt: “Generate five creative social media campaign ideas for a professional B2B technology company targeting IT managers.”
- Result: The AI now produces relevant, targeted campaign ideas that align with the company’s industry and audience.
- Why This Matters: Just like in the course example of planning a conference theme, providing clear, specific context in your prompt helps the AI understand your needs better and produce useful output.
- Connection: This example shows how prompt engineering is essential in real-world business tasks to get valuable, actionable results from AI tools.
Prompting best practices
Prompting is an essential skill for getting the most out of generative AI. To get the best results from an AI tool, you need to craft a good prompt. A good prompt follows a simple framework: Task, Context, References, Evaluate, and Iterate. Explore how you can use this framework to elevate your prompting and unlock more of AI’s benefits.
Specify the task
The first step toward creating a great prompt is to clearly state the task, which is what you want an AI tool to do. Do you want it to draft an email or create an image? Be detailed, and avoid ambiguity, which might result in output that’s incorrect or irrelevant.
When you provide an AI tool with a task, also consider including information about:
Persona: What expertise do you want the AI tool to draw from, and who is the audience? For example, you might ask the tool to complete the task with the expertise of an IT professional, or ask it to create an output geared towards a specific audience like your manager or team.
Format: How do you want the output to be formatted? For example, you might ask the AI tool to create a bulleted list or a comparison table.
Those additional pieces of information can help the AI tool accomplish the task the way you want it done.
Here’s an example of a prompt that includes a specific task, a persona, and a format:
Task: Create a social media post about an upcoming music festival that speaks to the local music community while attracting out-of-state festival-goers.
Persona: You’re a concert promoter specializing in raising ticket sales in the alternative rock music industry.
Format: Limit the post to 125-characters. Include 5 relevant hashtags.
Provide necessary context
Including detailed context in your prompts can narrow an AI tool’s focus and tailor its output. Contextual information in your prompts might include:
Reasons and objectives for performing the task
Rules or guidelines that the output must follow
Relevant background information the tool should consider
Those details can help an AI tool better understand your needs. Here’s an example of a prompt that provides necessary context:
You’re a concert promoter specializing in raising ticket sales in the alternative rock music industry. Create a social media post about an upcoming music festival that speaks to the local music community while attracting out-of-state festival-goers. Limit the post to 125-characters. Include 5 relevant hashtags. The local audience is primarily college students and young professionals (age 21-35) who follow indie rock. The festival features 12 bands over 2 days, with camping options and local food vendors.
That prompt is more likely to generate a more engaging and effective output that’s tailored to a specific audience—without requiring additional time spent iterating on the initial prompt.
Include references as examples
References are examples or resources that illustrate what you want an AI tool to produce. They specify details about your desired output, such as the style, tone, and format. Depending on the AI tool, you can include text, images, audio, or even video as references.
When including references in your prompts, consider these suggestions:
Briefly explain how the references relate to the task.
Use 2-5 high-quality examples that closely align with your needs.
Include your own work or open-source examples if relevant.
Here’s an example of a prompt that includes references:
You’re a concert promoter specializing in raising ticket sales in the alternative rock music industry. Create a social media post about an upcoming music festival that speaks to the local music community while attracting out-of-state festival-goers. Limit the post to 125-characters. Include 5 relevant hashtags. The local audience is primarily college students and young professionals (age 21-35) who follow indie rock. The festival features 12 bands over 2 days, with camping options and local food vendors. Here are examples of successful posts from similar events:
– Example 1: Where mountains meet music: Indie Rocks Festival returns! Your favorite local bands + national acts. Good eats & Sleep under the stars! #Indie Rocks #SupportLocalMusic
– Example 2: Join Indie Fest under the desert skies! 2 nights of raw sound 2 move you + camping vibes #RoadTrip #CampLife #RockOn
Note: Later in the course, you’ll learn more about prompting techniques which leverage references.
Evaluate your output
AI tools vary in their training and capabilities. Each tool has unique strengths and limitations, which can influence the quality of their output. After receiving a response from an AI tool, it’s essential to carefully evaluate the quality and effectiveness of the AI-generated content before using it or sharing the output with others.
When evaluating the output, focus on factors such as:
Accuracy
Bias
Relevancy
Consistency
AI-generated content should serve as a starting point, not a final product. Sometimes while assessing and validating an AI output, you might determine that it’s unacceptable or not useful. When that’s the case, you should continue on to the next step of the prompting framework.
Iterate for better results
Even well-crafted prompts might not produce ideal results on the first try. This is where iteration comes in—the process of refining your prompt based on the AI’s output. Think of iteration like having a back-and-forth conversation with an AI tool. The process typically goes like this:
You provide an initial prompt.
The AI tool responds with an output.
You evaluate the effectiveness of the AI-generated response.
You refine your request based on what worked and what didn’t.
The process repeats until the AI tool produces the desired results.
Effective prompting is not about getting a perfect result on the first try, but about being willing to continuously improve your approach. Be patient, provide clear feedback, and keep prompting until you reach the desired outcome.
Pro Tip: When you’ve arrived at an effective prompt for a particular task, save it! You can use your most effective prompts as templates for different use cases and needs. This can help you replicate successful AI-output consistently—without starting from scratch every time.
Leverage an LLM's capabilities at work
Explains various practical ways to use large language models (LLMs) to enhance productivity and creativity in the workplace.
Content Creation and Summarization
- LLMs can generate content such as emails, plans, and article outlines by using clear prompts starting with action verbs.
- They can also summarize lengthy documents or paragraphs into concise sentences to highlight main points.
Classification and Extraction
- LLMs can classify text data, such as customer reviews, into categories like positive, negative, or neutral.
- They can extract specific information from unstructured text and organize it into structured formats like tables.
Translation, Editing, and Problem-Solving
- LLMs assist in translating text between languages, offering multiple options with explanations.
- They can edit text to adjust tone, simplify language, and correct grammar for different audiences.
- LLMs help solve workplace problems by generating ideas, such as event planning or business growth strategies, and can draft communications to share these ideas.
One of the more complex concepts in the content is how to use Large Language Models (LLMs) like Gemini for different workplace tasks by giving clear and specific prompts that start with action verbs.
Imagine you have a helpful assistant who can do many things for you, but you need to tell them exactly what to do. For example, if you want your assistant to write an article outline, you start your request with “create,” like “Create an outline for an article on data visualization best practices.” This helps the assistant understand your goal and give you useful results. Similarly, if you want a summary, you start with “summarize,” or if you want to sort customer reviews by feeling, you start with “classify.” Using these action words is like giving clear instructions to a friend so they can help you better and faster.
Think of it like giving directions to a GPS: if you say “Take me to the nearest coffee shop,” the GPS knows exactly what to do. But if you just say “coffee,” it might get confused. Using verbs in your prompts guides the LLM to deliver exactly what you need, whether it’s writing, summarizing, classifying, extracting data, translating, editing, or solving problems.
Prompts for different purposes
Effective prompting can help guide an AI tool to generate useful output for a variety of tasks, from content creation to problem solving. In this reading, we provide some examples demonstrating how to use the prompting framework—Task, Context, References, Evaluate, Iterate—to get reliable and useful results in different cases.

Content creation
AI tools can generate a wide range of content, no matter your industry or role. You can use AI tools to help you create content like images, videos, documentation, and code. When prompted effectively, AI tools can help you spark creative ideas while saving time.
Here’s a sample prompt that incorporates prompting best practices by including a specific task, context, and references:
Act like you are a creative advertising professional who can apply innovative thinking to develop original taglines that highlight the positive qualities of a product. Create a concise tagline for a washing machine that gets clothes extra clean, has 25 settings, and fits in a small space. The tagline should use an active voice, and be no more than 6 words. Refer to these examples of successful taglines in this industry, which emphasize efficiency and convenience.
– Reference #1: “Less soap. More clean.”
– Reference #2: “Transform laundry into pure magic.”
This prompt clearly states that the task is to create an original and concise tagline. It also provides necessary context by specifying the tone, style, and format of the tagline. The references include examples to help guide the AI tool’s output.
Pro tip: Learn more about how you can use Gemini as a creative partner.
Summarization
AI tools can quickly process and condense large amounts of text while preserving key pieces of information—making them ideal for distilling complex information into clear, concise highlights.
Here’s a sample prompt that incorporates task specifics, context, and format preferences:
Summarize the following email from a software vendor. Create a concise, professional overview that includes a bulleted list of each paid subscription tier with its benefits to clients. The summary should be easy for a sales representative to quickly review before following up with the potential client.
[Email content would follow here]
This prompt demonstrates how specifying your style, tone, and format preferences can help generate summaries tailored to a specific audience’s needs—ensuring the output is useful and relevant.
Pro tip: Learn more about how you can use Gemini to summarize meetings.
Classification
AI tools can help you analyze and categorize content like service emails and customer reviews based on specific criteria. This feature can help you sort through information and organize it into meaningful and actionable insights.
Here’s a sample prompt that specifies a task, provides clear classification criteria, and includes references:
Analyze these customer reviews and tell me whether the sentiment of the reviews is positive, negative, or neutral. For each review, provide a one-sentence explanation for the classification based on these criteria:
Positive: Consistently favorable comments or mostly positive with minor criticisms
Neutral: Mixed or balanced positive and negative comments
Negative: Consistently unfavorable comments or mostly negative with minor positive elements
– Review #1: I don’t know where to begin. We had reservations for 7:00 but they seated us at 7:45. Then, no one came to our table for at least 30 minutes. Our appetizer and main course were mediocre. I did love the dessert, but that wasn’t enough to change our experience.
– Review #2: I love this restaurant. The food is delicious and the service is excellent.
This prompt begins by clearly stating that the task is to analyze the sentiment of a customer review and then specifies the options: positive, negative, or neutral. By clearly defining each category, the AI tool can make more accurate assessments and generate more consistent results.
Extraction
AI tools can save you time by quickly gathering exactly the information you need from large, complex documents. This could be numbers from financial reports, product details from catalogs, or key points from meeting notes. To achieve more precise results, you can use the verb “extract” in your prompt, along with clear instructions about the type of information you need and how you want it formatted.
Here’s a sample prompt that incorporates task specifics, relevant context, and format preferences:
I’m planning our department’s clothing budget and need to track pricing trends. Extract all of the references to items of clothing I can buy and how much each item costs from the blog post below. Create a spreadsheet of just these items. Format the output with two columns labeled “Item” and “Price.” Capitalize list items and organize them by price from high to low.
[Blog post content would follow here]
This prompt begins by clearly stating that the task is to extract all the items of clothing mentioned in the blog with their corresponding prices. It also specifies that the data should be organized in a spreadsheet, with clear formatting instructions—preparing the data for quicker analysis.
Translation
AI tools can help facilitate communication by translating content for global audiences, making it easier to communicate with international colleagues and create multilingual content.
Here’s a sample prompt that incorporates task specifics, context, and style preferences:
We’re a boutique bike shop that sells cycling and outdoor adventure gear. Translate our product descriptions from English to Dutch. Maintain the same structure and casual tone that is used in the English version in the Dutch translation. Consider cultural context and ensure the expressions maintain their marketing appeal in Dutch.
– Reference #1: Whether you’re exploring city streets or forest paths, our sleek and durable bicycle has it all.
– Reference #2: Roll into summer in style with our smooth and stylish rollerblades.
This prompt begins by clearly stating that the task is to translate product descriptions from English to Dutch. It also specifies that the Dutch translations should maintain a similar structure and tone as the English originals, ensuring the tool generates output that resonates with the target audience while staying true to the original content’s intent.
Editing
AI tools can help refine and improve existing text to ensure clear communication. Using specific editing instructions helps AI tools make appropriate adjustments while preserving the original message.
Here’s a sample prompt that incorporates task specifics, context, and audience needs:
As the communications manager for a manufacturing company, I need to explain our site selection process to local community stakeholders. Rewrite this text for a non-technical audience. Simplify the language while keeping all the main ideas intact.
[Text content would follow here]
This prompt demonstrates how specifying your task and the target audience can lead to more useful revisions when editing text. By clearly stating what needs to be simplified, the AI tool can make appropriate changes while maintaining the core message.
Problem-solving
AI tools can also help you break down complex challenges and quickly come up with potential solutions. When using AI for these kinds of tasks, breaking your request into manageable steps can help to produce better results.
Here’s a sample prompt that demonstrates how to structure a complex problem:
We are running a community program to teach children gardening skills. The program runs from June 1 to August 15. We want the children to be able to grow plants that will be ready for harvest by the time the program ends. First, identify a list of 10 plants that can be planted and grown in that time period. Include sources that support the time to harvest for each plant.
Next, choose three plants from the list that will provide the children with the most variety. We want the children to grow three plants that are as different from each other as possible.
This prompt begins with useful context about the program, such as its main purpose and timeline. It also breaks down what would otherwise be a complex task into manageable steps. As with any other use case, applying effective prompting techniques and adjusting them to fit your specific needs is the key to getting reliable and useful results from AI tools.
The examples in this reading demonstrate how your prompting approach should be adapted for different workplace tasks. While each use case can require specific techniques, the core principles remain the same—Task, Context, References, Evaluate, Iterate. With practice, you can become more skilled at crafting prompts for any situation and get the exact output you need.
Improve AI output through iteration
Explains the importance and method of using an iterative process in prompt engineering to achieve optimal results with large language models (LLMs).
Iterative Process in Prompt Engineering
- An iterative process involves creating a first version, evaluating it, and improving it repeatedly until the desired outcome is achieved.
- This approach is effective because initial prompts often do not yield the best results, so revising prompts based on output evaluation is key.
Challenges Affecting LLM Output
- Different LLMs have unique training data and programming, causing variations in responses to similar prompts.
- LLM outputs may be inaccurate, biased, insufficient, irrelevant, or inconsistent, requiring critical evaluation of the results.
Improving Prompts Through Iteration
- Adding missing context and experimenting with different wording or phrasing can improve output quality.
- An example shows how refining a prompt to request a table format and additional details leads to more useful and organized information for a team.
Iterative Prompting: A Simple Explanation
Iterative prompting is like making a recipe better by tasting and adjusting it step by step. When you ask a large language model (LLM) a question or give it a task, you might not get the perfect answer the first time. So, you try again by changing your question a little bit based on what you learned from the first answer. You keep doing this—asking, checking, and improving—until you get the best result.
Imagine you’re baking cookies and the first batch is too salty. Instead of giving up, you adjust the recipe by using less salt and bake again. Similarly, with iterative prompting, you add more details, change your words, or ask for the answer in a different format (like a table) to make the output clearer and more useful. This step-by-step approach helps you get exactly what you need from the model.
Certainly! Here’s a real-life example related to the key concept of iterative prompting from the course content:
Example: Developing a Marketing Campaign Using Iterative Prompting with an LLM
- Scenario: You work in marketing for a retail company and want to create a social media campaign to promote a new product line.
- Initial Prompt: You ask the language model to generate catchy slogans for the product.
- First Output: The slogans are creative but too generic and don’t highlight the product’s unique features.
- Iteration 1: You revise your prompt to specify that the slogans should emphasize eco-friendly materials and appeal to young adults.
- Second Output: The slogans are better but still lack a call to action.
- Iteration 2: You add to your prompt a request for slogans that include a call to action encouraging customers to visit the website.
- Final Output: The slogans are now targeted, informative, and motivating, ready to be used in your campaign.
- Why This Example Is Relevant: It shows how iterative prompting helps refine outputs from a language model to meet specific business needs, just like the course explains. Each iteration improves the result by adding context and clarifying requirements.
- Connection to Concept: This example demonstrates the iterative process of creating, evaluating, and improving prompts to get the best possible output from an LLM, which is essential for effective prompt engineering.
Techniques for prompting an LLM
Discover few-shot prompting
Explains how using examples in prompts, known as “shots,” can improve the performance of large language models (LLMs) in generating desired outputs.
Prompting techniques based on examples
- Zero-shot prompting provides no examples, relying solely on the task description and training data, suitable for simple tasks.
- One-shot prompting includes one example, while few-shot prompting uses two or more examples to guide the LLM.
Benefits and application of few-shot prompting
- Few-shot prompting helps clarify the desired format, style, or pattern by providing context through examples.
- It is useful for tasks requiring specific, nuanced responses, such as generating product descriptions in a consistent style.
Practical considerations for few-shot prompting
- The number of examples needed varies by LLM; too few may be insufficient, too many may reduce creativity.
- Experimenting with the number of examples helps optimize results for specific tasks.
Few-Shot Prompting: A Simple Explanation
Imagine you want to teach a friend how to describe products in a special way. Instead of just telling them the rules, you show them a couple of examples first. For instance, you show how to describe a bicycle as “sleek and durable” and roller blades as “smooth and stylish.” After seeing these examples, your friend can then describe a skateboard in the same style without you explaining every detail.
Few-shot prompting works the same way with language models (LLMs). Instead of giving the model no examples (zero-shot) or just one example (one-shot), you provide a few examples in your prompt. These examples help the model understand the style, format, or pattern you want. This way, the model can generate better, more specific responses that match your expectations. It’s like giving the model a small set of clues to guide its creativity!
Certainly! Here’s a real-life example related to the concept of few-shot prompting with large language models (LLMs) from the content you studied:
Example: Customer Support Email Generation for an E-commerce Company
- Scenario: Imagine you work in the customer support team of an online retail company. You often need to respond to customer inquiries about order status, returns, and product details. To maintain a consistent and professional tone, you want to use an LLM to help draft these emails.
- Application of Few-Shot Prompting: You provide the LLM with a few examples of well-written customer support emails. Each example includes a label (e.g., “Order Status Inquiry,” “Return Request”) and a concise, polite response that follows your company’s style. Then, when a new customer inquiry comes in, you label it accordingly and ask the LLM to generate a response in the same style.
- Why This Is Relevant: By including these examples in your prompt (few-shot prompting), the LLM understands the tone, format, and phrasing you want. This leads to more accurate, helpful, and consistent email drafts, saving you time and improving customer satisfaction.
Techniques for mastering complex tasks with AI
Breaking down complex tasks into manageable steps can be a challenge when working with large language models (LLMs). Fortunately, specialized techniques can help you guide the AI through more complicated work. Two powerful approaches are chain-of-thought prompting and prompt chaining.
Chain-of-thought prompting
Chain-of-thought prompting is a prompting technique that involves requesting an LLM to explain its reasoning process step-by-step, from input to final output. This technique essentially asks the AI to “show its work,” making its response more transparent and structured.
To use chain-of-thought prompting, simply include key phrases in your prompt, like:
“Explain your reasoning”
“Go step by step”
These additions indicate that the AI needs to trace its thought process, which often leads to more informative and accurate output.
Let’s go through an example when this technique can be useful:
Consider an HR manager who is developing onboarding materials for a specific department. Here’s how chain-of-thought prompting could be used to identify actionable steps to handle the task:
Prompt:
Create a bulleted list outlining the major duties and responsibilities of a new entry-level design hire at an ad agency. Explain your reasoning step by step.
Notice the additional instructions “explain your reasoning step by step”? You can try using this prompt with and without this phrase to see the difference in AI’s response.
By asking the AI to break down the logic and reasoning behind the duties it suggests, the information you get from the output will also have a rationale for why it was suggested. In this case, it may help the HR manager understand each identify potential gaps and make informed decisions about how to improve their current onboarding process.
Prompt chaining
While chain-of-thought prompting focuses on the reasoning within a single prompt, prompt chaining helps you tackle large projects by breaking them into a series of smaller, connected steps that are all in the same chat. It works like a factory assembly line: the output from one prompt is used as the input for the next, linking all your tasks together like a chain.

This technique involves three key steps:
Task analysis: Start by breaking down your complex task into a series of smaller, logical steps.
Initial prompting: Craft a focused prompt that asks the AI to complete just the first step.
Input/output flow: Use the output from the first prompt as the context for the second prompt. Continue this iterative flow until you complete the task.
Let’s take a look at an example of a prompt chain:
Consider that you are planning a short vacation to Paris. You want to make sure you create an itinerary of the things you love most in a vacation, while maximizing logistics to be as efficient as possible with your time:
Prompt 1: I’m going to [city name] for 3 days. I like art, historical sites, and parks. Suggest a few well-known places I could visit on my trip.
Prompt 2 (chained from Prompt 1): Using those locations, create a logical, day-by-day itinerary that minimizes travel time.
Prompt 3 (chained from Prompt 2): For each day of the itinerary, suggest a few restaurants located near each of the suggested locations.
By breaking the task into logical, digestible steps and using the output of one prompt as the specific input for the next, you transform the AI from a simple answer-generator into a structured collaborator.
Combining prompt chaining with chain-of-thought
You can combine prompt chaining with chain-of-thought prompting to enhance the quality and accuracy of the problem-solving process at any stage.
Let’s take a look at an example where we combine chain-of-thought prompting and prompt chaining:
Imagine you are hosting your next book club meeting and you want suggestions for what book to recommend. You would like to recommend a fantasy novel, but fantasy is not a genre your book club typically reads. The fantasy book you select needs to be engaging without being overwhelming or too complex.
Prompt 1: I am hosting a book club and would like fantasy book recommendations for people that are new to reading this genre. Suggest a few books that we could use.
Prompt 2 (using prompt chaining and chain-of-thought prompting): From that list, can you suggest which book you would recommend if we are looking for a fast-paced read? Explain your reasoning.
This iterative process continues until a final book is selected and vetted. By breaking down the complex task with prompt chaining and incorporating chain-of-thought, you can address more difficult problems while ensuring more accurate results.
Limitations and best practices
While prompt chaining can be a useful technique, it’s important to be aware of potential challenges that can occur—particularly with longer chains.
AI tools can struggle to remember context from earlier parts of the conversation as the prompt chain grows longer. This can lead to:
Inconsistent responses
Overlooking important details from earlier prompts
Difficulty maintaining the overall objective of the task
To overcome these challenges and ensure effective prompt chaining, consider the following strategies:
Use checkpoints: Periodically ask the AI to provide a brief summary of the overall goal.
Work on sub-tasks: Divide very complex tasks into even smaller sub-tasks so that you can treat each as its own shorter chain before moving on to the next.
Recap and redirect: If you notice an AI tool is deviating from the original goal, provide a recap of the essential information and redirect it back to the main objective.
By employing these strategies, you can generate more accurate and relevant output from an AI tool. As with any other prompting technique, prompt chaining relies on finding the right balance between providing necessary context and avoiding information overload.
Improve prompts through exploration
This course content focuses on effective prompting techniques for large language models (LLMs) to get desired AI responses.
Prompting strategies
- Iteratively try different prompts to improve output, such as making responses funnier or less vague.
- Adjust prompt length and context to influence creativity or specificity of the AI’s response.
Advanced prompting techniques
- Use chain-of-thought prompting to have the model reason step-by-step for more accurate answers.
- Ask the model to evaluate its own responses, for example, checking if an answer is vague and discarding it if so.
Experimentation and adaptation
- Experimenting with various prompts and being creative leads to better results.
- Keeping up with rapid AI advancements requires continuous learning and adaptation.
Certainly! One of the more complex concepts in the content is “chain-of-thought prompting.”
Chain-of-Thought Prompting Made Simple Imagine you are solving a puzzle step by step instead of trying to guess the answer all at once. Chain-of-thought prompting is like asking an AI to think out loud and explain each step it takes to reach an answer. For example, if you ask the AI to solve a math problem, you can prompt it to first break the problem into smaller parts, solve the first part, then the next, and so on. This way, the AI’s answer becomes clearer and more accurate because it’s following a logical path, just like you would when solving a puzzle piece by piece.
Think of it like baking a cake: instead of just asking for a cake, you ask the AI to list the ingredients, then explain how to mix them, and finally how to bake it. This step-by-step approach helps the AI give you a better and more detailed response.
Certainly! Here’s a real-life example related to the key concept of “prompting” in AI, especially with large language models (LLMs), as explained in the course content:
Example: Customer Support Chatbot Improvement
- Scenario: A company uses an AI-powered chatbot to handle customer support queries. Initially, the chatbot’s responses are too vague and sometimes not helpful enough.
- Application of Prompting Techniques:
- The team experiments with different prompts to make the chatbot’s answers more specific and useful. For example, instead of asking, “How can I help you?” they prompt the AI with, “Please provide detailed steps to resolve the customer’s issue.”
- They use chain-of-thought prompting by asking the AI to break down complex troubleshooting steps into smaller, clear parts, improving accuracy.
- They also ask the AI to review its own responses for vagueness, discarding or refining answers that are not clear.
- By iterating rapidly on prompts and adjusting the amount of context given, the chatbot becomes more creative when needed and more precise when required.
- Why This Is Relevant:
- This example shows how the concept of prompting directly impacts real-world applications like customer service, where clear and accurate communication is crucial.
- It demonstrates how experimenting with prompts can lead to better AI performance, which is a key takeaway from the course content.
