faiss

Implements billion-scale vector similarity search using FAISS index types and GPU acceleration.

14|5|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/MLT-OSS/hermes-agent-go --skill faiss-mlt-oss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: faiss
Source: https://github.com/MLT-OSS/hermes-agent-go/tree/main/optional-skills/mlops/faiss
Command: npx skills add https://github.com/MLT-OSS/hermes-agent-go --skill faiss-mlt-oss

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Performing nearest-neighbor search over millions or billions of dense embedding vectors is too slow with brute-force approaches, and this Skill provides guidance for building fast approximate similarity search indexes with FAISS. ## Core Features & Use Cases - Multiple Index Types: Covers Flat (exact), IVF (cluster-based), HNSW (graph-based), and PQ (memory-efficient) indexes with selection guidance by dataset size. - GPU Acceleration: Instructions for moving indexes to single or multiple GPUs for 10-100x speedups on large datasets. - Framework Integration: Examples for LangChain and LlamaIndex vector store integration, plus index save/load workflows. - Use Case: When building a RAG pipeline over 5 million document embeddings, use this Skill to create an HNSW index, tune efSearch for recall, and persist the trained index to disk. ## Quick Start Ask the agent to create a FAISS index for your embedding vectors and run a k-nearest-neighbor search on a sample query.

Frequently Asked Questions about faiss

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

FAQPage Schema
How do I perform similarity search on vectors with FAISS?

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

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 vectors needing 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 high-performance similarity search without metadata filtering, supporting billions of vectors and GPU acceleration. Choose Chroma or Pinecone when you need metadata filtering or managed database features.

Does FAISS support GPU acceleration?

Yes, install faiss-gpu and use faiss.index_cpu_to_gpu(res, 0, index) for a single GPU or faiss.index_cpu_to_all_gpus(index) for multi-GPU setups, achieving 10-100x speedups over CPU.

How do I use cosine similarity with FAISS?

Use faiss.IndexFlatIP(d) for inner product search and normalize vectors first with faiss.normalize_L2(vectors). Normalized inner product is equivalent to cosine similarity for both indexing and queries.

Why does my FAISS IVF index return poor results?

IVF indexes require training with index.train(vectors) before adding data, and low nprobe values reduce recall. Increase index.nprobe toward nlist to search more clusters and improve accuracy at the cost of speed.