Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Optimize vector index performance for latency, recall, and memory. Use when tuning HNSW parameters, selecting quantization strategies, or scaling vector search infrastructure.
.claude/skills/wshobson-vector-index-tuning/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 6% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 1% | 0% |
| case-10 | ✓→✓ | = Same ✓ | 20% | 0% |
| case-20 | ✓→✓ | = Same ✓ | 16% | 0% |
| case-02 | ✓→✓ | = Same ✓ | -24% | 0% |
Guide to optimizing vector indexes for production performance.
Data Size Recommended Index
────────────────────────────────────────
< 10K vectors → Flat (exact search)
10K - 1M → HNSW
1M - 100M → HNSW + Quantization
> 100M → IVF + PQ or DiskANN| Parameter | Default | Effect | | ------------------ | ------- | ---------------------------------------------------- | | M | 16 | Connections per node, ↑ = better recall, more memory | | efConstruction | 100 | Build quality, ↑ = better index, slower build | | efSearch | 50 | Search quality, ↑ = better recall, slower search |
Full Precision (FP32): 4 bytes × dimensions
Half Precision (FP16): 2 bytes × dimensions
INT8 Scalar: 1 byte × dimensions
Product Quantization: ~32-64 bytes total
Binary: dimensions/8 bytesFull template library and detailed worked examples live in references/details.md. Read that file when you need the concrete templates.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 12,683 | 9,903 | -22% | 1 | 1 | 0% | 2,320 | 2,335 | +1% | 0 | 0 | — |
case-10 | pass→pass | 4,767 | 4,154 | -13% | 1 | 1 | 0% | 1,054 | 1,265 | +20% | 0 | 0 | — |
case-20 | pass→pass | 13,537 | 10,211 | -25% | 1 | 1 | 0% | 2,177 | 2,532 | +16% | 0 | 0 | — |
case-02 | pass→pass | 14,100 | 9,061 | -36% | 1 | 1 | 0% | 2,616 | 1,976 | -24% | 0 | 0 | — |
case-03 | pass→pass | 16,350 | 8,302 | -49% | 1 | 1 | 0% | 3,002 | 2,195 | -27% | 0 | 0 | — |
case-04 | pass→pass | 18,929 | 13,867 | -27% | 1 | 1 | 0% | 3,323 | 3,261 | -2% | 0 | 0 | — |
case-05 | pass→pass | 11,600 | 9,149 | -21% | 1 | 1 | 0% | 2,349 | 2,209 | -6% | 0 | 0 | — |
case-06 | pass→pass | 12,247 | 6,375 | -48% | 1 | 1 | 0% | 2,183 | 1,666 | -24% | 0 | 0 | — |
case-07 | fail→pass | 6,924 | 4,960 | -28% | 1 | 1 | 0% | 1,383 | 1,462 | +6% | 0 | 0 | — |
case-08 | pass→pass | 4,924 | 4,024 | -18% | 1 | 1 | 0% | 1,104 | 1,386 | +26% | 0 | 0 | — |
case-09 | pass→pass | 5,600 | 4,079 | -27% | 1 | 1 | 0% | 1,275 | 1,396 | +9% | 0 | 0 | — |
case-21 | pass→pass | 13,669 | 13,850 | +1% | 1 | 1 | 0% | 2,856 | 3,248 | +14% | 0 | 0 | — |
case-11 | pass→pass | 9,827 | 3,915 | -60% | 1 | 1 | 0% | 2,158 | 1,251 | -42% | 0 | 0 | — |
case-12 | pass→pass | 8,254 | 6,827 | -17% | 1 | 1 | 0% | 1,921 | 1,957 | +2% | 0 | 0 | — |
case-13 | pass→pass | 11,195 | 8,126 | -27% | 1 | 1 | 0% | 1,913 | 1,831 | -4% | 0 | 0 | — |
case-14 | pass→pass | 4,116 | 6,203 | +51% | 1 | 1 | 0% | 738 | 1,487 | +101% | 0 | 0 | — |
case-15 | pass→pass | 10,986 | 5,319 | -52% | 1 | 1 | 0% | 2,198 | 1,560 | -29% | 0 | 0 | — |
case-16 | pass→pass | 15,516 | 14,349 | -8% | 1 | 1 | 0% | 2,592 | 2,723 | +5% | 0 | 0 | — |
case-17 | pass→pass | 12,445 | 12,648 | +2% | 1 | 1 | 0% | 2,337 | 2,956 | +26% | 0 | 0 | — |
case-18 | pass→pass | 7,535 | 6,928 | -8% | 1 | 1 | 0% | 1,182 | 1,582 | +34% | 0 | 0 | — |
case-19 | pass→pass | 73,959 | 12,740 | -83% | 1 | 1 | 0% | 2,376 | 2,902 | +22% | 0 | 0 | — |
case-22 | pass→pass | 14,746 | 14,293 | -3% | 1 | 1 | 0% | 2,871 | 3,141 | +9% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +5 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.