QuestionQ63

VerifiedApplication Development

A Generative AI Engineer uses LangChain to help a museum classify documents with the following code:

Question Image

The code produces an error.

What must they change to correct this template?

Explanation

PromptTemplate requires the template string that contains the {document_input} placeholder. Passing template=template_text along with the declared input variable creates a valid template that can be formatted with document_input; an LLM is not required to construct it.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!