# create_extraction_chain_pydantic

> **Function** in `langchain_classic`

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

Creates a chain that extracts information from a passage.

## Signature

```python
create_extraction_chain_pydantic(
    pydantic_schemas: list[type[BaseModel]] | type[BaseModel],
    llm: BaseLanguageModel,
    system_message: str = _EXTRACTION_TEMPLATE,
) -> Runnable
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `pydantic_schemas` | `list[type[BaseModel]] \| type[BaseModel]` | Yes | The schema of the entities to extract. |
| `llm` | `BaseLanguageModel` | Yes | The language model to use. |
| `system_message` | `str` | No | The system message to use for extraction. (default: `_EXTRACTION_TEMPLATE`) |

## Returns

`Runnable`

A runnable that extracts information from a passage.

## ⚠️ Deprecated

Deprecated since version 0.1.14.

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/9f232caa7a8fe1ca042a401942d5d90d54ceb1a6/libs/langchain/langchain_classic/chains/openai_tools/extraction.py#L17)