# create_qa_with_sources_chain

> **Function** in `langchain_classic`

📖 [View in docs](https://reference.langchain.com/python/langchain-classic/chains/openai_functions/qa_with_structure/create_qa_with_sources_chain)

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

## Signature

```python
create_qa_with_sources_chain(
    llm: BaseLanguageModel,
    verbose: bool = False,
    **kwargs: Any = {},
) -> LLMChain
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `llm` | `BaseLanguageModel` | Yes | Language model to use for the chain. |
| `verbose` | `bool` | No | Whether to print the details of the chain (default: `False`) |
| `**kwargs` | `Any` | No | Keyword arguments to pass to `create_qa_with_structure_chain`. (default: `{}`) |

## Returns

`LLMChain`

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

## ⚠️ Deprecated

Deprecated since version 0.2.13.

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/ee95ad6907f5eab94644183393a20aa2a032bb19/libs/langchain/langchain_classic/chains/openai_functions/qa_with_structure.py#L113)