【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

告别996:GitHub Copilot将我的开发效率提升300%的实战记录

告别996:GitHub Copilot将我的开发效率提升300%的实战记录

👋 大家好,欢迎来到我的技术博客! 📚 在这里,我会分享学习笔记、实战经验与技术思考,力求用简单的方式讲清楚复杂的问题。 🎯 本文将围绕AI这个话题展开,希望能为你带来一些启发或实用的参考。 🌱 无论你是刚入门的新手,还是正在进阶的开发者,希望你都能有所收获! 文章目录 * 告别996:GitHub Copilot将我的开发效率提升300%的实战记录 * 引言:从疲惫到高效 * 什么是GitHub Copilot?🤖 * 效率提升300%的核心场景 * 1. 快速生成样板代码 * 2. 自动编写单元测试 * 3. 智能调试与注释 * 集成Copilot到工作流 * 步骤1:设置合理的期望 * 步骤2:结合IDE使用 * 步骤3:代码审查与调整 * 高级用法:超越代码生成 * 数据库查询优化 * API接口设计 * 正则表达式助手 * 数据支撑:效率提升分析 * 避坑指南:常见问题与解决 * 1. 可能生成过时或不安全代码

知网AIGC检测多少钱?各渠道价格对比和省钱攻略

知网AIGC检测多少钱?各渠道价格对比和省钱攻略

知网AIGC检测多少钱?各渠道价格对比和省钱攻略 毕业季一到,论文查重和查AI就成了绕不开的两座山。查重大家都比较熟悉了,但知网AIGC检测是这两年才铺开的新项目,很多同学对它的价格体系还不太清楚。 我去年帮几个学弟学妹查过知网AIGC,踩了不少坑,也摸索出了一些省钱的路子。今天把这些经验整理出来,希望能帮大家少花点冤枉钱。 知网AIGC检测的官方定价是多少? 先说结论:知网AIGC检测并没有一个面向个人用户的统一公开售价。 这和知网查重类似——知网的检测服务主要是面向机构(高校、期刊社)提供的,个人用户想用知网检测,通常需要通过第三方渠道。不同渠道的定价差异不小,这也是很多同学踩坑的原因。 目前市面上能查到的知网AIGC检测价格,大致分布在这个区间: 渠道类型价格区间(单篇)可靠性备注学校图书馆免费(限次)最高部分学校提供1-2次免费机会知网官方合作渠道80-150元高需确认是否为正规授权淘宝/拼多多店铺30-80元参差不齐低价店铺有报告造假风险第三方检测网站50-120元中等需辨别是否真的调用知网接口 学校免费次数用完了怎么办? 很多学校会给毕业生提供

openclaw使用llama.cpp 本地大模型部署教程

openclaw使用llama.cpp 本地大模型部署教程

openclaw使用llama.cpp 本地大模型部署教程 本教程基于实际操作整理,适用于 Windows WSL2 环境 全程使用 openclaw 帮我搭建大模型 一、环境准备 1. 硬件要求 显卡推荐模型显存占用GTX 1050 Ti (4GB)Qwen2.5-3B Q4~2.5GBRTX 4060 (8GB)Qwen2.5-7B Q4~5GBRTX 4090 (24GB)Qwen2.5-32B Q4~20GB 2. 安装编译工具(WSL Ubuntu) sudoapt update sudoaptinstall -y cmake build-essential 二、下载和编译 llama.cpp

【实践】操作系统智能助手OS Copilot新功能测评

【实践】操作系统智能助手OS Copilot新功能测评

一、引言         数字化加速发展,尤其人工智能的发展速度越来越快。操作系统智能助手成为提升用户体验与操作效率的关键因素。OS Copilot借助语言模型,人工智能等,对操作系统的自然语言交互操作 推出很多功能,值得开发,尤其运维,系统操作等比较适用,优化用户与操作系统的交互模式。本次测评,按照测评指南进行相关测评,得出下面的测评报告。 二、OS Copilot简介         OS Copilot 是一款致力于深度融合于操作系统的智能助手,它旨在成为用户与操作系统交互的得力伙伴 。通过先进的自然语言处理技术和机器学习算法,OS Copilot 能够理解用户多样化的指令,将复杂的操作系统操作简单化。         在日常使用场景中,无论是文件管理、应用程序的操作,还是系统设置的调整,OS Copilot 都能提供高效的支持。例如,在文件管理方面,用户无需手动在层层文件夹中查找文件,只需通过描述文件的大致信息,如创建时间、文件内容关键词等,就能快速定位到目标文件。         对于应用程序,它不仅能根据用户的使用习惯智能启动,还能在应用程序运行时进行优化,确保