Worse | Better |
---|---|
How do I add numbers in Excel | How do I add up a row of dollar amounts in Excel? I want to do this automatically for a whole sheet of rows with all the totals ending up on the right in a column called “Total” |
调接口时System和User分别给予prompt
response = client.chat.completions.create(
messages=[
{
"role": "system",
"content": "When I ask for help to write something, you will reply with a document that contains at least one joke about them in every paragraph",
},
{
"role": "user",
"content": "Write a thank you note to my steel bolt vendor for getting the delivery in on time and in short notice",
},
],
model="gpt-3.5-turbo",
)
SYSTEM | You will be provided with a pari of articles(delimited with XML tags) about the same topic. First summarize the arguments of each article. Then indicate which of them makes a better argument and explain why |
---|---|
USER |
|
SYSTEM | Use the following step-by-step instructions to respond to user inputs. Step1 - The user will provide you with text in triple quotes. Summarize this text in one sentence with a prefix that says “Summary:” Step2 - Translate the summary from Step1 into Chinese, with a prefix that says “Translation” |
---|---|
USER | “”“insert text here”“” |
few-shot prompting
Summarize the text delimited by triple quotes in about 50 words
SYSTEM | Use the provided articles delimited by triple quotes to answer questions. If the answer cannot be found in the articles, write “I cound not find an answer” |
---|---|
User | Question: |
eg: 首先,
子任务1: 根据用户的输入对问题进行分类
System:
You will be provided with customer service queries. Classify each query into a primary category and a secondary category. Provide your output in json format with the keys: primary and secondary.
Primary categories: Billing, Technical Support, Account Management, or General Inquiry.
Billing secondary categories:
Technical Support secondary categories:
Account Management secondary categories:
General Inquiry secondary categories:
USER: I need to get my Internet working again
子任务2: 根据上一个子任务的结果输出解决办法
**SYSTEM:**You will be provided with customer service inquiries that require troubleshooting in a technical support context. Help the user by:
可以达到模型输入上限前总结,也可以用emmbeddings
SYSTEM
First work out your own solution to the problem. Then compare your solution to the student’s solution and evaluate if the student’s solution is correct or not. Don’t decide if the student’s solution is correct until you have done the problem yourself.
USER
Problem Statement: I’m building a solar power installation and I need help working out the financials.
Student’s Solution: Let x be the size of the installation in square feet.
The student’s solution is incorrect. They made an error in the maintenance cost calculation, using 100x instead of 10x. The correct total cost for the first year of operations is 360x + 100,000.
在不想给用户展示推理过程的时候使用这一技巧
SYSTEM
Follow these steps to answer the user queries.
Step 1 - First work out your own solution to the problem. Don’t rely on the student’s solution since it may be incorrect. Enclose all your work for this step within triple quotes (“”").
Step 2 - Compare your solution to the student’s solution and evaluate if the student’s solution is correct or not. Enclose all your work for this step within triple quotes (“”").
Step 3 - If the student made a mistake, determine what hint you could give the student without giving away the answer. Enclose all your work for this step within triple quotes (“”").
Step 4 - If the student made a mistake, provide the hint from the previous step to the student (outside of triple quotes). Instead of writing “Step 4 - …” write “Hint:”.
USER
Problem Statement:
Student Solution:
**USER:**Are there more relevant excerpts? Take care not to repeat excerpts. Also ensure that excerpts contain all relevant context needed to interpret them - in other words don’t extract small snippets that are missing important context.
SYSTEM
You can write and execute Python code by enclosing it in triple backticks, e.g. code goes here
. Use this to perform calculations.
USER
Find all real-valued roots of the following polynomial: 3x**5 - 5x4 - 3*x3 - 7*x - 10.
SYSTEM
You will be provided with text delimited by triple quotes that is supposed to be the answer to a question. Check if the following pieces of information are directly contained in the answer: