# load_query_constructor_chain

> **Function** in `langchain_classic`

📖 [View in docs](https://reference.langchain.com/python/langchain-classic/chains/query_constructor/base/load_query_constructor_chain)

Load a query constructor chain.

## Signature

```python
load_query_constructor_chain(
    llm: BaseLanguageModel,
    document_contents: str,
    attribute_info: Sequence[AttributeInfo | dict],
    examples: list | None = None,
    allowed_comparators: Sequence[Comparator] = tuple(Comparator),
    allowed_operators: Sequence[Operator] = tuple(Operator),
    enable_limit: bool = False,
    schema_prompt: BasePromptTemplate | None = None,
    **kwargs: Any = {},
) -> LLMChain
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `llm` | `BaseLanguageModel` | Yes | BaseLanguageModel to use for the chain. |
| `document_contents` | `str` | Yes | The contents of the document to be queried. |
| `attribute_info` | `Sequence[AttributeInfo \| dict]` | Yes | Sequence of attributes in the document. |
| `examples` | `list \| None` | No | Optional list of examples to use for the chain. (default: `None`) |
| `allowed_comparators` | `Sequence[Comparator]` | No | Sequence of allowed comparators. Defaults to all `Comparator` objects. (default: `tuple(Comparator)`) |
| `allowed_operators` | `Sequence[Operator]` | No | Sequence of allowed operators. Defaults to all `Operator` objects. (default: `tuple(Operator)`) |
| `enable_limit` | `bool` | No | Whether to enable the limit operator. (default: `False`) |
| `schema_prompt` | `BasePromptTemplate \| None` | No | Prompt for describing query schema. Should have string input variables allowed_comparators and allowed_operators. (default: `None`) |
| `**kwargs` | `Any` | No | Arbitrary named params to pass to LLMChain. (default: `{}`) |

## Returns

`LLMChain`

A LLMChain that can be used to construct queries.

## ⚠️ Deprecated

Deprecated since version 0.2.13.

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/51e954877efd2d2c3c5bf09364dcfec8794eadb0/libs/langchain/langchain_classic/chains/query_constructor/base.py#L268)