chain_type="map_reduce")query = "What did the president say about Justice Breyer"chain({"input_documents": docs, "question": query}, return_only_outputs=True)    {'output_text': ' The president said that Justice Breyer is an Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court, and thanked him for his service.'}Intermediate StepsWe can also return the intermediate steps for map_reduce chains, should we want to inspect them. This is done with the return_map_steps variable.chain = load_qa_chain(OpenAI(temperature=0), chain_type="map_reduce", return_map_steps=True)chain({"input_documents": docs, "question": query}, return_only_outputs=True)    {'intermediate_steps': [' "Tonight, I‚Äôd like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer‚Äîan Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court. Justice Breyer, thank you for your service."',      ' A former top litigator in private practice. A former federal public defender. And from a family of public school educators and police officers. A consensus builder. Since she‚Äôs been nominated, she‚Äôs received a broad range of support‚Äîfrom the Fraternal Order of Police to former judges appointed by Democrats and Republicans.',      ' None',      ' None'],     'output_text': ' The president said that Justice Breyer is an Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court, and thanked him for his service.'}Custom PromptsYou can also use your own prompts with this chain. In this example, we will respond in Italian.question_prompt_template = """Use the following portion of a long document to see if any of the text is relevant to answer the question.Return any relevant text translated into italian.{context}Question: {question}Relevant text, if any, in Italian:"""QUESTION_PROMPT = PromptTemplate(    template=question_prompt_template, input_variables=["context",
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. ->: chain_type="map_reduce")query = "What did the president say about Justice Breyer"chain({"input_documents": docs, "question": query}, return_only_outputs=True)    {'output_text': ' The president said that Justice Breyer is an Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court, and thanked him for his service.'}Intermediate StepsWe can also return the intermediate steps for map_reduce chains, should we want to inspect them. This is done with the return_map_steps variable.chain = load_qa_chain(OpenAI(temperature=0), chain_type="map_reduce", return_map_steps=True)chain({"input_documents": docs, "question": query}, return_only_outputs=True)    {'intermediate_steps': [' "Tonight, I‚Äôd like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer‚Äîan Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court. Justice Breyer, thank you for your service."',      ' A former top litigator in private practice. A former federal public defender. And from a family of public school educators and police officers. A consensus builder. Since she‚Äôs been nominated, she‚Äôs received a broad range of support‚Äîfrom the Fraternal Order of Police to former judges appointed by Democrats and Republicans.',      ' None',      ' None'],     'output_text': ' The president said that Justice Breyer is an Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court, and thanked him for his service.'}Custom PromptsYou can also use your own prompts with this chain. In this example, we will respond in Italian.question_prompt_template = """Use the following portion of a long document to see if any of the text is relevant to answer the question.Return any relevant text translated into italian.{context}Question: {question}Relevant text, if any, in Italian:"""QUESTION_PROMPT = PromptTemplate(    template=question_prompt_template, input_variables=["context",