[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M72FQFT9G4N2SC8HA4GD2C7K":3,"skill-same:01M72FQFT9G4N2SC8HA4GD2C7K":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":14,"repositoryHtmlUrl":45,"repositoryHomepageUrl":6,"ownerHtmlUrl":46,"ownerBlogUrl":6,"ownerDescription":47,"updatedAt":48,"install":49,"resources":62},"01M72FQFT9G4N2SC8HA4GD2C7K","faiss",null,"Facebook's library for efficient similarity search and clustering of dense vectors. Supports billions of vectors, GPU acceleration, and various index types (Flat, IVF, HNSW). Use for fast k-NN search, large-scale vector retrieval, or when you need pure similarity search without metadata. Best for high-performance applications.","cocyuhao\u002Fai-dev-tooling-research-archive","cocyuhao","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F269083740?v=4","01M72F908ET5R76KP9NXS6Y2GJ","Hao Yu","01M72F909376KCNJVKG8MEPY2Q",0,"MIT","https:\u002F\u002Fgithub.com\u002Fcocyuhao\u002Fai-dev-tooling-research-archive\u002Fblob\u002Fmain\u002Fclaude-code-templates\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fai-research\u002Frag-faiss\u002FSKILL.md",[],[],"2026-11-10 18:39:20",false,"---\nname: faiss\ndescription: Facebook's library for efficient similarity search and clustering of dense vectors. Supports billions of vectors, GPU acceleration, and various index types (Flat, IVF, HNSW). Use for fast k-NN search, large-scale vector retrieval, or when you need pure similarity search without metadata. Best for high-performance applications.\nversion: 1.0.0\nauthor: Orchestra Research\nlicense: MIT\ntags: [RAG, FAISS, Similarity Search, Vector Search, Facebook AI, GPU Acceleration, Billion-Scale, K-NN, HNSW, High Performance, Large Scale]\ndependencies: [faiss-cpu, faiss-gpu, numpy]\n---\n\n# FAISS - Efficient Similarity Search\n\nFacebook AI's library for billion-scale vector similarity search.\n\n## When to use FAISS\n\n**Use FAISS when:**\n- Need fast similarity search on large vector datasets (millions\u002Fbillions)\n- GPU acceleration required\n- Pure vector similarity (no metadata filtering needed)\n- High throughput, low latency critical\n- Offline\u002Fbatch processing of embeddings\n\n**Metrics**:\n- **31,700+ GitHub stars**\n- Meta\u002FFacebook AI Research\n- **Handles billions of vectors**\n- **C++** with Python bindings\n\n**Use alternatives instead**:\n- **Chroma\u002FPinecone**: Need metadata filtering\n- **Weaviate**: Need full database features\n- **Annoy**: Simpler, fewer features\n\n## Quick start\n\n### Installation\n\n```bash\n# CPU only\npip install faiss-cpu\n\n# GPU support\npip install faiss-gpu\n```\n\n### Basic usage\n\n```python\nimport faiss\nimport numpy as np\n\n# Create sample data (1000 vectors, 128 dimensions)\nd = 128\nnb = 1000\nvectors = np.random.random((nb, d)).astype('float32')\n\n# Create index\nindex = faiss.IndexFlatL2(d)  # L2 distance\nindex.add(vectors)             # Add vectors\n\n# Search\nk = 5  # Find 5 nearest neighbors\nquery = np.random.random((1, d)).astype('float32')\ndistances, indices = index.search(query, k)\n\nprint(f\"Nearest neighbors: {indices}\")\nprint(f\"Distances: {distances}\")\n```\n\n## Index types\n\n### 1. Flat (exact search)\n\n```python\n# L2 (Euclidean) distance\nindex = faiss.IndexFlatL2(d)\n\n# Inner product (cosine similarity if normalized)\nindex = faiss.IndexFlatIP(d)\n\n# Slowest, most accurate\n```\n\n### 2. IVF (inverted file) - Fast approximate\n\n```python\n# Create quantizer\nquantizer = faiss.IndexFlatL2(d)\n\n# IVF index with 100 clusters\nnlist = 100\nindex = faiss.IndexIVFFlat(quantizer, d, nlist)\n\n# Train on data\nindex.train(vectors)\n\n# Add vectors\nindex.add(vectors)\n\n# Search (nprobe = clusters to search)\nindex.nprobe = 10\ndistances, indices = index.search(query, k)\n```\n\n### 3. HNSW (Hierarchical NSW) - Best quality\u002Fspeed\n\n```python\n# HNSW index\nM = 32  # Number of connections per layer\nindex = faiss.IndexHNSWFlat(d, M)\n\n# No training needed\nindex.add(vectors)\n\n# Search\ndistances, indices = index.search(query, k)\n```\n\n### 4. Product Quantization - Memory efficient\n\n```python\n# PQ reduces memory by 16-32×\nm = 8   # Number of subquantizers\nnbits = 8\nindex = faiss.IndexPQ(d, m, nbits)\n\n# Train and add\nindex.train(vectors)\nindex.add(vectors)\n```\n\n## Save and load\n\n```python\n# Save index\nfaiss.write_index(index, \"large.index\")\n\n# Load index\nindex = faiss.read_index(\"large.index\")\n\n# Continue using\ndistances, indices = index.search(query, k)\n```\n\n## GPU acceleration\n\n```python\n# Single GPU\nres = faiss.StandardGpuResources()\nindex_cpu = faiss.IndexFlatL2(d)\nindex_gpu = faiss.index_cpu_to_gpu(res, 0, index_cpu)  # GPU 0\n\n# Multi-GPU\nindex_gpu = faiss.index_cpu_to_all_gpus(index_cpu)\n\n# 10-100× faster than CPU\n```\n\n## LangChain integration\n\n```python\nfrom langchain_community.vectorstores import FAISS\nfrom langchain_openai import OpenAIEmbeddings\n\n# Create FAISS vector store\nvectorstore = FAISS.from_documents(docs, OpenAIEmbeddings())\n\n# Save\nvectorstore.save_local(\"faiss_index\")\n\n# Load\nvectorstore = FAISS.load_local(\n    \"faiss_index\",\n    OpenAIEmbeddings(),\n    allow_dangerous_deserialization=True\n)\n\n# Search\nresults = vectorstore.similarity_search(\"query\", k=5)\n```\n\n## LlamaIndex integration\n\n```python\nfrom llama_index.vector_stores.faiss import FaissVectorStore\nimport faiss\n\n# Create FAISS index\nd = 1536\nfaiss_index = faiss.IndexFlatL2(d)\n\nvector_store = FaissVectorStore(faiss_index=faiss_index)\n```\n\n## Best practices\n\n1. **Choose right index type** - Flat for \u003C10K, IVF for 10K-1M, HNSW for quality\n2. **Normalize for cosine** - Use IndexFlatIP with normalized vectors\n3. **Use GPU for large datasets** - 10-100× faster\n4. **Save trained indices** - Training is expensive\n5. **Tune nprobe\u002Fef_search** - Balance speed\u002Faccuracy\n6. **Monitor memory** - PQ for large datasets\n7. **Batch queries** - Better GPU utilization\n\n## Performance\n\n| Index Type | Build Time | Search Time | Memory | Accuracy |\n|------------|------------|-------------|--------|----------|\n| Flat | Fast | Slow | High | 100% |\n| IVF | Medium | Fast | Medium | 95-99% |\n| HNSW | Slow | Fastest | High | 99% |\n| PQ | Medium | Fast | Low | 90-95% |\n\n## Resources\n\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ffaiss ⭐ 31,700+\n- **Wiki**: https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ffaiss\u002Fwiki\n- **License**: MIT\n\n\n","# FAISS - Efficient Similarity Search\n\nFacebook AI's library for billion-scale vector similarity search.\n\n## When to use FAISS\n\n**Use FAISS when:**\n- Need fast similarity search on large vector datasets (millions\u002Fbillions)\n- GPU acceleration required\n- Pure vector similarity (no metadata filtering needed)\n- High throughput, low latency critical\n- Offline\u002Fbatch processing of embeddings\n\n**Metrics**:\n- **31,700+ GitHub stars**\n- Meta\u002FFacebook AI Research\n- **Handles billions of vectors**\n- **C++** with Python bindings\n\n**Use alternatives instead**:\n- **Chroma\u002FPinecone**: Need metadata filtering\n- **Weaviate**: Need full database features\n- **Annoy**: Simpler, fewer features\n\n## Quick start\n\n### Installation\n\n```bash\n# CPU only\npip install faiss-cpu\n\n# GPU support\npip install faiss-gpu\n```\n\n### Basic usage\n\n```python\nimport faiss\nimport numpy as np\n\n# Create sample data (1000 vectors, 128 dimensions)\nd = 128\nnb = 1000\nvectors = np.random.random((nb, d)).astype('float32')\n\n# Create index\nindex = faiss.IndexFlatL2(d)  # L2 distance\nindex.add(vectors)             # Add vectors\n\n# Search\nk = 5  # Find 5 nearest neighbors\nquery = np.random.random((1, d)).astype('float32')\ndistances, indices = index.search(query, k)\n\nprint(f\"Nearest neighbors: {indices}\")\nprint(f\"Distances: {distances}\")\n```\n\n## Index types\n\n### 1. Flat (exact search)\n\n```python\n# L2 (Euclidean) distance\nindex = faiss.IndexFlatL2(d)\n\n# Inner product (cosine similarity if normalized)\nindex = faiss.IndexFlatIP(d)\n\n# Slowest, most accurate\n```\n\n### 2. IVF (inverted file) - Fast approximate\n\n```python\n# Create quantizer\nquantizer = faiss.IndexFlatL2(d)\n\n# IVF index with 100 clusters\nnlist = 100\nindex = faiss.IndexIVFFlat(quantizer, d, nlist)\n\n# Train on data\nindex.train(vectors)\n\n# Add vectors\nindex.add(vectors)\n\n# Search (nprobe = clusters to search)\nindex.nprobe = 10\ndistances, indices = index.search(query, k)\n```\n\n### 3. HNSW (Hierarchical NSW) - Best quality\u002Fspeed\n\n```python\n# HNSW index\nM = 32  # Number of connections per layer\nindex = faiss.IndexHNSWFlat(d, M)\n\n# No training needed\nindex.add(vectors)\n\n# Search\ndistances, indices = index.search(query, k)\n```\n\n### 4. Product Quantization - Memory efficient\n\n```python\n# PQ reduces memory by 16-32×\nm = 8   # Number of subquantizers\nnbits = 8\nindex = faiss.IndexPQ(d, m, nbits)\n\n# Train and add\nindex.train(vectors)\nindex.add(vectors)\n```\n\n## Save and load\n\n```python\n# Save index\nfaiss.write_index(index, \"large.index\")\n\n# Load index\nindex = faiss.read_index(\"large.index\")\n\n# Continue using\ndistances, indices = index.search(query, k)\n```\n\n## GPU acceleration\n\n```python\n# Single GPU\nres = faiss.StandardGpuResources()\nindex_cpu = faiss.IndexFlatL2(d)\nindex_gpu = faiss.index_cpu_to_gpu(res, 0, index_cpu)  # GPU 0\n\n# Multi-GPU\nindex_gpu = faiss.index_cpu_to_all_gpus(index_cpu)\n\n# 10-100× faster than CPU\n```\n\n## LangChain integration\n\n```python\nfrom langchain_community.vectorstores import FAISS\nfrom langchain_openai import OpenAIEmbeddings\n\n# Create FAISS vector store\nvectorstore = FAISS.from_documents(docs, OpenAIEmbeddings())\n\n# Save\nvectorstore.save_local(\"faiss_index\")\n\n# Load\nvectorstore = FAISS.load_local(\n    \"faiss_index\",\n    OpenAIEmbeddings(),\n    allow_dangerous_deserialization=True\n)\n\n# Search\nresults = vectorstore.similarity_search(\"query\", k=5)\n```\n\n## LlamaIndex integration\n\n```python\nfrom llama_index.vector_stores.faiss import FaissVectorStore\nimport faiss\n\n# Create FAISS index\nd = 1536\nfaiss_index = faiss.IndexFlatL2(d)\n\nvector_store = FaissVectorStore(faiss_index=faiss_index)\n```\n\n## Best practices\n\n1. **Choose right index type** - Flat for \u003C10K, IVF for 10K-1M, HNSW for quality\n2. **Normalize for cosine** - Use IndexFlatIP with normalized vectors\n3. **Use GPU for large datasets** - 10-100× faster\n4. **Save trained indices** - Training is expensive\n5. **Tune nprobe\u002Fef_search** - Balance speed\u002Faccuracy\n6. **Monitor memory** - PQ for large datasets\n7. **Batch queries** - Better GPU utilization\n\n## Performance\n\n| Index Type | Build Time | Search Time | Memory | Accuracy |\n|------------|------------|-------------|--------|----------|\n| Flat | Fast | Slow | High | 100% |\n| IVF | Medium | Fast | Medium | 95-99% |\n| HNSW | Slow | Fastest | High | 99% |\n| PQ | Medium | Fast | Low | 90-95% |\n\n## Resources\n\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ffaiss ⭐ 31,700+\n- **Wiki**: https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ffaiss\u002Fwiki\n- **License**: MIT\n\n\n",{"name":5,"tags":24,"author":36,"license":15,"version":37,"description":7,"dependencies":38},[25,26,27,28,29,30,31,32,33,34,35],"RAG","FAISS","Similarity Search","Vector Search","Facebook AI","GPU Acceleration","Billion-Scale","K-NN","HNSW","High Performance","Large Scale","Orchestra Research","1.0.0",[39,40,41],"faiss-cpu","faiss-gpu","numpy","main","f4a24bd1ab047411d4ae57ee9a96701a7706e779","claude-code-templates\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fai-research\u002Frag-faiss","https:\u002F\u002Fgithub.com\u002Fcocyuhao\u002Fai-dev-tooling-research-archive","https:\u002F\u002Fgithub.com\u002Fcocyuhao","Beijing Wuzi University","2026-05-12 10:57:02",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add cocyuhao\u002Fai-dev-tooling-research-archive --skill faiss",{"tool":55,"command":56},"bunx","bunx skills add cocyuhao\u002Fai-dev-tooling-research-archive --skill faiss",{"tool":58,"command":59},"pnpm","pnpm dlx skills add cocyuhao\u002Fai-dev-tooling-research-archive --skill faiss","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcocyuhao\u002Fai-dev-tooling-research-archive\u002Fblob\u002Fmain\u002Fclaude-code-templates\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fai-research\u002Frag-faiss\u002FSKILL.md",true,[63],{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Findex_types.md","REFERENCE","参考文档",6181,"https:\u002F\u002Fgithub.com\u002Fcocyuhao\u002Fai-dev-tooling-research-archive\u002Fblob\u002Fmain\u002Fclaude-code-templates\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fai-research\u002Frag-faiss\u002Freferences\u002Findex_types.md",[70,78,86,93,100,107],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":77},"01M72JQ593HE3SRJD3446CCKA8","web-access","所有联网操作必须通过此 skill 处理，包括：搜索、网页抓取、登录后操作、网络交互等。 触发场景：用户要求搜索信息、查看网页内容、访问需要登录的网站、操作网页界面、抓取社交媒体内容（小红书、微博、推特等）、读取动态渲染页面、以及任何需要真实浏览器环境的网络任务。","https:\u002F\u002Fgithub.com\u002Fcocyuhao\u002Fai-dev-tooling-research-archive\u002Fblob\u002Fmain\u002Fweb-access\u002FSKILL.md",[],[],"2026-11-10 22:39:42",{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":82,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":77},"01M72JKXJYFT2RBJ2HP5ZRA853","last30days","Multi-query social research across Reddit, X, YouTube, TikTok, Instagram, Hacker News, Polymarket, and the web. Intelligent query planning with Gemini\u002FOpenAI fallback.","https:\u002F\u002Fgithub.com\u002Fcocyuhao\u002Fai-dev-tooling-research-archive\u002Fblob\u002Fmain\u002Flast30days-skill\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fcocyuhao\u002Fai-dev-tooling-research-archive\u002Fblob\u002Fmain\u002Flast30days-skill\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":77},"01M72JKMRQSD0ZY66KQ863HVY5","writing-plans","Use when you have a spec or requirements for a multi-step task. Creates comprehensive implementation plans with bite-sized tasks, exact file paths, and complete code examples.","https:\u002F\u002Fgithub.com\u002Fcocyuhao\u002Fai-dev-tooling-research-archive\u002Fblob\u002Fmain\u002Fhermes-agent\u002Fskills\u002Fsoftware-development\u002Fwriting-plans\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":77},"01M72JKHCV8DT6VWSD4KS5YWT9","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code. Enforces RED-GREEN-REFACTOR cycle with test-first approach.","https:\u002F\u002Fgithub.com\u002Fcocyuhao\u002Fai-dev-tooling-research-archive\u002Fblob\u002Fmain\u002Fhermes-agent\u002Fskills\u002Fsoftware-development\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":77},"01M72JKD7VX7EQM38R704F3KT1","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior. 4-phase root cause investigation — NO fixes without understanding the problem first.","https:\u002F\u002Fgithub.com\u002Fcocyuhao\u002Fai-dev-tooling-research-archive\u002Fblob\u002Fmain\u002Fhermes-agent\u002Fskills\u002Fsoftware-development\u002Fsystematic-debugging\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":77},"01M72JKA9XXB92FS8JHPCYW8CM","subagent-driven-development","Use when executing implementation plans with independent tasks. Dispatches fresh delegate_task per task with two-stage review (spec compliance then code quality).","https:\u002F\u002Fgithub.com\u002Fcocyuhao\u002Fai-dev-tooling-research-archive\u002Fblob\u002Fmain\u002Fhermes-agent\u002Fskills\u002Fsoftware-development\u002Fsubagent-driven-development\u002FSKILL.md",[],[]]