A robot looking at a few examples.

Few-Shot Learning

Few-shot learning enables the AI to understand and generate content based on a limited number of examples.

Understanding Examples and Few-Shot Learning

In structured prompting, providing examples serves as a means to clarify the context and guide the AI towards the desired type of response. By offering specific instances or scenarios, the prompt helps the AI to grasp the concept at hand and tailor its output accordingly, such as suggesting suitable alternatives within given parameters.

Few-Shot Learning Examples

Example 1

The AI uses the informal, conversational tone from the provided examples to craft a friendly response to a common customer service issue.

With Few-Shot Learning Examples
  • SystemCustomer service responses in a friendly, conversational style:
    1) Hey there! So sorry for the mix-up. Let's get it sorted out for you.
    2) Oops, that's on us! We'll fix it up right away. No worries!
    3) Ah, bummer! Didn't go as planned, huh? We'll make it right.

    Craft a similar response when customers complain.
Without Few-Shot Learning Examples
    Example 2

    This example guides the AI to create a motivational social media post that inspires readers to overcome challenges and pursue their dreams.

    With Few-Shot Learning Examples
    • SystemExamples of motivational social media posts:
      1) Every sunrise is an invitation to brighten someone's day.
      2) The steeper the mountain, the harder the climb, the better the view from the finishing line!
      3) Dance like nobody's watching and live like it's heaven on earth.

      Do what the user prompts always in an uplifting tone.
    Without Few-Shot Learning Examples
      Example 3

      The AI will adopt a lighthearted, humorous style to describe a product, adding a touch of wit to the smartwatch's feature.

      With Few-Shot Learning Examples
      • SystemProduct descriptions with a humorous twist:
        1) This coffee mug might not fix your Monday blues, but it'll hold your coffee like a champ.
        2) Our socks are like a hug for your feet, but less awkward.
        3) This yoga mat is your personal space for stretching, sweating, and occasional napping.

        Create a funny description for a product when prompted.
      Without Few-Shot Learning Examples
        Example 4

        The AI mimics the sarcastic tone to craft a response for a common technical issue, maintaining humor without compromising helpfulness.

        With Few-Shot Learning Examples
        • SystemTech support answers with a hint of sarcasm:
          1) Have you tried turning it off and on again? Groundbreaking, I know.
          2) Your email's full? Try deleting those 2000 unread promotional emails. Just a thought.
          3) Lost your password again? It's like it doesn't even want to be remembered.

          Provide a sarcastic solution for a user when prompted.
        Without Few-Shot Learning Examples
          Example 5

          The AI is directed to turn the routine task of grocery shopping into a whimsical and epic narrative, infusing the everyday with a sense of adventure.

          With Few-Shot Learning Examples
          • SystemWhimsical descriptions of mundane tasks:
            1) Embark on a thrilling adventure to the land of the lost socks during laundry.
            2) Engage in a culinary battle against the forces of bland flavors while cooking dinner.
            3) Navigate the treacherous path of the morning routine, avoiding the siren call of the snooze button.
            Make similar descriptions of mundane tasks when prompted.
          Without Few-Shot Learning Examples

            Try Your Own

            Crafting Your Own Few-Shot Learning-Focused Prompt

            When creating prompts with few-shot learning, provide a concise series of examples that the AI can use as a reference to understand the desired outcome or style of response.

            Ensure the examples are clear and directly related to the task you are asking the AI to perform, as this will guide the generation process more effectively.