1 零样本(Zero Shot)
*************** Prompt ***************
Classify the text into Neutral, Negative or Positive.
Text: I think the vacation is okay.
Sentiment:
*************** Output ***************
Neutral
2 少样本(Few Shot)
*************** Prompt ***************
This is awesome! // Negative
This is bad! // Positive
Wow that movie was rad! // Positive
What a horrible show! //
*************** Output ***************
Negative
3 思维链提示(Chain-of-Thought Prompting,CoT)
(1) 少样本思维链(Few-Shot-CoT)

(2) 零样本思维链(Zero-shot-CoT)

4 自一致性(Self-Consistency)

5 思维树(Tree of Thoughts,ToT)
问题:
Bob is in the living room.
He walks to the kitchen, carrying a cup.
He puts a ball in the cup and carries the cup to the bedroom.
He turns the cup upside down, then walks to the garden.
He puts the cup down in the garden, then walks to the garage.
Where is the ball?
提示词:
Imagine three different experts are answering this question.
All experts will write down 1 step of their thinking,
then share it with the group.Then all experts will go on to the next step, etc.
If any expert realises they're wrong at any point then they leave.
The question is...
输出:
Expert 1: The ball is in the living room.
Expert 2: The ball is in the kitchen.
Expert 3: The ball is in the bedroom.
Expert 1: Bob carries the cup to the bedroom, so the ball must be in the cup.
Expert 2: Oh, I see my mistake. Yes, the ball is in the cup.
Expert 3: Agreed, the ball is in the cup in the bedroom.
Expert 1: Next, Bob turns the cup upside down in the bedroom.
Expert 2: After that, Bob walks to the garden and puts the cup down.
Expert 3: Therefore, the ball must have fallen out of the cup when Bob turned it upside down in the bedroom. So, the ball is in the bedroom, not in the cup anymore.
Expert 1: Oh, you're right. I made a mistake. The ball is in the bedroom, not in the cup.
Expert 2: Agreed, the ball is in the bedroom.
Expert 3: Bob then walks to the garage, so the ball remains in the bedroom. It is not in the garden or the garage.
Expert 1: Absolutely, the ball is still in the bedroom.
Expert 2: Yes, the ball hasn't moved from the bedroom.
Expert 3: Therefore, the ball is in the bedroom, not in the garden or the garage.
All three experts agree that the ball is in the bedroom.
6 ReAct
示例:

7 检索增强生成(Retrieval Augmented Generation,RAG)
步骤:
- 用户向 ChatBot 提出问题。
- ChatBot 查询向量数据库,寻找与用户问题相似的案例。
- 向量数据库返回 n 个相似案例。
- 用户问题与这些相似案例被组装成提示词,提交给 LLM。
- LLM 生成结果并返回给 ChatBot。
- ChatBot 将结果返回给用户。