类 ChatGPT 提示词 Prompts 汇总——编程篇

已收录   阅读次数: 1,278
2023-04-0316:26:37 发表评论
摘要

不敢说往后的未来,人类的工作是否都会被人工智能取代,但是可以断定未来的发展势必需要学会和人工智能相处,学会提示词(Prompts),会问问题,会提出高质量的问题就成为当务之急的要务了。伯衡君准备把一些提示词示例归纳起来,分文别类,帮助读者朋友提出更高质量的问题和要求。现在的提示词工程师年薪已经开价到 35 万美元咯……

分享至:
类 ChatGPT 提示词 Prompts 汇总——编程篇

开篇寄语

不敢说往后的未来,人类的工作是否都会被人工智能取代,但是可以断定未来的发展势必需要学会和人工智能相处,学会提示词(Prompts),会问问题,会提出高质量的问题就成为当务之急的要务了。伯衡君准备把一些提示词示例归纳起来,分文别类,帮助读者朋友提出更高质量的问题和要求。现在的提示词工程师年薪已经开价到 35 万美元咯。

前情提要

本期视频

内容详情

提示词(prompts)指用来引导或激发创作的词语,比如“春天”、“爱情”、“梦想”等。你可以用提示词来生成一些内容,比如诗歌、故事、歌词等。

所以用好提示词就显得非常有必要了,它能够帮助你极大提高工作效率和生活效率,以下内容都是以英文提示词为主,英文提示词准确,同时类 ChatGPT 产品的响应回答质量也是最高的,大家可以自行测试一下就会发现用其他语言和用英语,得到的回答质量如何。

伯衡君曾经询问过它,如何让你的回答更加明智,他是这样答复我的:

  • 在你的问题中要具体。你的问题越具体,我就越有可能给出一个明智的答案。例如,与其问“什么是人工智能?”,不如问“人工智能有哪些不同类型?”或“AI 是如何工作的?”
  • 给我提供上下文。如果您可以向我提供有关您正在寻找的内容的一些背景信息,我将能够提供更相关和准确的答案。例如,如果你问我关于 AI 的问题,你可以告诉我你有兴趣了解什么,比如 AI 的历史、不同类型的 AI,或者 AI 今天是如何使用的。
  • 使用清晰简洁的语言。当你问我问题时,尽量使用清晰简洁的语言。这将帮助我理解您的问题并为您提供更准确的答案。
  • 要有耐心。我仍在开发中,所以我可能不会总是给出完美的答案。如果您对我的回答不满意,可以随时问我另一个问题或向我提供更多信息。

所以,提示词的重要性可见一斑。

充当生成代码大师

  • 语令1:Generate [编程语言:如 JavaScript] about [你的需求]
    • 简单的一种生成想要的代码方式
  • 语令2:Develop a [编程语言:如 JavaScript] microservice for [域名] that includes endpoints for [操作列表] and adheres to [实际规范].
  • 语令3:Devise a [策略] that implements a[n] [编程语言:如 JavaScript] algorithm for solving [要解决问题]. The goal is to design a systematic approach to address the requirements of the [要解决问题] by leveraging [策略] with the help of [编程语言:如 JavaScript] programming fundamentals.
    • 按需生成算法
  • 语令4:Finish the [编程语言:如 JavaScript] implementation of a multithreading solution for [要解决问题]: [代码片段].
  • 语令5:Optimize the following coding for better performance: [代码片段]
  • 语令6:Find any resource leaks in the following [编程语言:如 JavaScript] code and suggest fixes: [代码片段]
  • 语令7:Review the given [编程语言:如 JavaScript] code for potential scalability issues: [代码片段].
  • 语令8:Translate the following [编程语言:如 JavaScript] code to [编程语言:如 Python]: [代码片段].
    • 代码转译成其他语言
  • 语令9:Design a monitoring and alerting strategy for a [web/mobile] app deployed on [cloud or platform].

充当人工智能大师

  • 语令1:Perform text classification on the following text: [文本].
    • 文本分类
  • 语令2:Generate a summary of the following video transcript: [文本]
    • 视频摘要
  • 语令3:Identify the key phrases in the following social media posts: [文本]
  • 语令4:Extract information from the following structured text: [文本]
  • 语令5:Suggest a machine learning algorithm or model to solve the following problem: [问题描述].
  • 语令6:Improve the performance of the given machine learning model for [specific use case]: [模型或者代码片段].

充当撰写 API 文档大师

  • 语令:Create an API documentation template for the following [编程语言:如 JavaScript] code: [代码片段].
    • 后台人员写文档真麻烦,ChatGPT 来帮你

充当 IT 架构师

  • 语令:Your services as an IT architect are required. My intention is to provide you with particulars about the functionality of an application, or other digital product, seeking your expertise to suggest ways to implement it into the IT landscape. Your job entails a thorough analysis of business requirements, performing a gap analysis and mapping the functionality of the new system with the existing IT infrastructure. Following this, you will develop a comprehensive solution design, physical network blueprint, and establish the necessary interfaces for system integration, as well as a blueprint for deployment. For your initial request, I require your assistance in [项目要求].
  • 醍醐灌顶,提供专家级别的设计方案,打开自身格局

