4 Prompting Techniques I
This chapter covers
- The fundamentals of prompting techniques with illustrated examples of using them to interact with models.
- Setting up LangChain on your local environment and associated libraries that we will use in this Chapter.
- A deep insight into prompting techniques and their workings and illustrated code examples of each technique with their results.
- The limitations that each of the techniques have and how they affect the model’s performance.
- Ways to mitigate the limitations by leveraging one or more techniques and prompt patterns.
In Chapter 1, we discussed the basics of prompt engineering and LLMs and how they can affect prompt crafting. Chapters 2 and 3 discussed the core elements that form a prompt, basic and advanced prompt patterns, their use cases, and detailed examples of using them for real-world problems. In this chapter, we will discuss the fundamentals of prompting techniques and the basic types of prompt techniques, along with detailed examples of prompt patterns we learned in Chapters 2 and 3 that apply these prompt techniques.