Complete the code to import the PromptTemplate class from LangChain.
from langchain.prompts import [1]
PromptTemplate is a core class in LangChain for defining prompts.
Complete the code to create a simple PromptTemplate instance.
prompt = [1].from_template('Tell me a joke about {topic}')
Use PromptTemplate.from_template() to create prompts easily.
Complete the code to import LLMChain.
from langchain.chains import [1]
LLMChain combines an LLM and a prompt to form a chain.
Fill both blanks to create an LLMChain (assume llm is defined).
chain = [1](llm=llm, prompt=prompt) response = chain.[2]('cats')
Create with LLMChain(llm=llm, prompt=prompt) and run with chain.run().
Fill all three blanks for a complete simple LangChain example (assume imports and llm done).
prompt = PromptTemplate.from_template('[1] {topic}') chain = LLMChain(llm=llm, prompt=prompt) print(chain.[2]('[3]'))
Use a template string with variable, run the chain, and provide input like 'cats'.
