Build your own vector database
Scale up & ship·30 min

Index the full set

0 / 1
# grade this stage (from your course directory)
npx theinference test --stage scale-up --watch

The capstone runs the whole machine end to end: build the index, persist it to a segment, reload it, then search every query and report recall@10, mean comparisons/query, and the speedup versus a brute-force scan measured in the same run. The mini-Qdrant, top to bottom.

What to build

Your task

Run the capstone

Wire the capstone subcommand: build, serialize, reload, then search the reloaded index. Print:

{ "n": ..., "recall": ..., "meanComparisons": ..., "bruteComparisons": ...,
  "speedup": ..., "reloadExact": 1 }
your_program.sh
./your_program.sh capstone <fixture>/chapters/09-capstone/steps/01-scale-to-100k/fixtures/data.json
Hardware-independent gates only

The deterministic pass/fail values are recall, mean comparisons, and the structural invariants — all functions of the seeded graph. speedup is bruteComparisons / meanComparisons, a hardware-independent ratio (not wall-clock). Build time is never graded; the generous timeout is just a runaway guard.

How it's graded

Process mode: stdout_json_match against the frozen reference (atol 1e-6 on recall, integer-exact on the comparison counts, reloadExact must be 1). Search runs on the reloaded index — so persistence and search both have to be correct.