faiss

Perform high-speed k-NN search on large vector datasets with FAISS.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/hhhi21g/HealthCenter --skill faiss-hhhi21g
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: faiss
Source: https://github.com/hhhi21g/HealthCenter/tree/main/.codex/skills/faiss
Command: npx skills add https://github.com/hhhi21g/HealthCenter --skill faiss-hhhi21g

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 enhances the efficiency of similarity search operations on large vector datasets, reducing time complexity and improving performance in tasks like k-NN search and large-scale vector retrieval.

Core Features & Use Cases

  • Efficient Similarity Search: Supports billions of vectors with GPU acceleration and various index types.
  • Use Case: Ideal for high-performance applications requiring fast k-NN search or pure similarity search without metadata, such as content recommendation systems, information retrieval, and large-scale data clustering.

Quick Start

Install FAISS using pip and perform a basic k-NN search on sample vectors.

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

Frequently Asked Questions about faiss

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

FAQPage Schema
How do I perform k-NN similarity search on large vector datasets?

To perform k-NN similarity search on large vector datasets, use FAISS to index vectors and execute high-speed retrieval. It optimizes search performance for tasks like content recommendation, image similarity, and large-scale data clustering without metadata.

Can I use GPU acceleration for vector search in FAISS?

Yes, FAISS supports GPU acceleration to optimize similarity search performance across billions of vectors. Installing the faiss-gpu library significantly reduces time complexity for massive vector retrieval tasks.

Do I need numpy to run similarity search with FAISS?

Yes, numpy is required to run similarity search with FAISS. You use numpy arrays to generate and manage vector data before adding it to a FAISS index for executing k-NN search operations.

What is the best way to index massive vector datasets for content recommendation?

The best way to index massive vector datasets for content recommendation is using FAISS with an index type like IndexFlatL2. It handles billions of vectors efficiently, providing fast and accurate pure similarity search.

Does FAISS support metadata filtering during k-NN search?

No, FAISS is designed for pure similarity search and does not support metadata filtering during k-NN search. It is ideal for high-performance applications requiring fast vector retrieval without metadata constraints.