The recall/latency curve
# grade this stage (from your course directory)
npx theinference test --stage tune-the-curve --watchThe recall/latency curve every vector DB exposes as a single knob. Sweep efSearch ∈ {8, 16, 32, 64} and emit a recall-vs-comparisons table. You are reproducing the ANN-Benchmarks plot on your own index.
What to build
Emit the sweep table
Wire the sweep subcommand. For each efSearch in the swept set, compute mean recall@10 and mean comparisons over all queries. Print:
{ "sweep": [ { "efSearch": 8, "recall": ..., "meanComparisons": ... }, ... ] }
./your_program.sh sweep <fixture>/chapters/05-knn-search/steps/04-tune-the-curve/fixtures/data.json
A wider frontier can locally re-order a near-tie and dip recall by under 1% before climbing again. So the gate is match the frozen reference table, not "recall must never decrease." Comparisons, being integer-deterministic on the seeded graph, match exactly.
Process mode: stdout_json_match of your sweep array against the frozen reference (atol 1e-6 on recall, integer-exact on comparisons). Same seed ⇒ same graph ⇒ the sweep is a deterministic table.