# IVFFlatConfig

> **Class** in `langgraph.store.postgres`

📖 [View in docs](https://reference.langchain.com/python/langgraph.store.postgres/base/IVFFlatConfig)

IVFFlat index divides vectors into lists, and then searches a subset of those lists that are closest to the query vector. It has faster build times and uses less memory than HNSW, but has lower query performance (in terms of speed-recall tradeoff).

Three keys to achieving good recall are:
1. Create the index after the table has some data
2. Choose an appropriate number of lists - a good place to start is rows / 1000 for up to 1M rows and sqrt(rows) for over 1M rows
3. When querying, specify an appropriate number of probes (higher is better for recall, lower is better for speed) - a good place to start is sqrt(lists)

## Signature

```python
IVFFlatConfig()
```

## Extends

- `ANNIndexConfig`

## Properties

- `kind`
- `nlist`

---

[View source on GitHub](https://github.com/langchain-ai/langgraph/blob/aa322c13cd5f16a3f6254a931a4104e412cd687c/libs/checkpoint-postgres/langgraph/store/postgres/base.py#L200)