faiss

Search large-scale dense embeddings with FAISS k-NN indexes.

4|Updated May 18, 2026
One-click install
npx skills add https://github.com/ZardLi1115/zedclaw --skill faiss-zardli1115
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: faiss
Source: https://github.com/ZardLi1115/zedclaw/tree/main/optional-skills/mlops/faiss
Command: npx skills add https://github.com/ZardLi1115/zedclaw --skill faiss-zardli1115

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

FAISS solves the problem of finding the most similar vectors efficiently when you have very large embedding datasets that would be too slow or too memory-heavy to search with brute force.

Core Features & Use Cases

  • Efficient vector similarity search: Perform fast k-NN queries over dense embeddings using L2 distance or inner product.
  • Scalable index types: Choose exact (Flat) or approximate (IVF, HNSW, PQ, IVFPQ) indexes depending on accuracy, speed, and memory needs.
  • High-throughput and GPU acceleration: Use FAISS’s GPU support for significant speedups on large-scale workloads.

Use Case: Build a semantic retrieval system for millions of document chunks where you need low-latency nearest-neighbor search and can trade a small amount of recall for speed and memory savings.

Quick Start

Install FAISS and run an IndexFlatL2 (or IndexFlatIP with normalized vectors) to add your embedding vectors and return the top-k 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 run fast similarity search over millions of dense embeddings?

To run fast similarity search over dense embeddings, you can use FAISS to perform efficient k-NN queries. It builds scalable indexes like Flat or IVF to quickly find nearest neighbors using L2 distance or inner product without brute force.

What is the best way to choose a FAISS index type for semantic search?

The best FAISS index type for semantic search depends on your accuracy, speed, and memory needs. Choose exact Flat indexes for perfect recall, or approximate IVF, HNSW, and PQ indexes to trade a small amount of recall for faster queries and lower memory usage.

How does GPU acceleration work for large-scale vector similarity search?

GPU acceleration provides significant speedups for large-scale vector similarity search by offloading k-NN queries to the GPU. This allows FAISS to handle high-throughput workloads and process millions of dense embeddings much faster than CPU-based searches.

Do I need to train IVF and PQ indexes before searching dense embeddings?

Yes, you need to train IVF and PQ-based indexes before searching dense embeddings. Training fits the index parameters to your vector distribution, which is a required step before adding vectors and executing fast query-time neighbor searches.

Can I use FAISS for low-latency retrieval in a recommendation system?

Yes, you can use FAISS for low-latency retrieval in recommendation systems. It supports scalable approximate nearest neighbor search over large-scale embeddings, allowing you to quickly retrieve relevant items without exhausting memory resources.