Advanced methods with chains
In this section, we will continue our exploration of ways one can utilize LLM pipelines. We will focus on chains.
Refer to the following notebook: Ch9_Advanced_Methods_with_Chains.ipynb
. This notebook presents an evolution of a chain pipeline, as every iteration exemplifies another feature that LangChain allows us to employ.
For the sake of using minimal computational resources, memory, and time, we use OpenAI’s API. You can choose to use a free LLM instead and may do so in a similar way to how we set up the notebook from the previous example in this chapter.
The notebook starts with the basic configurations, as always, so we can skip to reviewing the notebook’s content.
Asking the LLM a general knowledge question
In this example, we want to use the LLM to tell us an answer to a simple question that would require common knowledge that a trained LLM is expected to have:
"Who are the members of Metallica. List them as...