Prompt Chaining
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.
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.
Besides achieving better performance, prompt chaining helps to boost the transparency of your LLM application, increases controllability, and reliability. This means that you can debug problems with model responses much more easily and analyze and improve performance in the different stages that need improvement.
✍ What You’ll Practice
In this final exercise, you’ll use a generative AI chat tool (like Copilot, ChatGPT, Gemini, or Claude) and bring together everything you’ve learned to create an original AI-assisted review of Great Expectations by Charles Dickens. You’ll use prompt chaining to guide the AI through a structured process and complete 7 steps that take you from identifying key themes to generating and formatting your final review. Each step is designed to help you practice writing effective prompts, evaluating AI responses, and refining your ideas.
🚩 Checkpoints:
For each step, there will be a checkpoint in the submission form asking for specific information. We recommend keeping the form open while you work through the exercise so you can easily track the questions and input your responses as you go.
💡 Tips
- Fact Check: Always verify the AI’s responses using trusted sources. If something seems off, research and revise.
- Engage Actively: Don’t hesitate to ask follow-up questions or try different angles. Review the Best practices and How to Prompt Introduction pages.
- Document Your Process: Keep a record of your prompts and the AI’s responses. This will help you reflect on your learning and improve your prompting skills.
- Use AI Suggestions: Many AI tools offer follow-up prompt ideas. Consider exploring them to deepen your understanding.
🛠️ Choosing Your AI Tool
For this exercise, you can use any generative AI chat (like Copilot, ChatGPT, Gemini, or Claude). The chosen tool needs to:
- Allow long conversations on the same chat (you’ll need to build on previous prompts),
- Support document export (PDF, Word, or text),
As SLC students, we recommend you to use Copilot through your school account. It’s integrated with your Microsoft package, supports document export, and won’t use up credits from other platforms. However feel free to choose which ever you feel more confident and comfortable with.