Give context and examples
The AI knows nothing about your situation unless you tell it. Background and a few examples can transform the answer.
In 60 seconds
Give context and examples
The AI knows nothing about your situation unless you tell it. Background and a few examples can transform the answer.
Adding context
How do I ask for a refund?I bought a mixer grinder online 5 days ago. It stopped working
on the second day. The seller's page says returns are allowed
within 7 days. Help me write a short, polite message to the
seller's support asking for a replacement or a refund.Adding examples (few-shot)
Turn each shop product into a short, friendly WhatsApp line.
Product: Fresh methi, ₹20 per bunch
Line: Fresh methi just arrived! Only ₹20 a bunch. 🌿
Product: Alphonso mangoes, ₹600 per dozen
Line: Alphonso season is here! ₹600 a dozen, sweet and ripe. 🥭
Product: Homemade mango pickle, ₹150 per jar
Line:What good context includes
- Who you are, or who you are writing as
- The situation and what has already happened
- What you want to achieve, and what you don't want
- Rules or limits (a budget, a deadline, a word limit)
- Any text the answer should be based on (pasted notes, a paragraph) — but never secrets
- Assuming the AI knows your earlier chat in another app
- Leaving out the key detail ("returns within 7 days")
- One vague example that doesn't match what you want
- Repeating key facts in the prompt
- Including the rules and dates that matter
- Two or three clear examples in the same pattern
Watch and read more
Lab
A few-shot prompt that reliably produces text in your style.
The problem
Choose a small writing task you repeat often: shop messages, thank-you notes, social captions, class announcements.
- Write one prompt with no examples and send it.
- Write a second prompt with context (who, why, where it will be posted) and 2–3 examples in your style. Send it.
- Ask for 5 new items with the second prompt.
- Compare: which output sounds more like you? What did the examples change?
You are done when
Hard questions
Try to answer before you reveal. If you can answer these, you understood the lesson.
Q1Your examples are all about vegetables. You ask for a line about a phone charger and it sounds odd. Why?Reveal
The model learned the pattern from examples that were all fresh food, so it may copy food-related words ("fresh", "just arrived") that don't fit. Varied examples teach the general pattern (short, friendly, price included) instead of the topic. Choose examples that differ in topic but share the style you want.
Q2Why might pasting a whole 50-page document as context give worse answers than pasting the 2 relevant pages?Reveal
With very long input, the key details are mixed with lots of unrelated text, and models can overlook or mix up details, especially in the middle. Selecting the relevant part focuses the model and makes it easier for you to check the answer against the source.
Questions people ask
How many examples should I give?
Often two or three are enough. More examples can help for tricky patterns, but make them varied so the model learns the pattern, not one specific example.
Does the chatbot remember context from earlier chats?
Within one conversation, it usually remembers earlier messages up to a limit. Across separate chats, it depends on the app's memory features. To be safe, repeat important context in a new chat.
Can I paste a long document as context?
Many chatbots accept long text, but they can miss details in very long inputs. Point to what matters: "Focus on section 3." And never paste private or confidential documents into tools you are not allowed to use for them.
What is "zero-shot"?
A prompt with no examples, just instructions. It works for many simple tasks. Add examples when the output style or format matters.
Lesson test
5 questions. Get 3 right (60%) to pass and complete this lesson.