faiss
Facebook's library for efficient similarity search and clustering of dense vectors. Supports billions of vectors, GPU acceleration, and various index types (Flat, IVF, HNSW). Use for fast k-NN search, large-scale vector retrieval, or when you need pure similarity search without metadata. Best for high-performance applications.
npx skills add Orchestra-Research/AI-Research-SKILLs --skill faiss --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# FAISS - Efficient Similarity Search Facebook AI's library for billion-scale vector similarity search. ## When to use FAISS **Use FAISS when:** - Need fast similarity search on large vector datasets (millions/billions) - GPU acceleration required - Pure vector similarity (no metadata filtering needed) - High throughput, low latency critical - Offline/batch processing of embeddings **Metrics**: - **31,700+ GitHub stars** - Meta/Facebook AI Research - **Handles billions of vectors** - **C++** with Python bindings **Use alternatives instead**: - **Chroma/Pinecone**: Need metadata filtering - **Weaviate**: Need full database features - **Annoy**: Simpler, fewer features ## Quick start ### Installation ```bash # CPU only pip install faiss-cpu # GPU support pip install faiss-gpu ``` ### Basic usage ```python import faiss import numpy as np # Create sample data (1000 vectors, 128 dimensions) d = 128 nb = 1000 vectors = np.random.random((nb, d)).astype('float32') # Create index index = faiss.IndexFlatL2(d) # L2 distance index.add(vectors) # Add vectors # Search k = 5 # Find 5 nearest neighbors query = np.random.random((1, d)).astype('float32') distances, indices = index.search(query, k) p
- When to use FAISS
- Quick start
- Installation
- Basic usage
- Index types
- 1. Flat (exact search)
- 2. IVF (inverted file) - Fast approximate
- 3. HNSW (Hierarchical NSW) - Best quality/speed
- 4. Product Quantization - Memory efficient
- Save and load
- GPU acceleration
- LangChain integration
- LlamaIndex integration
- Best practices
CPU only pip install faiss-cpu GPU support pip install faiss-gpu
What does the faiss skill do?
Facebook's library for efficient similarity search and clustering of dense vectors. Supports billions of vectors, GPU acceleration, and various index types (Flat, IVF, HNSW). Use for fast k-NN search, large-scale vector retrieval, or when you need pure similarity search without metadata. Best for high-performance applications.
How do I install it?
Run `npx skills add Orchestra-Research/AI-Research-SKILLs --skill faiss --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From Orchestra-Research/AI-Research-SKILLs, a repository with 11,391 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
