faiss

Implements billion-scale vector similarity search using FAISS indices with GPU acceleration.

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/vivekgoquest/hermes-agent-stable --skill faiss-vivekgoquest
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: faiss
Source: https://github.com/vivekgoquest/hermes-agent-stable/tree/main/optional-skills/mlops/faiss
Command: npx skills add https://github.com/vivekgoquest/hermes-agent-stable --skill faiss-vivekgoquest

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires faiss-cpu, faiss-gpu, numpy, and includes references (resource) components.

What problem does it solve? Searching for nearest neighbors across millions or billions of embedding vectors is too slow with brute-force methods, and this Skill provides guidance for building fast approximate similarity search indexes with FAISS. ## Core Features & Use Cases - Index Selection Guidance: Covers Flat, IVF, HNSW, and Product Quantization index types with accuracy, speed, and memory trade-offs. - GPU Acceleration: Shows how to move indices to single or multiple GPUs for 10-100x faster search. - Framework Integration: Includes LangChain and LlamaIndex vector store integration patterns plus index save/load workflows. - Use Case: When building a RAG pipeline over millions of document embeddings, use this Skill to create an HNSW or IVF+PQ index, tune nprobe or efSearch, and persist the trained index to disk. ## Quick Start Use the faiss skill to build a similarity search index over my embedding vectors and find the 5 nearest neighbors for a query vector.

Frequently Asked Questions about faiss

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

FAQPage Schema
How do I build a vector similarity search index with FAISS?▼

Create an index such as faiss.IndexFlatL2(d) for your vector dimension, add float32 vectors with index.add(vectors), then call index.search(query, k) to retrieve the k nearest neighbors with distances.

Which FAISS index type should I use for my dataset size?▼

Use Flat for under 10K vectors with exact results, IVF for 10K-1M vectors, HNSW for 1M-10M with best quality, and IVF+PQ for over 10M vectors where memory efficiency matters.

FAISS vs Chroma or Pinecone for vector search?▼

FAISS is best for pure vector similarity at billion scale with GPU acceleration and high throughput. Choose Chroma or Pinecone when you need metadata filtering, and Weaviate when you need full database features.

Does FAISS support GPU acceleration?▼

Yes, install faiss-gpu and use faiss.index_cpu_to_gpu with StandardGpuResources for a single GPU, or faiss.index_cpu_to_all_gpus for multi-GPU. This typically delivers 10-100x faster search than CPU.

How do I get cosine similarity with FAISS?▼

Use faiss.IndexFlatIP for inner product search and normalize vectors first with faiss.normalize_L2. With normalized vectors, inner product equals cosine similarity, which suits text embeddings and recommendation systems.

Why does my FAISS IVF index return poor results?▼

IVF indices require training on representative data via index.train(vectors) before adding vectors. Also increase nprobe to search more clusters; nprobe=1 gives roughly 50% recall while nprobe=10 reaches about 95%.