Skip to main content
skill

rag-faiss — Claude Code skill: vector search and installation

This skill covers FAISS indexing and nearest-vector search. Use it for RAG workflows that rely on similarity rather than metadata filters.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --skill ai-research/rag-faiss
Open on GitHub

What rag-faiss does

The skill walks through building a FAISS index, adding vectors, and searching for neighbors to a query. It covers exact Flat search, approximate IVF, HNSW, and PQ for compressed vectors, along with saving and reopening an index. For cosine similarity, its example uses normalized vectors with an inner-product index.

The material also shows CPU and GPU options, plus integrations with LangChain and LlamaIndex. Install either faiss-cpu or faiss-gpu with pip; the examples also use numpy. FAISS searches vector similarity, so metadata filtering needs a separate solution.

What it helps with

  • Build an index for dense vectors
  • Find vectors closest to a query
  • Save an index and load it later
  • Choose an index type for search and memory needs

Example prompts for the agent

  • Show me how to build a FAISS index and search for the nearest vectors to this query.
  • Compare Flat, IVF, and HNSW for my embedding dataset.
  • Explain how to save a FAISS index and load it again.

How to install rag-faiss

1claude-code-templates

npx claude-code-templates@latest --skill ai-research/rag-faiss

2Skills CLI (Vercel)

npx skills add davila7/claude-code-templates --skill rag-faiss -a claude-code

3Manually: put the files in place

~/.claude/skills/rag-faiss/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/rag-faiss/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about rag-faiss

How do I install rag-faiss in Claude Code?

Run npx claude-code-templates@latest --skill ai-research/rag-faiss.

What does rag-faiss do?

The skill explains how to use FAISS for nearest-vector retrieval, index setup, and persistence. It also covers index options and integrations with LangChain and LlamaIndex.

Which libraries do the rag-faiss examples use?

They use either faiss-cpu or faiss-gpu, along with numpy. The GPU package is the option for GPU-backed FAISS operations.

Similar skills

All skills for AI and ML →

From the same set804

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor