Contextual prompting
以下是一些我认为有效的风格供您选择:
对抗性、描述性、直接、正式、幽默、有影响力、非正式、 Inspirational, Persuasive
让我们将表 6 中的提示改为包含幽默和鼓舞人心的风格。
提示I want you to act as a travel guide. I will write to you about my location and you will suggest 3 places to visit near me in a humorous style.
My suggestion: "I am in Manhattan."
Travel Suggestions:
输出1. 领略帝国之心:登上帝国大厦令人眩晕的高度,õ ~ 在曼哈顿天际线的壮丽中沉醉。准备好感受如同~ 金刚屹立大苹果之巅的豪情,只是少了巨猿尺寸的香蕉。
- 在 MoMA 速成艺术达人:在现代艺术博物馆
释放你内心的艺术狂热。凝视那些令人瞠目的杰作,它们会让你质疑自己的火柴人涂鸦是
否Ñ • P~
一种独特的优点。
- 在第五大道血拼到腿软:在这条标志性的第五大道上尽情享受购物疗法。
准备好面对橱窗购物(或实际消费)时令人咋舌的价格标签,设计师精品店会让你的钱包哭泣。
不过既然身在曼哈顿,何不拥抱这份极致奢华!
表 6. 采用幽默语气和风格的角色提示示例
表 6. 采用幽默语气和风格的角色提示示例
上下文提示
通过提供上下文提示,您可以帮助确保与 AI 的交互尽可能无缝且高效。模型将能更快理解您的请求,并生成更准确相关的响应,如表 7 示例所示。
Goal为复古游戏博客推荐文章模型Gemini Pro 温度1令牌限制1024
Top‑P 采样
Top-K40n`x0nà 提示词Context: You are writing for a blog about retro 80's arcade video games.
Suggest 3 topics to write an article about with a few lines of description of what this article should contain.
输出1. ** 街机柜设计的演变:** 这篇文章将探讨街机柜设计的演变历程,从 20 世纪 70 年代早期的木质和金属机柜,到如今流线型、霓虹灯点缀的设计 20 世纪 80 年代及以后。
- ** 怀旧经典:80 年代标志性街机游戏:**
- 这篇文章将回顾历史,探讨影响与传承,
聚焦 1980 年代一些最具标志性和影响力的街机游戏,展现其创新之处、流行玩法及历久弥新的魅力。
- ** 像素艺术的崛起与复古复兴:**
本文将深入探讨像素艺术作为一种标志性视觉风格的演变历程,追溯其起源,剖析创作技法,并探讨像素艺术在现代游戏和数字艺术中的复兴现象。
表 7. 情境式提示示例
全站分卷索引 · 34 卷
- 1Introduction
- 2Prompt engineering
- 3LLM output configuration
- 4Sampling controls
- 5Top-K and top-P
- 6Putting it all together
- 7Prompting techniques
- 8One-shot & few-shot
- 9System, contextual and role prompting
- 10System prompting
- 11Role prompting
- 12Contextual prompting
- 13Step-back prompting
- 14Chain of Thought (CoT)
- 15Self-consistency
- 16Tree of Thoughts (ToT)
- 17ReAct (reason & act)
- 18Automatic Prompt Engineering
- 19Code prompting
- 20Prompts for explaining code
- 21Prompts for translating code
- 22Prompts for debugging and reviewing code
- 23What about multimodal prompting?
- 24Design with simplicity
- 25Be specific about the output
- 26Control the max token length
- 27Experiment with input formats and writing styles
- 28Adapt to model updates
- 29JSON Repair
- 30Working with Schemas
- 31Experiment together with other prompt engineers
- 32CoT Best practices
- 33Summary
- 34Endnotes