'\n\nThe president said that he wanted to honor Justice Breyer for his dedication to serving the country, his legacy of excellence, and his commitment to advancing liberty and justice, as well as for his support of the Equality Act and his commitment to protecting the rights of LGBTQ+ Americans. He also praised Justice Breyer for his role in helping to pass the Bipartisan Infrastructure Law, which is the most sweeping investment to rebuild America in history.'}Custom PromptsYou can also use your own prompts with this chain. In this example, we will respond in Italian.refine_prompt_template = (    "The original question is as follows: {question}\n"    "We have provided an existing answer: {existing_answer}\n"    "We have the opportunity to refine the existing answer"    "(only if needed) with some more context below.\n"    "------------\n"    "{context_str}\n"    "------------\n"    "Given the new context, refine the original answer to better "    "answer the question. "    "If the context isn't useful, return the original answer. Reply in Italian.")refine_prompt = PromptTemplate(    input_variables=["question", "existing_answer", "context_str"],    template=refine_prompt_template,)initial_qa_template = (    "Context information is below. \n"    "---------------------\n"    "{context_str}"    "\n---------------------\n"    "Given the context information and not prior knowledge, "    "answer the question: {question}\nYour answer should be in Italian.\n")initial_qa_prompt = PromptTemplate(    input_variables=["context_str", "question"], template=initial_qa_template)chain = load_qa_chain(OpenAI(temperature=0), chain_type="refine", return_refine_steps=True,                     question_prompt=initial_qa_prompt, refine_prompt=refine_prompt)chain({"input_documents": docs, "question": query}, return_only_outputs=True)    {'intermediate_steps': ['\nIl presidente ha detto che Justice Breyer ha dedicato la sua vita al servizio di questo paese e ha reso omaggio al suo
Here we walk through how to use LangChain for question answering over a list of documents. Under the hood we'll be using our Document chains.
Here we walk through how to use LangChain for question answering over a list of documents. Under the hood we'll be using our Document chains. ->: '\n\nThe president said that he wanted to honor Justice Breyer for his dedication to serving the country, his legacy of excellence, and his commitment to advancing liberty and justice, as well as for his support of the Equality Act and his commitment to protecting the rights of LGBTQ+ Americans. He also praised Justice Breyer for his role in helping to pass the Bipartisan Infrastructure Law, which is the most sweeping investment to rebuild America in history.'}Custom PromptsYou can also use your own prompts with this chain. In this example, we will respond in Italian.refine_prompt_template = (    "The original question is as follows: {question}\n"    "We have provided an existing answer: {existing_answer}\n"    "We have the opportunity to refine the existing answer"    "(only if needed) with some more context below.\n"    "------------\n"    "{context_str}\n"    "------------\n"    "Given the new context, refine the original answer to better "    "answer the question. "    "If the context isn't useful, return the original answer. Reply in Italian.")refine_prompt = PromptTemplate(    input_variables=["question", "existing_answer", "context_str"],    template=refine_prompt_template,)initial_qa_template = (    "Context information is below. \n"    "---------------------\n"    "{context_str}"    "\n---------------------\n"    "Given the context information and not prior knowledge, "    "answer the question: {question}\nYour answer should be in Italian.\n")initial_qa_prompt = PromptTemplate(    input_variables=["context_str", "question"], template=initial_qa_template)chain = load_qa_chain(OpenAI(temperature=0), chain_type="refine", return_refine_steps=True,                     question_prompt=initial_qa_prompt, refine_prompt=refine_prompt)chain({"input_documents": docs, "question": query}, return_only_outputs=True)    {'intermediate_steps': ['\nIl presidente ha detto che Justice Breyer ha dedicato la sua vita al servizio di questo paese e ha reso omaggio al suo