create_qa_with_sources_chain#

langchain.chains.openai_functions.qa_with_structure.create_qa_with_sources_chain(llm: BaseLanguageModel, verbose: bool = False, **kwargs: Any) LLMChain[source]#

Deprecated since version 0.2.13: This function is deprecated. Refer to this guide on retrieval and question answering with sources: https://python.langchain.com/v0.2/docs/how_to/qa_sources/#structure-sources-in-model-response

Create a question answering chain that returns an answer with sources.

Parameters:
  • llm (BaseLanguageModel) – Language model to use for the chain.

  • verbose (bool) – Whether to print the details of the chain

  • **kwargs (Any) – Keyword arguments to pass to create_qa_with_structure_chain.

Returns:

Chain (LLMChain) that can be used to answer questions with citations.

Return type:

LLMChain