faiss

Perform high-performance similarity search over dense vector embeddings with FAISS indices.

2|Updated Apr 12, 2026
One-click install
npx skills add https://github.com/Clay-HHK/claude-config --skill faiss-clay-hhk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: faiss
Source: https://github.com/Clay-HHK/claude-config/tree/main/skills/AI-research-SKILLs/15-rag/faiss
Command: npx skills add https://github.com/Clay-HHK/claude-config --skill faiss-clay-hhk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

FAISS provides fast and scalable similarity search for dense vector embeddings, removing the bottleneck of slow nearest-neighbor queries on large embedding collections so you can retrieve relevant items with low latency.

Core Features & Use Cases

  • Exact and Approximate k-NN: Supports exact Flat indices and approximate indices like IVF, HNSW, and PQ for trade-offs between speed, memory, and accuracy.
  • GPU Acceleration & Scaling: Move indices to single or multiple GPUs for 10-100× speedups on large datasets and use IVF+PQ for billion-scale storage efficiency.
  • Integrations & Workflows: Commonly used for embedding-based retrieval, recommendation systems, semantic search, and as a vector store backend with LangChain or LlamaIndex.
  • Use Case Example: Build an IVF+PQ index for 100 million document embeddings, tune nprobe and PQ hyperparameters for desired recall/latency, save the trained index, and serve nearest-neighbor search queries.

Quick Start

Create a FAISS index for your embeddings (choose Flat/IVF/HNSW/PQ), train if required, add your vectors, and run a k-NN search for the top 5 results.

Frequently Asked Questions about faiss

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I perform billion-scale similarity search over dense vector embeddings?

Billion-scale vector search is performed using optimized IVF and PQ indices to compress dense vector embeddings and partition the search space. This approach balances memory efficiency with query speed for retrieving relevant items from massive datasets.

How do I tune nprobe and efSearch for speed-accuracy trade-offs in approximate nearest neighbor search?

Tune nprobe and efSearch parameters to adjust the speed-accuracy trade-off in approximate nearest neighbor search. Increasing these values probes more clusters or expands the graph traversal, improving recall at the cost of higher query latency.

Can I use GPU acceleration for vector search on millions of vectors?

Yes, GPU acceleration is supported for vector search on large datasets, moving indices to single or multiple GPUs for 10-100x speedups. This enables fast nearest-neighbor queries over millions of dense vector embeddings.

What is the difference between Flat, IVF, HNSW, and PQ indices for k-NN search?

Flat indices provide exact k-NN search, while IVF, HNSW, and PQ are approximate indices offering trade-offs between speed, memory, and accuracy. IVF partitions data, HNSW builds graph layers, and PQ compresses vectors for efficient billion-scale storage.

How do I build and save an IVF+PQ index for 100 million document embeddings?

Build an IVF+PQ index for 100 million document embeddings by creating the index, training the quantizers on your vectors, adding the data, and saving the trained index. This workflow enables efficient embedding-based retrieval and semantic search.

Does this similarity search approach work with LangChain or LlamaIndex for semantic search?

Yes, this similarity search approach works as a vector store backend with LangChain or LlamaIndex for semantic search. It provides fast nearest-neighbor queries over dense vector embeddings for embedding-based retrieval workflows.