# ModelLaboratory

> **Class** in `langchain_classic`

📖 [View in docs](https://reference.langchain.com/python/langchain-classic/model_laboratory/ModelLaboratory)

A utility to experiment with and compare the performance of different models.

## Signature

```python
ModelLaboratory(
    self,
    chains: Sequence[Chain],
    names: list[str] | None = None,
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `chains` | `Sequence[Chain]` | Yes | A sequence of chains to experiment with. Each chain must have exactly one input and one output variable. |
| `names` | `list[str] \| None` | No | Optional list of names corresponding to each chain. If provided, its length must match the number of chains. (default: `None`) |

## Constructors

```python
__init__(
    self,
    chains: Sequence[Chain],
    names: list[str] | None = None,
)
```

| Name | Type |
|------|------|
| `chains` | `Sequence[Chain]` |
| `names` | `list[str] \| None` |


## Properties

- `chains`
- `chain_colors`
- `names`

## Methods

- [`from_llms()`](https://reference.langchain.com/python/langchain-classic/model_laboratory/ModelLaboratory/from_llms)
- [`compare()`](https://reference.langchain.com/python/langchain-classic/model_laboratory/ModelLaboratory/compare)

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/311675a517f51ec6c77454124293c58df517e952/libs/langchain/langchain_classic/model_laboratory.py#L15)