faiss

Perform k-NN similarity search and clustering on dense vectors with FAISS.

Updated Jul 13, 2026
One-click install
npx skills add https://github.com/zangjeicy/Hermes --skill faiss-zangjeicy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: faiss
Source: https://github.com/zangjeicy/Hermes/tree/main/optional-skills/mlops/faiss
Command: npx skills add https://github.com/zangjeicy/Hermes --skill faiss-zangjeicy

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This skill addresses the challenge of performing fast, accurate similarity searches across massive collections of high-dimensional vectors, which is essential for modern AI applications like RAG and recommendation systems.

Core Features & Use Cases

  • Billion-Scale Retrieval: Efficiently index and search millions or billions of vectors using advanced algorithms like HNSW and IVF.
  • GPU Acceleration: Leverage hardware-accelerated similarity search to achieve 10-100x performance gains over CPU-only implementations.
  • Use Case: Use this skill to build a high-speed semantic search engine for a large document repository where you need to retrieve the most relevant context for a user query in milliseconds.

Quick Start

Use the faiss skill to initialize a new IndexFlatL2 index with 128 dimensions and add the provided vector dataset for similarity searching.

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 large-scale high-dimensional vectors?

Similarity search on large-scale dense vectors is performed using Facebook's FAISS library, which supports k-NN search and approximate nearest neighbor indexing. It enables efficient retrieval across millions or billions of vectors using index types like HNSW and IVF.

What is the best way to speed up vector retrieval for RAG applications?

Vector retrieval for RAG applications is accelerated using FAISS with optional GPU support. By leveraging hardware-accelerated similarity search, you can achieve 10-100x performance gains over CPU-only implementations while maintaining high throughput and low latency.

Can I use FAISS with numpy arrays for approximate nearest neighbor indexing?

Yes, FAISS works seamlessly with numpy arrays for approximate nearest neighbor indexing. The skill depends on numpy alongside faiss-cpu and faiss-gpu to process dense vectors, allowing you to index and search datasets efficiently.

Does GPU acceleration make a noticeable difference for dense vector clustering?

GPU acceleration provides significant performance improvements for dense vector clustering and similarity search. Using faiss-gpu delivers 10-100x speedups compared to CPU-only implementations, satisfying requirements for high-throughput vector operations on massive datasets.

When should I use HNSW versus IVF indexing for vector search?

HNSW and IVF are both supported index types for approximate nearest neighbor search in FAISS. Choosing between them depends on your specific latency and accuracy requirements when performing similarity search and clustering on large collections of dense vectors.

How do I initialize an IndexFlatL2 index for k-NN search?

To initialize an IndexFlatL2 index for k-NN search, specify the vector dimensions, create the index, and add your dataset. This skill enables you to quickly set up a 128-dimensional index and perform exact similarity searches on dense vectors.