vector-index-tuning – skill DevOps & Hạ tầng cho agent AI
Tối ưu hiệu năng chỉ mục vector về độ trễ, recall và bộ nhớ. Dùng khi tinh chỉnh tham số HNSW, chọn chiến lược lượng tử hóa, hoặc mở rộng hạ tầng tìm kiếm vector.
Cài skill vector-index-tuning bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/vector-index-tuning-c7f50.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /vector-index-tuning – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/vector-index-tuning-c7f50.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $vector-index-tuning – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/vector-index-tuning-c7f50.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /vector-index-tuning – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/vector-index-tuning-c7f50.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /vector-index-tuning – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Vector Index Tuning
Guide to optimizing vector indexes for production performance.
When to Use This Skill
- Tuning HNSW parameters
- Implementing quantization
- Optimizing memory usage
- Reducing search latency
- Balancing recall vs speed
- Scaling to billions of vectors
Core Concepts
1. Index Type Selection
Data Size Recommended Index
────────────────────────────────────────
< 10K vectors → Flat (exact search)
10K - 1M → HNSW
1M - 100M → HNSW + Quantization
> 100M → IVF + PQ or DiskANN2. HNSW Parameters
| 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 |
3. Quantization Types
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 bytesTemplates and detailed worked examples
Full template library and detailed worked examples live in references/details.md. Read that file when you need the concrete templates.
Best Practices
Do's
- Benchmark with real queries - Synthetic may not represent production
- Monitor recall continuously - Can degrade with data drift
- Start with defaults - Tune only when needed
- Use quantization - Significant memory savings
- Consider tiered storage - Hot/cold data separation
Don'ts
- Don't over-optimize early - Profile first
- Don't ignore build time - Index updates have cost
- Don't forget reindexing - Plan for maintenance
- Don't skip warming - Cold indexes are slow
Skill liên quan
- expo-cicd-workflows – Giúp hiểu và viết file YAML workflow của EAS cho dự án Expo. Dùng skill này khi người…
- expo-deployment – Triển khai ứng dụng Expo với EAS: build và submit bản phát hành iOS và Android, cấu hình…
- watchers – Thăm dò RSS, API JSON và GitHub với cơ chế loại bỏ trùng lặp bằng watermark.
- runbook-generator – Tạo runbook vận hành từ tên dịch vụ: quy trình triển khai, ứng phó sự cố, bảo trì và…
- fedora-hyprland-installer – Cài đặt, cấu hình, kiểm tra, sửa lỗi, cập nhật và gỡ cài đặt Hyprland trên Fedora Linux…
- fedramp-compliance – Triển khai yêu cầu FedRAMP cho dịch vụ đám mây liên bang. Cấu hình kiểm soát NIST 800-53…
- firebase-app-platform – Xây dựng và vận hành ứng dụng trên Firebase với Auth, Firestore, Cloud Functions và…
- flutter-expert – Làm chủ phát triển Flutter với Dart 3, widget nâng cao và triển khai đa nền tảng.