1. सीखें
  2. /
  3. पाठ्यक्रम
  4. /
  5. Introduction to Claude Models

Connected

अभ्यास

Few shot prompting for product reviews

You work for BrightCart, an e-commerce platform. Product pages are now showing an AI “Quick-Read” badge that condenses thousands of customer reviews into bite-sized insights. To simplify the insights even further, you'll be splitting summaries into two sentences: a the standout positive takeaway as the first one, and one honest concern as the second.

Teach Claude that exact format via few-shot prompting so every future product gets the same balanced summary.

The anthropic library, client, and a raw_review sample are pre-loaded.

निर्देश

100 XP
  • Set the correct role for Claude's first example response.
  • Ask to write a 2-sentence summary about the product.
  • Pass the complete messages array to the API call.