Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Neha Khanna

Neha Khanna
April 25, 2024
54

Neha Khanna

Neha Khanna

April 25, 2024
Tweet

Transcript

  1. Mastering the art of crafting prompts for your use case

    Neha Khanna Wayfair Speakerdeck.com/neha0810
  2. What to expect? 1 2 3 Intro to Prompt Engineering

    4 5 6 Interactive Session: Crafting effective prompts Ice Breaker! Fundamentals to AI, LLMs Evaluation & Metrics Auto-QA 5 Key Takeaways 6 Q&A
  3. Prompt Design refers to the systematic process of designing, constructing

    and refining prompts used to interact with AI models. They can take form of questions, statements or instructions that serve as input to AI systems
  4. While prompt design focuses on crafting high-quality prompts, prompt engineering

    is centered on controlling and managing their application. Both elements are crucial for an optimized well-rounded AI strategy for organizations.
  5. I want you to leave this workshop with a strong

    understanding of how to talk to an AI tool to get the outcomes you want.
  6. Set a goal for yourself to go away from this

    workshop with one idea to improve the quality of your output
  7. Natural Language Processing Focuses on making computers understand and generate

    human language Language Models AI model that can perform tasks such as generating and classifying text, answer questions or translate text
  8. You're a content writer and you have to craft a

    prompt that describes this product
  9. First Step "Write a compelling description for a grey sectional

    couch with the following features, high density foam fill, storage seat, tuxedo arm"
  10. Specify the role + context Act as a content writer.

    Your task is to write a product description for a sectional couch. Include the following product features: Seat Fill Material : Foam Upholstery Material : Polyester Storage : Yes Detail : Tuxedo Arm
  11. Set output length Act as a content writer. Your task

    is to write a product description between 75-100 words for a sectional couch. Include the following product features: Seat Fill Material : Foam Upholstery Material : Polyester Storage : Yes Detail : Tuxedo Arm
  12. Use sentence guidance for output length Act as a content

    writer. Your task is to write a product description for a sectional couch. Provide a two- or three-sentence response. Include the following product features: Seat Fill Material : Foam Upholstery Material : Polyester Storage : Yes Detail : Tuxedo Arm
  13. Avoid conflicting terms Act as a content writer. Your task

    is to write a product description for a sectional couch. Provide a two- or three-sentence response. Include the following product features: Seat Fill Material : Foam Upholstery Material : Polyester Storage : Yes Detail : Tuxedo Arm Write the descriptions in a tone that is professional, infused with an informal, conversational style.
  14. Form Matters • <Context> Act as a content writer •

    <Instructions> Your task is • <Input> Include the following • <Output indicator> Write the description in a tone; rules; format
  15. Grammar Accuracy If the output has correct grammar? Example of

    prompts: • How would you rate the grammar of the output on a scale of "Poor", "Good" and "Excellent" Output only the rating. • Is the grammar of the description correct or not? Output only in Y/N Output is free of any hallunications Example of prompts: • Does the product description accurately include all the features specified? Only output in Yes or No. • How many features from the product feature list are included in the provided product description? Brand Voice Missing Details Output reflects the correct tone/brand voice Example of prompts: • Is the voice of this product description friendly, optimistic and informational? How would you rate the tone of voice using a scale of "Poor", "Good" and "Excellent" Output only the rating. All key features are included Example of prompts: • Are there any key details from the list of product features that are missing from the product description? Output in a single paragraph. • (follow up) Include any key missing product features from the description.
  16. Gather Input • Gather all the input data • Product

    Specifications • SKU Name • Additional keywords/phrases • Product Category AUTO-QA Craft Prompt • Craft the prompt • Iterate until x% of output fits your requirement • Craft the prompt for evaluation • Leverage API calls with desired prompts to evaluate the output Evaluation Prompts Success metrics • Y% of data is "passed"