faiss

Performs fast k-NN search and clustering on dense vectors using FAISS index types.

3|1|Updated May 19, 2026
One-click install
npx skills add https://github.com/Quill-Agent/Quill-Agent --skill faiss-quill-agent
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: faiss
Source: https://github.com/Quill-Agent/Quill-Agent/tree/main/optional-skills/mlops/faiss
Command: npx skills add https://github.com/Quill-Agent/Quill-Agent --skill faiss-quill-agent

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides a powerful and efficient tool for similarity search and clustering of dense vectors, supporting billions of vectors and GPU acceleration for optimal performance.

Core Features & Use Cases

  • Vector Search: Perform fast k-NN search on large vector datasets for applications like large-scale vector retrieval or pure similarity search.
  • Index Types: Utilize various index types such as Flat, IVF, HNSW, and Product Quantization to cater to different search performance and memory requirements.
  • Use Case: Ideal for scenarios like fast k-NN search, large-scale vector retrieval, and applications that require high-throughput, low-latency similarity search without metadata.

Quick Start

Install the FAISS Skill and create an index to perform a search:

pip install faiss-cpu
python
import faiss
index = faiss.IndexFlatL2(128)  # 128 dimensions
index.add(np.random.random((1000, 128)).astype('float32'))
distances, indices = index.search(np.random.random((1, 128)).astype('float32'), 5)

Frequently Asked Questions about faiss

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

FAQPage Schema
How do I perform fast k-NN search on large-scale dense vectors?

Fast k-NN search on large-scale dense vectors is performed by creating a Flat, IVF, HNSW, or Product Quantization index, adding your dataset, and calling the search method to retrieve the nearest neighbors.

What is the best way to handle similarity search for billions of vectors?

Similarity search for billions of vectors is handled using index types like IVF or Product Quantization to optimize memory and performance. This allows efficient clustering and retrieval without managing metadata.

Does GPU acceleration work for vector search and clustering tasks?

GPU acceleration works for vector search and clustering tasks by utilizing the faiss-gpu library. This significantly increases processing speed for building indexes and querying dense vectors compared to CPU-only execution.

Do I need numpy to run large-scale vector retrieval operations?

You need numpy to run large-scale vector retrieval operations because input vectors must be passed as contiguous numpy arrays. The library requires faiss-cpu or faiss-gpu and numpy to execute similarity searches.

When should I use Product Quantization instead of a Flat index for similarity search?

Product Quantization should be used instead of a Flat index for similarity search when you need to compress large-scale dense vectors to fit into memory. Flat indexes provide exact results but do not scale to billions of vectors efficiently.

Can I use this approach for similarity search applications without metadata?

You can use this approach for similarity search applications without metadata, as it focuses purely on dense vector matching and clustering. It is ideal for scenarios requiring fast retrieval based solely on vector distances.