1. Learn
  2. /
  3. Courses
  4. /
  5. Developing LLM Applications with LangChain

Connected

Exercise

Prompt templates and chaining

In this exercise, you'll begin using two of the core components in LangChain: prompt templates and chains!

The classes necessary for completing this exercise, including ChatOpenAI, have been pre-loaded for you.

Instructions

100 XP
  • Convert the template text provided into a standard (non-chat) prompt template.
  • Create a chain to pass the prompt template into the LLM.
  • Invoke the chain on the question variable provided.