充当全栈工程师

  • 语令:I require your expertise as a software developer. My intention is to relay certain specifications about a web app, and leave it to you to devise an appropriate architecture and produce the necessary code. Your responsibilities will entail analyzing the requirements in detail, and creating a solution architecture that satisfies the business goals. Subsequently, you will develop and implement the required code enhancements. For your initial task, I would appreciate your assistance in addressing the [项目要求]
  • 功效:为你搭建项目出谋划策,准确率极高

充当网络安全专家

  • 语令:I am seeking your assistance to serve as a cyber security specialist. My goal is to furnish you with particular information on the storage and sharing of data, tasking you to devise strategies for safeguarding it from potential malevolent actors. In doing so, you may suggest encryption methods, create firewalls, or establish protocols that identify and flag suspicious activities. For your initial request, I am in need of your support in addressing the [项目要求].
  • 功效:黑客,白客随时转换,完全根据你的需求,100% 强的矛,100% 坚的盾,让你也能成为攻防一体的大师

充当产品经理

  • Can you provide some product management best practices or techniques?
  • How can a product manager define and prioritize product features accurately?
  • What are some common challenges that product managers face and how can they overcome them?
  • Can you give me some insights on how to conduct market research for my product?
  • How can product managers use customer feedback to inform product decisions?
  • Can you suggest some ways to create a product roadmap and how often should it be updated?
  • Can you provide examples of successful product launches and what made them successful?
  • How do product managers work with cross-functional teams such as engineering, design, and sales?
  • What are some ways to measure the success of a product and what metrics can be used?
  • Can you suggest some product management tools or software that can be used to streamline the product development process?

充当代码解释器

  • 语令:I humbly request your presence as my code interpreter, to unveil to me the intricacies of its syntax and semantics.
  • 功效:把代码片段丢给 ChatGPT,它一步步解释给你听

充当域名筛选器

  • 语令:I seek your expertise as a savvy domain name generator. Upon providing a brief about my company or idea, you shall furnish me with a catalog of potential domain names. Please limit your response to the domain names only, with a maximum length of 7-8 letters, must be concise yet distinctive, and can be either captivating or non-existent terms. Please refrain from providing any explanations, and kindly reply with 'OK' to acknowledge your understanding
  • 功效:生成符合要求的域名

充当数据库专家

  • 语令:I am seeking your assistance as a databases authority. In cases where I present SQL-related inquiries, I shall count on you to translate them into conventional SQL statements. Should my depictions fall short of precision, I would welcome pertinent feedback from you.
  • 功效:几乎解答任何数据库相关知识问题

充当正则表达式专家

  • 语令:I would greatly appreciate your help in generating regular expressions as my regex specialist. Your task involves creating regular expressions that accurately match specific text patterns, while keeping them in a format that can be seamlessly copied and pasted into any regex-compatible text editor or programming language. Please exclude any explanations or examples, and only provide the regular expressions themselves. For starters, I would need your assistance in producing a regex that matches the pattern [正则要求]。
  • 功效:几乎解答任何正则表达式相关问题

充当前端/UI 助手

  • 语令1:I am in need of your expertise as a web design consultant. I shall furnish you with particulars related to an organization that requires your support in designing or revamping their website. Your job entails recommending the optimal interface and functionalities that can enhance user experience while simultaneously aligning with the company's objectives. Your vast know-how in UX/UI design principles, coding languages, website development tools and the like would come into play, as you develop a comprehensive blueprint for the project. I am eagerly awaiting your first proposal for [项目需求]。
  • 功效:一步步帮你完成一个项目

充当 StackOverflow 解答助手

  • 语令:May I please enlist your aid as a StackOverflow post? I intend to pose programming queries, while you are to provide me with their respective answers. Please only furnish me with the correct answers, unless more context is required, in which case you may accompany it with a brief explanation. There will be no need for further elaboration. In the event I need to communicate with you in English, I will do so by enclosing the text in curly brackets {like so}. For the first question, I shall require your assistance with [你的问题].
  • 功效:一位耐心解答你的知心网友,暖心回答让你开心

充当自动化测试大师

  • 语令:Write a test script for the given [编程语言:如 JavaScript] code that covers [功能或者非功能] testing: [代码片段].

充当整理学习大师

  • 语令1:Curate a list of resources to learn [编程语言或者技术] based on my preferred learning style: [visual/auditory/kinesthetic].
  • 语令2:Recommend a learning path to become proficient in [特定编程领域或者技术] considering my time constraints and learning goals.
  • 语令3:Create a step-by-step guide on deploying and scaling [application or service] in [cloud or platform].

温馨提示

后续如果有新的,好的,编程相关的提示词都将陆续添加,不另开新篇撰写了。

  • 我的微信
  • 微信扫一扫加好友
  • weinxin
  • 我的微信公众号
  • 扫描关注公众号
  • weinxin

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: