Building advanced applications
1. Building advanced applications
Welcome back!2. Introduction to building advanced applications
As we look into the realm of advanced applications, we'll venture beyond routine Q&A. This lesson will introduce you to chaining prompts, maintaining context over multiple interactions, and constructing complex workflows. By tailoring prompts to fit real-world scenarios, we unlock the huge potential prompt engineering has to offer.3. Chaining prompts for depth and continuity
One brilliant feature of ChatGPT is that within an individual conversation, each prompt builds upon the previous response. This creates a rich dialogue that uncovers deeper insights and fosters a comprehensive understanding of the topic. For example, our first prompt could be: "What are the latest trends in renewable energy?" We can then ask a follow-up prompt: "How could these trends impact global energy policies?" ChatGPT understands that "these trends" refer to the latest trends in renewable energy. Chaining prompts means building a narrative, where each question or task is a link in a chain that extends the context and depth of the conversation.4. Sustaining context over sessions
If we’re chaining multiple prompts over time, we want to maintain context. This is like developing a storyline that continues seamlessly across sessions, preserving the flow and nuances of the dialog. For example, in our initial session, we might "Outline the steps to start a small business." In our next session, we can ask: "Considering our previous outline, what legal considerations should we focus on next?" By referencing past interactions within a chat window, we can maintain a thread that enhances the model's ability to provide continuity. What we get is more coherent and contextually relevant advice.5. Advanced workflows for complex scenarios
Designing workflows with ChatGPT allows us to manage and execute multi-step processes. Let’s use a workflow prompt: "Create a step-by-step guide for conducting market research, then draft a survey based on the guide."6. Advanced workflows for complex scenarios
This approach leverages ChatGPT's ability to handle layered tasks. What’s more, if we combine this using examples through one-shot or few-shot learning, we can access much richer results.7. Persona-problem-solution framework
We’ve now explored the essential elements of a prompt, highlighting that a great prompt should use at least one of the following: instructions, persona, output format, context, and examples. One framework I’ve come to love, which runs smoothly like a well-oiled train on tracks, encompassing all of the essential elements of a prompt, is the persona-problem-solution framework. Put yourself in the shoes of a business operator. You have clients who want solutions to some tough leadership questions. How do you go about answering them fast and deliver quality in return? Let’s ask ChatGPT.8. Persona-problem-solution framework
We start by defining the persona of the language model. In this case, we choose relevant criteria for the problem we are solving: Firstly, an advisor to Ray Dalio, a prominent American billionaire investor and hedge fund manager. Secondly, an expert problem solver for leadership tasks. Thirdly, a detailed prompt writer for large language models. Now ChatGPT has all the relevant context for the nature of the problem it will solve. We then list the problem. This can be a single piece of information or a longer paragraph of text. Here, we provide ChatGPT with a list of struggles our clients face. It’s important we include these in quotations to help convey the exact words or phrases that we want ChatGPT to consider.9. Persona-problem-solution framework
Now it’s time to highlight a suggested solution structure. This is absolutely critical to get the most out of the language model. If we instead wrote “give me solutions to the problems” the AI has a tendency to go off on a tangent. Notice how we are hyper-specific and define: Relevant online resources to consider Mental models and frameworks for the problem at hand A reference to Ray Dalio’s book “Principles” to draw additional insights What’s more, we even get the language model to provide a prompt for itself to help solve the problem, reducing the cognitive load we place on ourselves.10. Let's practice!
Through the exercises, you'll see how chaining prompts, sustaining context, and structuring complex queries can transform ChatGPT from a conversational partner to an invaluable asset in your professional toolkit. If you use these techniques correctly, you’ll be able to see the transformation in the quality and applicability of the responses you receive.Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.