# MongoDB Atlas Vector Search tutorial: code and real outputs Run date: 2026-11-10 (every `.out` file in this folder comes from one full run of `run.sh` on a fresh container). Docker 24.0.6 (Docker Desktop, arm64, about 7.9 GB VM, other containers left alone). Everything Python runs in Docker (`python:3.12-slim`, Python 3.12.16, `pymongo==4.19.0`, see `pip-freeze.txt`). The Node snippet runs in `node:22-slim` (v22.23.4) with `mongodb` 7.8.0 installed by `npm ci --ignore-scripts` from `node/package-lock.json` (driver `engines`: node >=20.19.0). Nothing is installed on the host. Pins (see `pins.txt`): image `mongodb/mongodb-atlas-local:9.0.4-20261109T110135Z`, RepoDigest `sha256:3dd8f07f2d468370985ed54becda0e0c3a87e54a81d0dc8f29577e82f081c27f`, native `linux/arm64` (no emulation), mongod 9.0.4, MongoDB Search Community (mongot) 1.78.0. On 2026-11-10 the tags `9.0.4`, `9.0`, `9` and `latest` pointed at the same manifest. Docker Hub README: 9.0.x images use MongoDB Search Community (mongot), 8.x images use a deprecated local-dev mongot. All results belong to this exact tag. The container has no authentication, binds to 127.0.0.1 only and has `mem_limit: 3g`. That is for a local demo. Do not copy it to a server. ## Input data `chunks.jsonl` is not included (3.4 MB with embeddings). It has 304 rows from 52 pages of webcrawlerapi.com/docs, fields `id,url,heading,text,embedding`, `nomic-embed-text` 768 dims, unit-length vectors, sha256 `7c62db9258ba7b33bc75bf3e0593b0a7ffc73d0b0fb11da68db0eb27ebe4e145`. It is the shared file from the Chroma, sqlite-vec and Elasticsearch posts, produced by `build_chunks.py` (crawl with the WebCrawlerAPI API, split by headers, embed with Ollama). To reproduce the exact numbers you need that file. If you run `build_chunks.py` on a new crawl you get different chunks and different ranks. `questions.json` and `qvecs.json` (7 precomputed query vectors) are copies of the Elasticsearch post's files. `build_chunks.py` was NOT run for this post, and the containers need no Ollama. ## Files - `compose.yml` (project `mongo-kb`), `Dockerfile` + `requirements.txt` + `pip-freeze.txt`, `run_py.sh` (runs a script on the compose network), `run.sh` (run order and cleanup). - `quickstart.py` (the self-contained block from the post, its own database), `common.py` (helpers, index definitions), `mongo_probe.py`, `mongo_toy.py` (embedding inside an array of objects), `mongo_setup.py` (insert, create the vector index 3 times, time READY), `mongo_query.py` (hit table, ANN vs ENN, filters, error cases, timings), `mongo_hybrid.py` (search index, `$search`, `$rankFusion`, app-side RRF, cross-check), `mongo_tenant.py` (section filter in `$search` and in both `$rankFusion` pipelines), `mongo_update.py` (delete and reinsert, visibility lag), `knn_top5.py` (pymongo top-5 ids for the Node check), `node/query.mjs` + `node/package.json` + `node/package-lock.json` + `node/Dockerfile`. - `*.out`: real output of each script. `t1..t6-*.out` are the excerpts rendered in the screenshots (`t5-node.png` shows the full Node output). `health.out` is the wait for a healthy container. `memory_stats.out` is `docker stats --no-stream` every 5 s (about 6 to 7 s apart in practice, 10 samples). `index_sizes.out` is `du` of the mongot index directories. `oom.out` is OOMKilled and restart count after the run. Stop: `docker compose -p mongo-kb -f compose.yml down -v`. Remove the runner images: `docker rmi mongo-kb-py mongo-kb-node`. Remove the Atlas Local image if you do not want it cached: `docker rmi mongodb/mongodb-atlas-local:9.0.4-20261109T110135Z`.