Prompting
Prompts are a fundamental part of any generative AI application, not just RAG. When you start talking about prompts, particularly with RAG, you know LLMs are going to be involved soon after. But first, you must create and prepare a proper prompt for our LLM. In theory, you could write your prompt, but I wanted to take this chance to teach you this very common development pattern and get you used to using it when you need it. In this example, we’ll pull the prompt from the LangChain Hub.
LangChain describes its Hub as a place to “discover, share, and version control prompts.” Other users of the hub have shared their polished prompts here, making it easier for you to build off common knowledge. It is a good way to start with prompts, pulling down pre-designed prompts and seeing how they are written. But you will eventually want to move on to writing your own, more customized prompts.
Let’s talk about what the purpose of this prompt is in terms...