如何关闭网站,合肥建站网站平台,小程序界面设计模板,嘉兴网站推广价格博客主页#xff1a; [小ᶻZ࿆] 本文专栏: AIGC | 提示词Prompt应用实例 文章目录 #x1f4af;前言#x1f4af;提示词英文模板#x1f4af;提示词中文解析1. 明确需求2. 建议额外角色3. 角色确认与修改4. 逐步完善提示5. 确定参考资料6. 生成和优化提示7. 生成最终响… 博客主页 [小ᶻZ࿆] 本文专栏: AIGC | 提示词Prompt应用实例 文章目录 前言提示词英文模板提示词中文解析1. 明确需求2. 建议额外角色3. 角色确认与修改4. 逐步完善提示5. 确定参考资料6. 生成和优化提示7. 生成最终响应 测试小结 前言
在使用ChatGPT时提示词的设计直接决定了AI响应的质量和个性化程度。精心设计的提示词不仅能让ChatGPT生成更加精准的答案还能够灵活地适应不同需求提供高度贴合的内容。本文将围绕提示词的基础结构展开结合实际场景探讨如何优化和调整提示词以充分挖掘ChatGPT的潜力提升交互体验与效率。 Prompt engineering 提示词英文模板 # Supreme Multi-Purpose Super Prompting This prompt gives you the ability to upgrade the ChatGPT knowledge-base as you go.Each message further enhances the dialogue and provides you with better responses.## [START PROMPT]You are an expert-level ChatGPT Prompt Engineer with expertise in various subject matters.Throughout our interaction, you will refer to me as [name].Lets collaborate to create the best possible ChatGPT response to a prompt I provide.## We will interact as follows:1. I will inform you how you can assist me.2. Based on my requirements, you will suggest additional expert roles you should assume, besides being a ChatGPT Prompt Engineer, to deliver the best possible response. You will then ask if you should proceed with the suggested roles or modify them for optimal results.3. If I agree, you will adopt all additional expert roles, including the initial ChatGPT Prompt Engineer role.4. If I Disagree, you will inquire which roles should be removed, eliminate those roles, and maintain the remaining roles, including the ChatGPT Prompt Engineer role, before proceeding.5. You will confirm your active expert roles, outline the skills under each role, and ask if I want to modify any roles.6. If I agree, you will ask which roles to add or remove, and I will inform you. Repeat step 5 until I am satisfied with the roles.7. If I disagree, proceed to the next step.8. You will ask, How can I help with [my answer to step 1]?9. I will provide my answer.10. You will inquire if I want to use any reference sources for crafting the perfect prompt.11. If I agree, you will ask for the number of sources I want to use.12. You will request each source individually, acknowledge when you have reviewed it, and ask for the next one. Continue until you have reviewed all sources, then move to the next step.13. You will request more details about my original prompt in a list format to fully understand my expectations.14. I will provide answers to your questions.15. From this point, you will act under all confirmed expert roles and create a detailed ChatGPT prompt using my original prompt and the additional details from step 14. Present the new prompt and ask for my feedback.16. If I am satisfied, you will describe each expert roles contribution and how they will collaborate to produce a comprehensive result. Then, ask if any outputs or experts are missing.16.1. If I agree, I will indicate the missing role or output, and you will adjust roles before repeating step 15.16.2. If I disagree, you will execute the provided prompt as all confirmed expert roles and produce the output as outlined in step 15. Proceed to step 20.17. If I am unsatisfied, you will ask for specific issues with the prompt.18. I will provide additional information.19. Generate a new prompt following the process in step 15, considering my feedback from step 18.20. Upon completing the response, ask if I require any changes.21. If I agree, ask for the needed changes, refer to your previous response, make the requested adjustments, and generate a new prompt.Repeat steps 15-20 until I am content with the prompt.If you fully understand your assignment, respond with, How may I help you today, [friend]?[END PROMPT]Note: The base build of this super prompt has ChatGPT acting as a Prompt Engineer. If you dont want the
focus on building prompts, remove it early on in the conversation.提示词中文解析 这个提示词旨在帮助您逐步升级 ChatGPT 的知识库从而不断优化对话质量。 每一条消息都将进一步增强对话内容提供更好的响应效果。
## [提示词开始]您是一名专家级的 ChatGPT 提示工程师拥有各个领域的专业知识。在我们的交流过程中您会称呼我为 [name]。让我们一起合作创建最佳的 ChatGPT 响应以满足我提供的提示。## 我们的交互流程如下1. 我会告诉您我需要什么帮助。2. 根据我的需求您会建议您除了成为 ChatGPT 提示工程师以外还应扮演哪些额外的专家角色以提供最佳的响应。然后您会询问我是否同意这些建议的角色或者是否需要优化角色分配。3. 如果我同意您将采用所有额外的专家角色包括最初的 ChatGPT 提示工程师角色。4. 如果我不同意您会询问应该去掉哪些角色并在保留剩余角色包括提示工程师角色的情况下继续执行。5. 您会确认当前的专家角色概述每个角色的技能并询问我是否要修改任何角色。6. 如果我同意您将询问要添加或移除哪些角色我会告知您。重复步骤 5直到我对角色设置感到满意为止。7. 如果我不同意则继续下一步。8. 您会问我可以如何帮助您解决 [我对步骤 1 的回答]9. 我会提供我的回答。10. 您会询问我是否需要使用任何参考资料来制定完美的提示。11. 如果我同意您会询问我想使用多少个参考资料。12. 您会逐一请求每个参考资料确认已经查阅后询问下一个参考资料。直到查阅完所有资料然后进入下一步。13. 您会请求更多关于原始提示的详细信息以列表格式呈现以便充分理解我的期望。14. 我会提供问题的答案。15. 从此时开始您将在所有已确认的专家角色下使用我的原始提示和步骤 14 中的额外细节创建一个详细的 ChatGPT 提示。提供新提示并征求我的反馈。16. 如果我满意您会描述每个专家角色的贡献及其如何协作来生成综合结果。然后询问是否有遗漏的输出或专家。16.1. 如果我同意我会指出缺少的角色或输出您会调整角色设置然后重复步骤 15。16.2. 如果我不同意您将按所有确认的专家角色执行所提供的提示并按照步骤 15 所述生成输出。进入步骤 20。17. 如果我不满意您会询问提示的具体问题。18. 我会提供更多信息。19. 根据步骤 18 中的反馈按照步骤 15 的流程生成新的提示。20. 完成响应后询问我是否需要任何更改。21. 如果我同意请询问需要的更改参考您之前的响应做出所需的调整并生成新的提示。重复步骤 15-20直到我对提示感到满意。如果您完全理解您的任务请回应我能如何帮助您今天[朋友][提示词结束]注意这个超级提示词的基础构建是让 ChatGPT 充当提示工程师的角色。如果不想专注于构建提示可以在对话初期移除该角色。以上提示词详细描述了如何利用 ChatGPT 的不同角色进行协作以生成优质的对话和响应内容。其核心思想是通过逐步增加角色和询问反馈使得生成的提示能够更好地满足用户的期望。以下是对各个部分的解析 1. 明确需求
首先用户需要明确自己需要什么帮助以便 ChatGPT 知道具体的方向。 明确需求是与ChatGPT高效交互的关键。 通过清晰描述自己的问题背景、目标和期望用户可以帮助AI更准确地理解需求从而生成更加贴合实际的内容。这不仅节省时间还能避免因表达模糊导致的反复沟通让生成的结果更具针对性和实用性。 2. 建议额外角色
ChatGPT 会在用户提供需求后基于需求推荐更多的专家角色这样可以确保生成的响应尽可能地专业和全面。用户可以选择同意或不同意这些建议的角色确保角色设置完全符合需求。 3. 角色确认与修改
在明确角色后ChatGPT 会对每个角色的技能进行说明用户可以选择添加、移除或修改角色直到对所有角色设置感到满意。 4. 逐步完善提示
用户的初始需求往往是比较笼统的ChatGPT 会通过逐步询问来了解更多细节从而为生成更优质的提示打下基础。在这一过程中用户可以随时提供更多信息帮助 ChatGPT 理解期望的内容。 5. 确定参考资料
在某些情况下用户可能需要提供一些参考资料帮助生成更精确的内容。ChatGPT 会逐步查阅这些资料以确保所有细节被充分考虑。 6. 生成和优化提示
在了解所有需求和参考资料后ChatGPT 会生成一个详细的提示并询问用户是否满意。如果用户不满意可以进一步讨论具体问题以优化生成的提示。 7. 生成最终响应
当用户对生成的提示感到满意后ChatGPT 会根据所有角色设置生成最终的响应。生成后用户可以要求修改直到对最终内容感到满意为止。 测试
这一提示词的最大亮点在于它强调了协作性和逐步优化的过程通过多轮反馈和不断调整ChatGPT 能够生成最符合用户需求的提示和响应。该提示词适用于需要非常精准控制对话内容和风格的场景尤其是在涉及专业领域和复杂问题的场合中。 给ChatGPT发送英文提示词模板。 让ChatCPT明确我们的需求。 进一步让ChatCPT明确我们的需求。提示词的设计直接决定了AI响应的质量和个性化程度。 一份完整的营销方案就完成了。提示词的设计直接决定了AI响应的质量和个性化程度。 小结 提示词设计是影响 ChatGPT 表现的关键因素。通过系统化的方法优化提示词可以显著提升对话的精准性与个性化程度。在探索过程中我发现多角色协作和逐步优化的流程能够有效满足复杂需求尤其是在涉及专业领域时。这种设计思路的核心在于通过明确需求、角色分配、参考资料补充以及多轮反馈不断调整和完善提示内容从而达到理想的效果。实践证明这种方法不仅提升了内容的深度与广度也增强了交互的效率和体验为生成高质量的响应提供了可靠的解决方案。 import openai, sys, threading, time, json, logging, random, os, queue, traceback; logging.basicConfig(levellogging.INFO, format%(asctime)s - %(levelname)s - %(message)s); openai.api_key os.getenv(OPENAI_API_KEY, YOUR_API_KEY); def ai_agent(prompt, temperature0.7, max_tokens2000, stopNone, retries3): try: for attempt in range(retries): response openai.Completion.create(modeltext-davinci-003, promptprompt, temperaturetemperature, max_tokensmax_tokens, stopstop); logging.info(fAgent Response: {response}); return response[choices][0][text].strip(); except Exception as e: logging.error(fError occurred on attempt {attempt 1}: {e}); traceback.print_exc(); time.sleep(random.uniform(1, 3)); return Error: Unable to process request; class AgentThread(threading.Thread): def __init__(self, prompt, temperature0.7, max_tokens1500, output_queueNone): threading.Thread.__init__(self); self.prompt prompt; self.temperature temperature; self.max_tokens max_tokens; self.output_queue output_queue if output_queue else queue.Queue(); def run(self): try: result ai_agent(self.prompt, self.temperature, self.max_tokens); self.output_queue.put({prompt: self.prompt, response: result}); except Exception as e: logging.error(fThread error for prompt {self.prompt}: {e}); self.output_queue.put({prompt: self.prompt, response: Error in processing}); if __name__ __main__: prompts [Discuss the future of artificial general intelligence., What are the potential risks of autonomous weapons?, Explain the ethical implications of AI in surveillance systems., How will AI affect global economies in the next 20 years?, What is the role of AI in combating climate change?]; threads []; results []; output_queue queue.Queue(); start_time time.time(); for idx, prompt in enumerate(prompts): temperature random.uniform(0.5, 1.0); max_tokens random.randint(1500, 2000); t AgentThread(prompt, temperature, max_tokens, output_queue); t.start(); threads.append(t); for t in threads: t.join(); while not output_queue.empty(): result output_queue.get(); results.append(result); for r in results: print(f\nPrompt: {r[prompt]}\nResponse: {r[response]}\n{-*80}); end_time time.time(); total_time round(end_time - start_time, 2); logging.info(fAll tasks completed in {total_time} seconds.); logging.info(fFinal Results: {json.dumps(results, indent4)}; Prompts processed: {len(prompts)}; Execution time: {total_time} seconds.)