# FAISS, Pinecone and Weaviate: Compare the Search Contract First: runnable files

5 CPU tests using FAISS 1.11.0 and NumPy 2.2.6; no Pinecone or Weaviate deployment, remote integration or comparative benchmark.

Download all files in this folder before running. The article is at https://oneruby.dev/vector-databases-python-pinecone-weaviate-faiss-compared/.

## Reproduce

Tested with Python 3.11.5 on arm64 macOS. Use an isolated environment; requirements.txt pins direct dependencies and requirements.lock records the tested dependency closure for this platform.

```sh
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements.lock
.venv/bin/python -B -m unittest -v test_example.py
.venv/bin/python -B example.py
```

## Files

- [requirements.lock](requirements.lock)

- [example.py](example.py)
- [requirements.txt](requirements.txt)
- [test_example.py](test_example.py)

## Boundaries

- Actual local FAISS flat CPU search; Pinecone and Weaviate claims are documentation-only.
- Tiny allowlisted index rebuilt per query; not an efficient multi-tenant deployment design.
- Persistence round trip trusts locally produced files and is not atomic across index and metadata.
- No approximate-index recall, latency, scale, cost, hosted consistency or availability benchmark.
