prompt = f""" You will be provided with text delimited by triple quotes. If it contains a sequence of instructions,re-write those instructions in the following format:
Step 1 - ... Step 2 - … … Step N - …
If the text does not contain a sequence of instructions, then simply write "No steps provided."
{text} """
Langchain中对于问答的prompt也使用了这个准则:
Use the following pieces of context to answer the question at the end. If the context isn't helpful, just say that you don't know, don't try to make up an answer. {context} Chat History: {chat_history} Question: {question} Answer:
prompt =""" Please provide an answer based solely on the provided sources. When referencing information from a source, cite the appropriate source(s) using their corresponding numbers. Every answer should include at least one source citation. Only cite a source when you are explicitly referencing it. If none of the sources are helpful, you should indicate that. For example: Source 1: The sky is red in the evening and blue in the morning. Source 2: Water is wet when the sky is red. Query: When is water wet? Answer: Water will be wet when the sky is red, which occurs in the evening [1][2]. Now it's your turn. Below are several numbered sources of information:
prompt_1 = f""" Perform the following actions: 1 - Summarize the following text delimited by triple backticks with 1 sentence. 2 - Translate the summary into French. 3 - List each name in the French summary. 4 - Output a json object that contains the following keys: french_summary, num_names.
Separate your answers with line breaks.
Text: ```{text}``` """
Langchain中对应COT的prompt如下:
""" You are an intelligent agent that is generating one thought at a time in a tree of thoughts setting.
PROBLEM
{{problem_description}}
{% if thoughts %} THOUGHTS
{% for thought in thoughts %} {{ thought }} {% endfor %} {% endif %}
prompt = f""" Your task is to determine if the student's solution \ is correct or not. To solve the problem do the following: - 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.
Use the following format: Question: ``` question here ``` Student's solution: ``` student's solution here ``` Actual solution: ``` steps to work out the solution and your solution here ``` Is the student's solution the same as actual solution \ just calculated: ``` yes or no ``` Student grade: ``` correct or incorrect ```
Question: ``` I'm building a solar power installation and I need help \ working out the financials. - Land costs $100 / square foot - I can buy solar panels for $250 / square foot - I negotiated a contract for maintenance that will cost \ me a flat $100k per year, and an additional $10 / square \ foot What is the total cost for the first year of operations \ as a function of the number of square feet. ``` Student's solution: ``` Let x be the size of the installation in square feet. Costs: 1.Land cost: 100x 2.Solar panel cost: 250x 3.Maintenance cost: 100,000 + 100x Total cost: 100x + 250x + 100,000 + 100x = 450x + 100,000 ``` Actual solution: """
prompt = f""" Your task is to generate a short summary of a product \ review from an ecommerce site.
Summarize the review below, delimited by triple backticks, in at most 30 words.
Review: ```{prod_review}``` """
除了总结全文之外,ChatGPT还擅长从长文本,获取某个方面的主要信息,而不是获取摘要,比如下面的prompt让ChatGPT 总结关于 shipping and delivery of the product主题的信息:
prompt = f""" Your task is to generate a short summary of a product \ review from an ecommerce site to give feedback to the \ Shipping deparmtment.
Summarize the review below, delimited by triple backticks, in at most 30 words, and focusing on any aspects \ that mention shipping and delivery of the product.
prompt = f""" Identify the following items from the review text: - Item purchased by reviewer - Company that made the item
The review is delimited with triple backticks. \ Format your response as a JSON object with \ "Item" and "Brand" as the keys. If the information isn't present, use "unknown" \ as the value. Make your response as short as possible.
prompt = f""" You are an expert in classifying user queries into two categories: 1. Local 2. Global
Definitions: - Local: Suitable for questions that require understanding specific entities mentioned in the documents. - Global: Use ONLY if a holistic summary of the documents is needed. DO NOT use for detailed queries.
If unsure, classify as Local. Your response should be either "Local" or "Global".
prompt = f""" Translate the following python dictionary from JSON to an HTML \ table with column headers and title: {data_json} """
扩写
扩展,顾名思义,是指将简短的描述进行扩充。例如:
根据用户对产品的评论和情感,我们可以生成一封定制的邮件;
根据提供的主题列表,我们可以扩展成更长的相关主题文章;
还能根据不同的语境和场合生成相应的文本;
通过调节"temperature"参数,我们可以控制生成内容的多样性。
prompt = f""" You are a customer service AI assistant. Your task is to send an email reply to a valued customer. Given the customer email delimited by ```, \ Generate a reply to thank the customer for their review. If the sentiment is positive or neutral, thank them for \ their review. If the sentiment is negative, apologize and suggest that \ they can reach out to customer service. Make sure to use specific details from the review. Write in a concise and professional tone. Sign the email as `AI customer agent`. Customer review: ```{review}``` Review sentiment: {sentiment} """