AI Wiki
ChatGPT 教程MidJourney 教程Sora 教程
  • 👏Welcome
  • AI Wiki 知识百科
    • 🔎什么是人工智能 (AI)-Google
    • 🔎人工智能-百度百科
    • 🔎人工智能-Wikipedia
    • 📖Artificial Intelligence Wiki (English)
    • 📖机器之心人工智能专业词汇库
    • 📖人工智能专业术语表
      • A
      • B
      • C
      • D
      • E
      • F
      • G
      • H
      • I
      • J
      • K
      • L
      • M
      • N
      • O
      • P
      • Q
      • R
      • S
      • T
      • U
      • V
      • W
      • X
      • Y
      • Z
    • 📖机器学习课程术语表
  • Prompt Engineering 教程
    • 🔔Prompt Engineering 是什么?​
    • 📘Learn Prompting (多语言)
    • 📒Learning Prompt (中文)
    • 📗Learn Prompt (English)
    • 📕Deep Learning (English)
  • ChatGPT 教程
    • 🚩基础篇
      • 如何注册ChatGPT账号
      • Prompt简介
      • 基础用法
      • 基本原则 & 建议
      • 基本使用场景 & 使用技巧
        • 场景1:问答问题
        • 场景2:基于示例回答
        • 场景3:推理
        • 场景4:无中生有——写代码
        • 场景5:锦上添花——改写内容
        • 场景6:锦上添花——信息解释
        • 场景7:化繁为简——信息总结
        • 场景8:化繁为简——信息提取
    • 🏳️‍🌈高级篇
      • ChatGPT Prompt Framework
      • Zero-Shot Prompts
      • Few-Shot Prompting
      • Self-Consistency
      • PAL Models
      • OpenAI Playground 使用方法
      • 搭建基于知识库内容的机器人
    • 🏴‍☠️技巧篇
      • 技巧1:To Do and Not To Do
      • 技巧2:增加示例
      • 技巧3:使用引导词,引导模型输出特定内容
      • 技巧4:增加 Role(角色)或人物
      • 技巧5:使用特殊符号指令和需要处理的文本分开
      • 技巧6:通过格式词阐述需要输出的格式
      • 技巧7:Zero-Shot Chain of Thought
      • 技巧8:Few-Shot Chain of Thought
      • 技巧9:其他
    • 🪧Awesome ChatGPT Prompts (English)
  • Midjourney 教程
    • 🚩基础篇
      • 如何使用 Midjourney?
      • Midjourney Prompt 基本结构
      • Midjourney Prompt 常用参数
      • Midjourney 基础设置
      • 订阅 Midjourney 会员
    • 🏳️‍🌈高级篇
      • Midjourney Prompt 高级参数
      • Midjourney 各版本差异
      • Midjourney 官方 FAQ
    • 🏴‍☠️技巧篇
      • 技巧一:临摹
      • 技巧二:多实验
      • 技巧三:善用 Image2Image 功能
      • 技巧四:增加风格——艺术运动
      • 技巧五:增加风格——艺术家
      • 技巧六:善用 no 参数,去掉不想要的元素
      • 技巧七:多参数同时使用
      • 技巧八:使用 Seed 参数对图进行二次修改
      • 技巧九:神秘的 blend 功能
      • 技巧十:控制变量法渐进优化
      • 技巧十一:增加风格——国家
      • 技巧十二:增加权重
      • 技巧十三:善用灯光
      • 技巧十四:增加风格——年份
      • 技巧十五:如何让 Midjourney 生成的人更具有多样性?
      • 技巧十六:改变相机与镜头
      • 技巧十七:看到别人的图,想知道它的 prompt 是啥
    • 📋Text Prompt 篇
      • 撰写 Text Prompt 注意事项
      • 场景1:Stock Photo
      • 场景2:品牌 Logo
      • 场景3:App & 徽章 Logo
      • 场景4:插画
      • 场景5:头像
      • 场景6:游戏
      • 场景7:实物
      • 场景8:人物
      • 场景9:风景
      • 场景10:动漫
      • 场景11:其他
      • 框架总结
    • 🧮Big List
      • Midjourney 完整参数列表
      • Artist List
      • Photographers List
      • Lighting List
      • Anime List
      • Camera and Lens List
  • Sora 教程
    • 🚩基础篇
      • Sora 基础介绍(中文)
      • Sora 官网介绍(English)
      • 如何申请使用 Sora
      • Sora Prompt提示词合集
      • Sora 学习手册汇总
      • 💰Sora 赚钱方法
    • 🏳️‍🌈高级篇
    • 🏴‍☠️技巧篇
  • 返回Aig123.com
由 GitBook 提供支持
在本页
  1. ChatGPT 教程
  2. 基础篇
  3. 基本使用场景 & 使用技巧

场景6:锦上添花——信息解释

上一页场景5:锦上添花——改写内容下一页场景7:化繁为简——信息总结

最后更新于1年前

场景介绍

锦上添花下的第二大的场景是信息解释。它跟改写内容有点像,但又不太一样,信息解释有可能提供超过原文内容的信息。

举几个信息解释的例子,大家应该就能理解了:

  1. 解释代码:比如你看到一段 Python 的代码,但你看不懂,你可以让 AI 解释下代码的含义。

  2. 解释论文:看某篇论文看不懂,或者论文里的某一段看不懂,你也可以让 AI 解释。

以解释代码为例,它的 prompt 是这样的(此案例来自 OpenAI ):

Explanation of what the code does:

Python 3 
def remove_common_prefix(x, prefix, ws_prefix): 
    x["completion"] = x["completion"].str[len(prefix) :] 
    if ws_prefix: 
        # keep the single whitespace as prefix 
        x["completion"] = " " + x["completion"] 
return x

以下是 ChatGPT 的 Output,它阐述了这段代码是拿来干什么的,同时还阐述了各个参数的含义:

This is a Python function called remove_common_prefix that takes in three parameters: x, prefix, and ws_prefix.

The x parameter is assumed to be a Pandas DataFrame or Series object with a column named "completion", which contains strings that may or may not start with the prefix string.

The prefix parameter is a string that represents the common prefix that needs to be removed from the beginning of each string in the "completion" column of the DataFrame.

The ws_prefix parameter is a Boolean value that indicates whether or not to keep a single whitespace character as a prefix after the common prefix has been removed.

The function modifies the "completion" column of the DataFrame by removing the prefix string from the beginning of each string in that column using the Pandas str method and string slicing. The len(prefix) : syntax is used to slice the string starting from the character that follows the prefix.

If ws_prefix is True, then the function adds a single whitespace character as a prefix to each string in the "completion" column after removing the prefix.

Finally, the modified DataFrame is returned by the function.

🚩
​
官方案例