Agent skill · data analytics · jeremylongshore
langchain-embeddings-search
Build and query vector stores with LangChain 1.0 without getting burned
Why this skill is useful
Provides specific domain knowledge on embedding models, vector stores, and their integration patterns that the AI wouldn't reliably generate on its own.
What it needs
Requires faiss-cpu, langchain-community, langchain-core, langchain-openai, langchain-pinecone, python installed locally. Requires openai, pinecone account access. About 5k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.
What this skill does
LangChain Embeddings and Vector Search (Python) Overview FAISS.similaritysearchwithscore() returns L2 distance — lower is better. Pinecone.similaritysearchwithscore() returns cosine similarity — higher is better. Swap your vector store and your if score > 0.8 filter now keeps the garbage and drops the good results, silently. This is pain-catalog entry P12, and it is the single most common reason a "we migrated from FAISS to Pinecone for scale" project loses retrieval quality overnight. The sibling gotchas: P13 — RecursiveCharacterTextSplitter default separators break inside code fences, so RAG over Markdown docs truncates code examples mid-function P14 — Embedding-dim mismatch crashes at insert time (after 10 minutes of processing), not at VectorStore.init; the failure blames "dim mismatch: 1536 != 3072" and no earlier error P15 — Cohere/Jina reranker scores are within-query relative, so a 0.34 top-1 is not worse than a 0.92 top-1 on a different query; filtering by threshold is the wrong heuristic This skill walks through embedding model selection, vector store creation with the version-safe dim guard, score normalization, hybrid keyword+vector search, and rerankers with the correct filter-by-rank pattern. Pin: langchain-core 1.0.x, langchain-community 1.0.x, langchain-openai 1.0.x, faiss-cpu, pinecone-client. Pain-catalog anchors: P12, P13, P14, P15, P49, P50. Prerequisites Python 3.10+ langchain-core >= 1.0, < 2.0 and langchain-community >= 1.0, < 2.0 Embedding provider: pip install langchain-openai (text-embedding-3-small/large) Vector store: pip install faiss-cpu OR pip install langchain-pinecone Provider API keys: OPENAIAPIKEY, PINECONEAPIKEY Instructions Step 1 — Initialize embeddings with an explicit dim Swapping models (-small 1536 → -large 3072) is a migration, not a swap. Plan it — back-fill the index, not just the config. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills jeremylongshore/langchain-embeddings-search