langchain.chains.question_answering.chain.load_qa_chain(llm: BaseLanguageModel, chain_type: str = 'stuff', verbose: Optional[bool] = None, callback_manager: Optional[BaseCallbackManager] = None, **kwargs: Any) BaseCombineDocumentsChain[source]

Load question answering chain.

  • llm (BaseLanguageModel) – Language Model to use in the chain.

  • chain_type (str) – Type of document combining chain to use. Should be one of “stuff”, “map_reduce”, “map_rerank”, and “refine”.

  • verbose (Optional[bool]) – Whether chains should be run in verbose mode or not. Note that this applies to all chains that make up the final chain.

  • callback_manager (Optional[BaseCallbackManager]) – Callback manager to use for the chain.

  • kwargs (Any) –


A chain to use for question answering.

Return type


Examples using load_qa_chain