【AIGC】如何使用高价值提示词Prompt提升ChatGPT响应质量

【AIGC】如何使用高价值提示词Prompt提升ChatGPT响应质量

在这里插入图片描述

博客主页: [小ᶻ☡꙳ᵃⁱᵍᶜ꙳]本文专栏: AIGC |提示词Prompt应用实例


文章目录


在这里插入图片描述

💯前言

在使用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]. Let's 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 role's 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 don't 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 能够生成最符合用户需求的提示和响应。该提示词适用于需要非常精准控制对话内容和风格的场景,尤其是在涉及专业领域和复杂问题的场合中。

一份完整的营销方案就完成了。提示词的设计直接决定了AI响应的质量和个性化程度。

在这里插入图片描述

进一步让ChatCPT明确我们的需求。提示词的设计直接决定了AI响应的质量和个性化程度。

在这里插入图片描述

让ChatCPT明确我们的需求。

在这里插入图片描述

给ChatGPT发送英文提示词模板。

在这里插入图片描述

💯小结

在这里插入图片描述


提示词设计是影响 ChatGPT 表现的关键因素。通过系统化的方法优化提示词,可以显著提升对话的精准性个性化程度。在探索过程中,我发现多角色协作和逐步优化的流程,能够有效满足复杂需求,尤其是在涉及专业领域时。这种设计思路的核心在于,通过明确需求、角色分配、参考资料补充以及多轮反馈,不断调整和完善提示内容,从而达到理想的效果。实践证明,这种方法不仅提升了内容的深度与广度,也增强了交互的效率和体验,为生成高质量的响应提供了可靠的解决方案。


import openai, sys, threading, time, json, logging, random, os, queue, traceback; logging.basicConfig(level=logging.INFO,format="%(asctime)s - %(levelname)s - %(message)s"); openai.api_key = os.getenv("OPENAI_API_KEY","YOUR_API_KEY");defai_agent(prompt, temperature=0.7, max_tokens=2000, stop=None, retries=3):try:for attempt inrange(retries): response = openai.Completion.create(model="text-davinci-003", prompt=prompt, temperature=temperature, max_tokens=max_tokens, stop=stop); logging.info(f"Agent Response: {response}");return response["choices"][0]["text"].strip();except Exception as e: logging.error(f"Error occurred on attempt {attempt +1}: {e}"); traceback.print_exc(); time.sleep(random.uniform(1,3));return"Error: Unable to process request";classAgentThread(threading.Thread):def__init__(self, prompt, temperature=0.7, max_tokens=1500, output_queue=None): 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();defrun(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(f"Thread 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 inenumerate(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();whilenot 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(f"All tasks completed in {total_time} seconds."); logging.info(f"Final Results: {json.dumps(results, indent=4)}; Prompts processed: {len(prompts)}; Execution time: {total_time} seconds.")


Read more

别再只会用 AI 了!AI 全栈开发才是核心竞争力

过去,开发一款全栈应用需要精通前端、后端、数据库、部署等多项技术,不仅要耗费数月甚至数年时间,还需投入大量资金购买工具和服务器。 而现在,AI编程工具已从IDE中的辅助角色,进化为堪比资深架构师与软件工程师合体的“超级智能体”,同时也让“一人公司”的创业梦想真正成为现实。 荷兰“一人公司”标杆人物Pieter Levels借助AI工具,仅用3小时就完成了多人在线飞行模拟游戏《Fly Pieter》的核心开发,这款画面简洁、玩法直观的网页游戏无须下载即可畅玩,上线9天便通过广告位出租与虚拟商品销售斩获17360美元营收,累计吸引超1.7万名玩家体验,最高同时在线人数达200余人。 马斯克在X平台转发该项目并称赞“AI游戏前景无限”,相关推文阅读量突破1300万,这一案例也成为AI降低开发门槛、赋能个体创业的真实标杆案例。 由此可见,AI与编程的结合不仅是技术领域的一次升级迭代,更实实在在地降低了数字产品的开发门槛。 Part.1 零技术成为全栈开发者,从这本书开始 当你脑海中闪过一个绝妙的产品创意,却因“不会编程”的技术壁垒望而却步;当你看着AI

构建 AI 逆向 MCP - 使用 MCP 辅助 JS 逆向

构建 AI 逆向 MCP - 使用 MCP 辅助 JS 逆向 前言 谷歌出了一个 chrome-dev-mcp,能够自动化浏览器操作。我发现这个 MCP 能抓包,于是想:能不能用于 JS 逆向分析? 但实际用下来发现,常规逆向需要的能力它都不支持: * ❌ 搜索代码 * ❌ 追踪调用栈 * ❌ 打断点调试 * ❌ Hook 函数 * ❌ 查看变量值 那能不能给它打补丁?当然可以。 Chrome DevTools Protocol(CDP)本身支持这些能力,只是谷歌的 MCP 没有封装。于是我基于 CDP 扩展了一套逆向专用工具: 扩展能力对应工具代码搜索search_in_sources、find_in_script调用栈追踪get_request_initiator断点调试set_

AI三分钟第1弹|3分钟学会给Cursor配置代理

AI三分钟第1弹|3分钟学会给Cursor配置代理 文章目录 * AI三分钟第1弹|3分钟学会给Cursor配置代理 * 正文 * 拿去用 * 讲清楚 * 记住它 * 结语 * 引用 * 版权信息 什么是AI三分钟? 《AI三分钟》专栏旨在提供短小精悍的AI工具使用技巧或者知识 在这个时间碎片化、知识碎片化的时代 用最精炼的语言和最生动的故事 3分钟完成一项干货的科普 正文 拿去用 方法一:直接用博主的配置文件(推荐) 1. 打开Cursor,按 Cmd + Shift + P(Mac)或 Ctrl + Shift + P(Windows)打开检索框 2. 重启Cursor使代理设置生效 3. 点击下图中的首选项,选择Cursor首选项配置,进入network(网络管理)页面 将HTTP协议改成HTTP1.1 粘贴博主编辑好的配置(全部覆盖,覆盖前请自行备份之前的用户设置)

【GitHub项目推荐--Toonflow AI短剧工厂:一站式AI短剧创作平台】

简介 Toonflow AI短剧工厂是一个革命性的AI驱动短剧创作平台,由HBAI-Ltd团队开发。该项目致力于将小说文本智能转化为完整的短剧视频,实现从文字到影像的全流程自动化。通过集成先进的大语言模型、图像生成和视频合成技术,Toonflow让用户只需动动手指,就能将小说秒变剧集,创作效率提升10倍以上。 核心价值: * 全流程AI化:从文本到角色,从分镜到视频,0门槛完成短剧创作 * 效率革命:创作效率提升10倍+,大幅缩短制作周期 * 智能转换:自动将小说转化为结构化剧本和视觉内容 * 开源免费:基于AGPL-3.0许可证,完全开源且免费使用 技术定位:Toonflow填补了文学创作与影视制作之间的技术鸿沟。通过标准化的AI工作流,它为内容创作者提供了从创意到成品的完整解决方案,降低了视频制作的专业门槛。 主要功能 1. 智能角色生成 系统自动分析原始小说文本,智能识别并生成角色设定。生成内容包括角色的外貌特征、性格特点、身份背景等详细信息。为后续剧本创作和画面设计提供可靠的角色基础。支持批量角色生成,快速构建完整的角色库。 2. 自动化剧本生成 基