Skip to content

Commit ec295c7

Browse files
committed
prompt chaining video
1 parent 0774834 commit ec295c7

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ pages/research/local_research/
1717

1818
# app
1919
.next
20-
node_modules
20+
node_modules
21+
prompts

pages/techniques/prompt_chaining.en.mdx

+15
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@
22

33
import {Screenshot} from 'components/screenshot'
44
import PC1 from '../../img/prompt_chaining/prompt-chaining-1.png'
5+
import { Callout } from 'nextra/components'
56

67
## Introduction to Prompt Chaining
78

9+
<iframe width="100%"
10+
height="415px"
11+
src="https://www.youtube.com/embed/CKZC5RigYEc?si=EG1kHf83ceawWdHX" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
12+
allowFullScreen
13+
/>
14+
815
To improve the reliability and performance of LLMs, one of the important prompt engineering techniques is to break tasks into its subtasks. Once those subtasks have been identified, the LLM is prompted with a subtask and then its response is used as input to another prompt. This is what's referred to as prompt chaining, where a task is split into subtasks with the idea to create a chain of prompt operations.
916

1017
Prompt chaining is useful to accomplish complex tasks which an LLM might struggle to address if prompted with a very detailed prompt. In prompt chaining, chain prompts perform transformations or additional processes on the generated responses before reaching a final desired state.
@@ -13,6 +20,14 @@ Besides achieving better performance, prompt chaining helps to boost the transpa
1320

1421
Prompt chaining is particularly useful when building LLM-powered conversational assistants and improving the personalization and user experience of your applications.
1522

23+
<Callout type= "info" emoji="🎉">
24+
We are excited to launch two new prompt engineering courses. Get access by joining our DAIR.AI Academy. [Join now!](https://dair-ai.thinkific.com/)
25+
26+
Use code PROMPTING20 to get an extra 20% off.
27+
28+
IMPORTANT: The discount is limited to the first 500 students.
29+
</Callout>
30+
1631
## Use Cases for Prompt Chaining
1732

1833
### Prompt Chaining for Document QA

pages/techniques/prompt_chaining.zh.mdx

+7
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ import PC1 from '../../img/prompt_chaining/prompt-chaining-1.png'
77

88
为了提高大语言模型的性能使其更可靠,一个重要的提示工程技术是将任务分解为许多子任务。 确定子任务后,将子任务的提示词提供给语言模型,得到的结果作为新的提示词的一部分。 这就是所谓的链式提示(prompt chaining),一个任务被分解为多个子任务,根据子任务创建一系列提示操作。
99

10+
<iframe width="100%"
11+
height="415px"
12+
src="https://www.youtube.com/embed/CKZC5RigYEc?si=EG1kHf83ceawWdHX"
13+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
14+
allowFullScreen
15+
/>
16+
1017
链式提示可以完成很复杂的任务。LLM 可能无法仅用一个非常详细的提示完成这些任务。在链式提示中,提示链对生成的回应执行转换或其他处理,直到达到期望结果。
1118

1219
除了提高性能,链式提示还有助于提高 LLM 应用的透明度,增加控制性和可靠性。这意味着您可以更容易地定位模型中的问题,分析并改进需要提高的不同阶段的性能。

0 commit comments

Comments
 (0)