# load_query_constructor_runnable

> **Function** in `langchain_classic`

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

Load a query constructor runnable chain.

## Signature

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

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `llm` | `BaseLanguageModel` | Yes | BaseLanguageModel to use for the chain. |
| `document_contents` | `str` | Yes | Description of the page contents of the document to be queried. |
| `attribute_info` | `Sequence[AttributeInfo \| dict]` | Yes | Sequence of attributes in the document. |
| `examples` | `Sequence \| 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`) |
| `fix_invalid` | `bool` | No | Whether to fix invalid filter directives by ignoring invalid operators, comparators and attributes. (default: `False`) |
| `kwargs` | `Any` | No | Additional named params to pass to FewShotPromptTemplate init. (default: `{}`) |

## Returns

`Runnable`

A Runnable that can be used to construct queries.

---

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