Skip to main content

Prompt Engineering - Chained Prompts

Apply this prompt engineering principle, Chained Prompts, to get better prompt results.

Prompt Engineering Principle 19 - Chained Prompts - involves combining the Chain-of-Thought (CoT) method with few-shot prompts. This approach encourages the AI to demonstrate its reasoning process step by step, often by providing initial examples that illustrate how to approach a problem or task. Here's how you can apply this principle in practice:

Example: Solving Complex Mathematical Problems

Without Principle 19 - Chained Prompts:

"What is the solution to the equation 2x + 3 = 11?"

With Principle 19 - Chained Prompts:

"Solve the equation 2x + 3 = 11. Think step by step, like in these examples:
1. For the equation x + 5 = 10, we first subtract 5 from both sides to get x = 5.
2. In the equation 3x = 9, we divide both sides by 3, resulting in x = 3.
Now, apply a similar process to solve 2x + 3 = 11."

Example: Diagnosing a Technical Issue

Without Principle 19 - Chained Prompts:

"How to diagnose a computer not turning on?"

With Principle 19 - Chained Prompts:

"Diagnose why a computer might not turn on. Here’s how to approach it: 
1. First, check if the power source is connected.
2. Next, ensure the power button is functioning. Similarly, step by step, go through the diagnostic process for a computer that won't turn on."

Example: Developing a Marketing Strategy

Without Principle 19 - Chained Prompts:

"Create a marketing strategy for a new health drink."

With Principle 19 - Chained Prompts:

"Create a marketing strategy for a new health drink. Approach it like this:
1. Identify the target audience, for instance, health-conscious young adults.
2. Determine the unique selling points, such as natural ingredients. Follow these steps to develop a complete strategy, detailing each phase." 

In each of these examples, Principle 19 -Chained Prompts, is applied by combining the Chain-of-Thought approach with few-shot prompts. This method helps the AI to structure its responses in a logical, step-by-step manner, demonstrating the reasoning process clearly. It's particularly effective for tasks that require problem-solving, technical diagnostics, or strategic planning.

The prompt engineering principle, Chained Prompts is part of the following group:

Conversation Flow:

- Break it Down (3) 

- Natural Response (11)

- Ask Questions (14) 

- Chained Prompts (19) 

- Continue a Prompt (24) 

Prompt Engineering Principles