# create_extraction_chain

> **Function** in `langchain_classic`

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

Creates a chain that extracts information from a passage.

## Signature

```python
create_extraction_chain(
    schema: dict,
    llm: BaseLanguageModel,
    prompt: BasePromptTemplate | None = None,
    tags: list[str] | None = None,
    verbose: bool = False,
) -> Chain
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `schema` | `dict` | Yes | The schema of the entities to extract. |
| `llm` | `BaseLanguageModel` | Yes | The language model to use. |
| `prompt` | `BasePromptTemplate \| None` | No | The prompt to use for extraction. (default: `None`) |
| `tags` | `list[str] \| None` | No | Optional list of tags to associate with the chain. (default: `None`) |
| `verbose` | `bool` | No | Whether to run in verbose mode. In verbose mode, some intermediate logs will be printed to the console. (default: `False`) |

## Returns

`Chain`

Chain that can be used to extract information from a passage.

## ⚠️ Deprecated

Deprecated since version 0.1.14. Use ChatModel.with_structured_output(...) instead. Will be removed in version 2.0.0. Available on chat models capable of tool calling. See https://docs.langchain.com/oss/python/langchain/structured-output

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/42f8f79293cfb7589e5bc1d74a8ae4dfd0bf15e3/libs/langchain/langchain_classic/chains/openai_functions/extraction.py#L47)