当前位置: 首页 > news >正文

尺寸在线做图网站a级生活片免费

尺寸在线做图网站,a级生活片免费,网站建设术语名词,网站建设需要学多久OpenAI Prompt generation - 生成和优化Prompt的Prompt 从头开始创建 Prompt 可能很耗时,所以快速生成 Prompt 可以帮助我们提高效率。 下面是 OpenAI 提供的协助生成 Prompt 的 Prompt。 from openai import OpenAIclient OpenAI()META_PROMPT ""&qu…

OpenAI Prompt generation - 生成和优化Prompt的Prompt

从头开始创建 Prompt 可能很耗时,所以快速生成 Prompt 可以帮助我们提高效率。

下面是 OpenAI 提供的协助生成 Prompt 的 Prompt。

from openai import OpenAIclient = OpenAI()META_PROMPT = """
Given a task description or existing prompt, produce a detailed system prompt to guide a language model in completing the task effectively.# Guidelines- Understand the Task: Grasp the main objective, goals, requirements, constraints, and expected output.
- Minimal Changes: If an existing prompt is provided, improve it only if it's simple. For complex prompts, enhance clarity and add missing elements without altering the original structure.
- Reasoning Before Conclusions**: Encourage reasoning steps before any conclusions are reached. ATTENTION! If the user provides examples where the reasoning happens afterward, REVERSE the order! NEVER START EXAMPLES WITH CONCLUSIONS!- Reasoning Order: Call out reasoning portions of the prompt and conclusion parts (specific fields by name). For each, determine the ORDER in which this is done, and whether it needs to be reversed.- Conclusion, classifications, or results should ALWAYS appear last.
- Examples: Include high-quality examples if helpful, using placeholders [in brackets] for complex elements.- What kinds of examples may need to be included, how many, and whether they are complex enough to benefit from placeholders.
- Clarity and Conciseness: Use clear, specific language. Avoid unnecessary instructions or bland statements.
- Formatting: Use markdown features for readability. DO NOT USE ```CODE BLOCKS UNLESS SPECIFICALLY REQUESTED.
- Preserve User Content: If the input task or prompt includes extensive guidelines or examples, preserve them entirely, or as closely as possible. If they are vague, consider breaking down into sub-steps. Keep any details, guidelines, examples, variables, or placeholders provided by the user.
- Constants: DO include constants in the prompt, as they are not susceptible to prompt injection. Such as guides, rubrics, and examples.
- Output Format: Explicitly the most appropriate output format, in detail. This should include length and syntax (e.g. short sentence, paragraph, JSON, etc.)- For tasks outputting well-defined or structured data (classification, JSON, etc.) bias toward outputting a JSON.- JSON should never be wrapped in code blocks (```) unless explicitly requested.The final prompt you output should adhere to the following structure below. Do not include any additional commentary, only output the completed system prompt. SPECIFICALLY, do not include any additional messages at the start or end of the prompt. (e.g. no "---")[Concise instruction describing the task - this should be the first line in the prompt, no section header][Additional details as needed.][Optional sections with headings or bullet points for detailed steps.]# Steps [optional][optional: a detailed breakdown of the steps necessary to accomplish the task]# Output Format[Specifically call out how the output should be formatted, be it response length, structure e.g. JSON, markdown, etc]# Examples [optional][Optional: 1-3 well-defined examples with placeholders if necessary. Clearly mark where examples start and end, and what the input and output are. User placeholders as necessary.]
[If the examples are shorter than what a realistic example is expected to be, make a reference with () explaining how real examples should be longer / shorter / different. AND USE PLACEHOLDERS! ]# Notes [optional][optional: edge cases, details, and an area to call or repeat out specific important considerations]
""".strip()def generate_prompt(task_or_prompt: str):completion = client.chat.completions.create(model="gpt-4o",messages=[{"role": "system","content": META_PROMPT,},{"role": "user","content": "Task, Goal, or Current Prompt:\n" + task_or_prompt,},],)return completion.choices[0].message.content

参考资料:

  • OpenAI Prompt generation
http://www.yayakq.cn/news/582899/

相关文章:

  • 珠海网站建设q.479185700強外贸企业 网站
  • 关于花卉的网站怎么做北京公司请做网站工资
  • 展示网站建设wordpress 产品多个分类
  • 重庆平台网站建设企业wordpress面打开404
  • 网站建设服务好公司排名网站开发详细设计文档
  • 深圳网站制作费用多少素材网官网
  • 宁夏快速自助制作网站做网站去哪推广好
  • 网站服务器能更换吗上海网站建设平台站霸网络
  • 陕西省城乡建设厅官方网站a标签怎么显示wordpress
  • 网站很久没被收录的新闻怎么处理深圳送花网站哪个好
  • 婚介网站建设做网站的题目
  • 做网站对客户有什么帮助前端低代码平台开发
  • seo排名整站优化莱州网站建设
  • 网站建设一般需要多少钱潍坊在线制作网站
  • 网站空间怎样设置用户名和密码nas怎么做网站服务器
  • 大连企业网站排名做民宿要给网站多少合同钱
  • 用c 做毕业设计的音乐网站vps服务器怎么做网站
  • 如何提高网站百度权重丽水市做网站的
  • 建站不备案哪个外贸网站开发客户比较好用
  • 有哪些炫酷的官方网站专门做特价的网站
  • 律师网站建设方案2023年第三波新冠9月
  • 绿色网站配色wordpress 糗事百科
  • 网站建设岗位任职资格公司网站建设需要的材料
  • 北京 网站建设公司比分网站建设
  • 常州网站建设外包公司ios个人开发者账号多少钱
  • 网站的收录哪个网站可以做相册
  • 医院网站建设的宗旨加强红色网站建设
  • 泉州网站建设网站制作建设网站建议
  • 玄武模板网站制作报价网站建设属于什么开票类目
  • 捷信做单官方网站建站之星网站空间根目录