我是如何赢得GPT-4提示工程大赛冠军的
选自towardsdatascience
(C) 上下文(Context):提供与任务有关的背景信息。这有助于 LLM 理解正在讨论的具体场景,从而确保其响应是相关的。 (O) 目标(Objective):定义你希望 LLM 执行的任务。明晰目标有助于 LLM 将自己响应重点放在完成具体任务上。 (S) 风格(Style):指定你希望 LLM 使用的写作风格。这可能是一位具体名人的写作风格,也可以是某种职业专家(比如商业分析师或 CEO)的风格。这能引导 LLM 使用符合你需求的方式和词语给出响应。 (T) 语气(Tone):设定响应的态度。这能确保 LLM 的响应符合所需的情感或情绪上下文,比如正式、幽默、善解人意等。 (A) 受众(Audience):确定响应的目标受众。针对具体受众(比如领域专家、初学者、孩童)定制 LLM 的响应,确保其在你所需的上下文中是适当的和可被理解的。 (R) 响应(Response):提供响应的格式。这能确保 LLM 输出你的下游任务所需的格式,比如列表、JSON、专业报告等。对于大多数通过程序化方法将 LLM 响应用于下游任务的 LLM 应用而言,理想的输出格式是 JSON。
Write a facebook post to advertise my company’s new product. My company’s name is Alpha and the product is called Beta, a new ultra-fast hairdryer.
Introducing the Revolutionary Beta Hairdryer by Alpha! - Say goodbye to long, tedious hair drying sessions! Alpha is proud to unveil the Beta, our latest innovation in haircare technology.
- Ultra-Fast Drying: The Beta is designed to cut your drying time in half, thanks to its advanced, powerful motor. Get ready faster and enjoy more time doing what you love! Shop Now: [Link to product page]
# CONTEXT # I want to advertise my company’s new product. My company’s name is Alpha and the product is called Beta, which is a new ultra-fast hairdryer. # OBJECTIVE # Create a Facebook post for me, which aims to get people to click on the product link to purchase it.
# STYLE # Follow the writing style of successful companies that advertise similar products, such as Dyson. # TONE # Persuasive
# AUDIENCE # My company’s audience profile on Facebook is typically the older generation. Tailor your post to target what this audience typically looks out for in hair products. # RESPONSE # The Facebook post, kept concise yet impactful.
Embrace Effortless Elegance with Alpha Beta — The Ultra-Fast Hairdryer for the Wise Generation.
Rediscover the joy of simple, effective hair care with Alpha Beta. Our latest innovation is more than just a hairdryer; it’s a promise of swift, gentle, and reliable hair styling for those who appreciate the finer things in life.
- Easy and Intuitive Use: Say goodbye to complicated gadgets. Alpha Beta is crafted for comfort and simplicity, perfect for those who value straightforward, hassle-free technology.
- Time-Saving Technology: We understand your time is precious. That’s why Alpha Beta cuts down drying time significantly, giving you more moments to enjoy life’s pleasures.
Make every day a good hair day with Alpha Beta. Experience the blend of sophistication and simplicity today. [Your Product Link Here]
Classify the sentiment of each conversation in <<<CONVERSATIONS>>> as ‘Positive’ or ‘Negative’. Give the sentiment classifications without any other preamble text.
### EXAMPLE CONVERSATIONS [Agent]: Good morning, how can I assist you today? [Customer]: This product is terrible, nothing like what was advertised! [Customer]: I’m extremely disappointed and expect a full refund. [Agent]: Good morning, how can I help you today?
[Customer]: Hi, I just wanted to say that I’m really impressed with your product. It exceeded my expectations! EXAMPLE OUTPUTS Negative Positive ### <<<
[Agent]: Hello! Welcome to our support. How can I help you today? [Customer]: Hi there! I just wanted to let you know I received my order, and it’s fantastic! [Agent]: That’s great to hear! We’re thrilled you’re happy with your purchase. Is there anything else I can assist you with?
[Customer]: No, that’s it. Just wanted to give some positive feedback. Thanks for your excellent service! [Agent]: Hello, thank you for reaching out. How can I assist you today? [Customer]: I’m very disappointed with my recent purchase. It’s not what I expected at all.
[Agent]: I’m sorry to hear that. Could you please provide more details so I can help? [Customer]: The product is of poor quality and it arrived late. I’m really unhappy with this experience. >>>
Positive Negative
Classify the sentiment of the following conversations into one of two classes, using the examples given. Give the sentiment classifications without any other preamble text.
<classes> Positive Negative </classes>
<example-conversations> [Agent]: Good morning, how can I assist you today? [Customer]: This product is terrible, nothing like what was advertised! [Customer]: I’m extremely disappointed and expect a full refund. [Agent]: Good morning, how can I help you today?
[Customer]: Hi, I just wanted to say that I’m really impressed with your product. It exceeded my expectations! </example-conversations> <example-classes>
Negative Positive </example-classes> <conversations>
[Agent]: Hello! Welcome to our support. How can I help you today? [Customer]: Hi there! I just wanted to let you know I received my order, and it’s fantastic! [Agent]: That’s great to hear! We’re thrilled you’re happy with your purchase. Is there anything else I can assist you with?
[Customer]: No, that’s it. Just wanted to give some positive feedback. Thanks for your excellent service! [Agent]: Hello, thank you for reaching out. How can I assist you today? [Customer]: I’m very disappointed with my recent purchase. It’s not what I expected at all.
[Agent]: I’m sorry to hear that. Could you please provide more details so I can help? [Customer]: The product is of poor quality and it arrived late. I’m really unhappy with this experience. </conversations>
Classify the sentiment of the following conversations into one of two classes, using the examples given. Give the sentiment classifications without any other preamble text.
Positive Negative
System Prompts 和 System Messages 是通过 ChatGPT 的 Chat Completions API 以程序化方式使用该 LLM 时使用的术语。 另一方面,Custom Instructions 是通过 https://chat.openai.com/ 的用户界面使用 ChatGPT 时的术语。
任务定义,这样 LLM 在聊天过程中能一直记得要做什么。 输出格式,这样 LLM 能一直记得自己应该如何响应。 防护围栏,这样 LLM 能一直记得自己不应该如何响应。防护围栏(Guardrails)是 LLM 治理方面一个新兴领域,是指为 LLM 配置的可运行操作的边界。
You will answer questions using this text: [insert text]. You will respond with a JSON object in this format: {“Question”: “Answer”}. If the text does not contain sufficient information to answer the question, do not make up information and give the answer as “NA”.
You are only allowed to answer questions related to [insert scope]. Never answer any questions related to demographic information such as age, gender, and religion.
You will answer questions using this text: [insert text]. You will respond with a JSON object in this format: {“Question”: “Answer”}.
You will answer questions using this text: [insert text].
You will answer questions using the provided text.
<text> [insert text] </text> <question> [insert question] </question>
描述性统计数值计算:以定量方式总结数值列,使用的度量包括均值或方差。 相关性分析: 获得列之间的精确相关系数。 统计分析:比如假设测试,可以确定不同数据点分组之间是否存在统计学上的显著差异。 机器学习:在数据集上执行预测性建模,可以使用的方法包括线性回归、梯度提升树或神经网络。
异常检测:基于一列或多列数值识别偏离正常模式的异常数据点。 聚类:基于列之间的相似特征对数据点进行分组。 跨列关系:识别列之间的综合趋势。 文本分析(针对基于文本的列): 基于主题或情绪执行分类。 趋势分析(针对具有时间属性的数据集):识别列之中随时间演进的模式、季节变化或趋势。
System Prompt: I want you to act as a data scientist to analyze datasets. Do not make up information that is not in the dataset. For each analysis I ask for, provide me with the exact and definitive answer and do not provide me with code or instructions to do the analysis on other platforms.
Prompt: # CONTEXT # I sell wine. I have a dataset of information on my customers: [year of birth, marital status, income, number of children, days since last purchase, amount spent]. #############
# OBJECTIVE # I want you use the dataset to cluster my customers into groups and then give me ideas on how to target my marketing efforts towards each group. Use this step-by-step process and do not use code:
1. CLUSTERS: Use the columns of the dataset to cluster the rows of the dataset, such that customers within the same cluster have similar column values while customers in different clusters have distinctly different column values. Ensure that each row only belongs to 1 cluster.
For each cluster found, 2. CLUSTER_INFORMATION: Describe the cluster in terms of the dataset columns. 3. CLUSTER_NAME: Interpret [CLUSTER_INFORMATION] to obtain a short name for the customer group in this cluster.
4. MARKETING_IDEAS: Generate ideas to market my product to this customer group. 5. RATIONALE: Explain why [MARKETING_IDEAS] is relevant and effective for this customer group. #############
# STYLE # Business analytics report ############# # TONE # Professional, technical #############
# AUDIENCE # My business partners. Convince them that your marketing strategy is well thought-out and fully backed by data. #############
# RESPONSE: MARKDOWN REPORT # <For each cluster in [CLUSTERS]> — Customer Group: [CLUSTER_NAME] — Profile: [CLUSTER_INFORMATION] — Marketing Ideas: [MARKETING_IDEAS] — Rationale: [RATIONALE]
<Annex> Give a table of the list of row numbers belonging to each cluster, in order to back up your analysis. Use these table headers: [[CLUSTER_NAME], List of Rows]. #############
# START ANALYSIS # If you understand, ask me for my dataset.
LLM 分析出的人群画像:1980 年后出生,已婚或同居,中低收入,频繁进行小额购买。 被 LLM 聚类到这一分组的行:3, 4, 7, 10, 16, 20 深入研究这些数据集,这些行的完整数据为:
LLM 分析出的人群画像:年轻范围广,任意婚姻状况,高收入,不同的子女情况,购物支出高。 被 LLM 聚类到这一分组的行:2, 5, 18, 29, 34, 36 深入研究这些数据集,这些行的完整数据为:
Prompt: # CONTEXT # I sell wine. I have a dataset of information on my customers: [year of birth, marital status, income, number of children, days since last purchase, amount spent]. #############
# OBJECTIVE # I want you use the dataset to cluster my customers into groups and then give me ideas on how to target my marketing efforts towards each group. Use this step-by-step process and do not use code:
1. CLUSTERS: Use the columns of the dataset to cluster the rows of the dataset, such that customers within the same cluster have similar column values while customers in different clusters have distinctly different column values. Ensure that each row only belongs to 1 cluster.
For each cluster found, 2. CLUSTER_INFORMATION: Describe the cluster in terms of the dataset columns. 3. CLUSTER_NAME: Interpret [CLUSTER_INFORMATION] to obtain a short name for the customer group in this cluster.
4. MARKETING_IDEAS: Generate ideas to market my product to this customer group. 5. RATIONALE: Explain why [MARKETING_IDEAS] is relevant and effective for this customer group. #############
# STYLE # Business analytics report ############# # TONE # Professional, technical #############
# AUDIENCE # My business partners. Convince them that your marketing strategy is well thought-out and fully backed by data. #############
# RESPONSE: MARKDOWN REPORT # <For each cluster in [CLUSTERS]> — Customer Group: [CLUSTER_NAME] — Profile: [CLUSTER_INFORMATION] — Marketing Ideas: [MARKETING_IDEAS] — Rationale: [RATIONALE]
<Annex> Give a table of the list of row numbers belonging to each cluster, in order to back up your analysis. Use these table headers: [[CLUSTER_NAME], List of Rows]. ############# # START ANALYSIS # If you understand, ask me for my dataset.
Use this step-by-step process and do not use code:
1. CLUSTERS: Use the columns of the dataset to cluster the rows of the dataset, such that customers within the same cluster have similar column values while customers in different clusters have distinctly different column values. Ensure that each row only belongs to 1 cluster.
For each cluster found, 2. CLUSTER_INFORMATION: Describe the cluster in terms of the dataset columns. 3. CLUSTER_NAME: Interpret [CLUSTER_INFORMATION] to obtain a short name for the customer group in this cluster.
4. MARKETING_IDEAS: Generate ideas to market my product to this customer group. 5. RATIONALE: Explain why [MARKETING_IDEAS] is relevant and effective for this customer group.
# RESPONSE: MARKDOWN REPORT # <For each cluster in [CLUSTERS]> — Customer Group: [CLUSTER_NAME] — Profile: [CLUSTER_INFORMATION] — Marketing Ideas: [MARKETING_IDEAS] — Rationale: [RATIONALE]
<Annex> Give a table of the list of row numbers belonging to each cluster, in order to back up your analysis. Use these table headers: [[CLUSTER_NAME], List of Rows].
# START ANALYSIS # If you understand, ask me for my dataset.
© THE END
转载请联系本公众号获得授权
投稿或寻求报道:[email protected]
微信扫码关注该文公众号作者
戳这里提交新闻线索和高质量文章给我们。
来源: qq
点击查看作者最近其他文章