Share
Embed
Neha Khanna
Neha Khanna
April 25, 2024
Transcript
31 slides
-
Mastering the art of crafting prompts for your use case
Neha Khanna Wayfair Speakerdeck.com/neha0810 -
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 -
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 -
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. -
Prompt Design is not just about asking, it's about asking
most effectively -
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. -
Set a goal for yourself to go away from this
workshop with one idea to improve the quality of your output -
Importance of Prompt Engineering Efficiency Safety and Security Precision and
Relevance Customization -
It is the science of making machines that can think
like humans. -
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 -
You're a content writer and you have to craft a
prompt that describes this product -
First Step "Write a compelling description for a grey sectional
couch with the following features, high density foam fill, storage seat, tuxedo arm" -
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 -
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 -
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 -
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. -
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 -
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. -
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" -
Precision and Relevance Bias Mitigation Controlled Output Efficiency Ethical Considerations
Customization Missing Details Auto-QA