1. Learn
  2. /
  3. Courses
  4. /
  5. Retrieval Augmented Generation (RAG) with LangChain

Connected

Exercise

Creating the retrieval prompt

A key piece of any RAG implementation is the retrieval prompt. In this exercise, you'll create a chat prompt template for your retrieval chain and test that the LLM is able to respond using only the context provided.

An llm has already been defined for you to use.

Instructions

100 XP
  • Convert the string prompt into a reusable chat prompt template.
  • Create an LCEL chain to integrate the prompt template with the llm provided.
  • Invoke the chain on the inputs provided to see if you model can respond using only the context provided.