Vector Index Tuning

Vector Index Tuning

Teaches the AI to tune vector indexes for latency, recall and memory, covering HNSW parameters, quantization and scaling vector search.

Skill files2 files

references/

SKILL.md70 lines
1
---
2
name: vector-index-tuning
3
description: Optimize vector index performance for latency, recall, and memory. Use when tuning HNSW parameters, selecting quantization strategies, or scaling vector search infrastructure.
4
---
5
6
# Vector Index Tuning
7
8
Guide to optimizing vector indexes for production performance.
9
10
## When to Use This Skill
11
12
- Tuning HNSW parameters
13
- Implementing quantization
14
- Optimizing memory usage
15
- Reducing search latency
16
- Balancing recall vs speed
17
- Scaling to billions of vectors
18
19
## Core Concepts
20
21
### 1. Index Type Selection
22
23
```
24
Data Size Recommended Index
25
────────────────────────────────────────
26
< 10K vectors → Flat (exact search)
27
10K - 1M → HNSW
28
1M - 100M → HNSW + Quantization
29
> 100M → IVF + PQ or DiskANN
30
```
31
32
### 2. HNSW Parameters
33
34
| Parameter | Default | Effect |
35
| ------------------ | ------- | ---------------------------------------------------- |
36
| **M** | 16 | Connections per node, ↑ = better recall, more memory |
37
| **efConstruction** | 100 | Build quality, ↑ = better index, slower build |
38
| **efSearch** | 50 | Search quality, ↑ = better recall, slower search |
39
40
### 3. Quantization Types
41
42
```
43
Full Precision (FP32): 4 bytes × dimensions
44
Half Precision (FP16): 2 bytes × dimensions
45
INT8 Scalar: 1 byte × dimensions
46
Product Quantization: ~32-64 bytes total
47
Binary: dimensions/8 bytes
48
```
49
50
## Templates and detailed worked examples
51
52
Full template library and detailed worked examples live in `references/details.md`. Read that file when you need the concrete templates.
53
54
## Best Practices
55
56
### Do's
57
58
- **Benchmark with real queries** - Synthetic may not represent production
59
- **Monitor recall continuously** - Can degrade with data drift
60
- **Start with defaults** - Tune only when needed
61
- **Use quantization** - Significant memory savings
62
- **Consider tiered storage** - Hot/cold data separation
63
64
### Don'ts
65
66
- **Don't over-optimize early** - Profile first
67
- **Don't ignore build time** - Index updates have cost
68
- **Don't forget reindexing** - Plan for maintenance
69
- **Don't skip warming** - Cold indexes are slow
70

© Seth Hobson · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 11,966 prompts

More by @OpenSourceBuffGuy

See all
Azure Static Web Apps prompt image

Azure Static Web Apps

Helps an agent create, configure and deploy Azure Static Web Apps with the SWA CLI, including local emulation, Functions APIs and CI/CD.

agent-skill, azure, deployment, github-actions, ci-cd, serverless, command-line, frontend, step-by-step-guide, for-developers, best-practices, authentication, web-development, scaffolding, cloud, api, nodejs

Workflow Automation Specialist prompt image

Workflow Automation Specialist

Finds repetitive tasks to automate, estimates time savings and ROI, and designs no-code workflows with Zapier, Make or native tools within your budget.

system-prompt, expert-advice, workflow-automation, no-code, productivity, zapier, make-com, for-non-coders, for-small-business-owners, beginner-friendly, xml-tags, estimation, planner, guardrails, structured-output, process-improvement, step-by-step-guide, consulting, time-management, office-administration

Giant Soda Can Frozen in Glacier prompt image

Giant Soda Can Frozen in Glacier

Draws a monumental soda can frozen in blue glacial ice in an arctic landscape, with a snowcat and tiny scientists for scale, as a cinematic low-angle advertising photo.

image-prompt, photorealistic, cinematic, low-angle, wide-shot, product-photography, advertising, winter, landscape, surreal, forced-perspective, vertical-format, soft-lighting, natural-light, muted-colors, prompt-weights, nano-banana

Reviews

Loading reviews…

Discussion

Loading comments…