Index of every page on this site: llms.txt
All skills
jeremylongshore avatar

/langchain-embeddings-search

@0d57af8
Run it yourself

Build and query vector stores with LangChain 1.0 without getting burned by flipped score semantics, embedding-dim mismatches, reranker quirks, and chunk-splitter bugs. Use when building a RAG pipeline, choosing between FAISS / Pinecone / Chroma / PGVector, filtering by similarity score, or adding a reranker. Trigger with "langchain embeddings", "vector store similarity search", "langchain RAG retrieval", "FAISS score", "Pinecone score", "reranker score".

Use this Skill: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/langchain-embeddings-search

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesone-pager.md

≈760 tokens on demand. Your agent reads this file only when SKILL.md points to it.

langchain-embeddings-search — One-Pager

Build and query vector stores with LangChain 1.0 without getting burned by flipped score semantics, dim mismatches, reranker quirks, or chunk-splitter bugs.

The Problem

FAISS.similarity_search_with_score() returns L2 distance (lower is better); Pinecone.similarity_search_with_score() returns cosine similarity (higher is better). Swap vector stores and your if score > 0.8 filter now keeps the garbage and drops the good results — silently, with no error. Embedding-dim mismatches (1536 vs 3072) crash at insert time after 10 minutes of processing, not at VectorStore.__init__. RecursiveCharacterTextSplitter default separators break inside Markdown code fences, truncating code examples mid-function. Cohere/Jina reranker scores are within-query relative, so filtering by threshold drops the right answer for low-variance queries.

The Solution

This skill gives you a startup dim-assertion guard, a score normalizer at the retriever boundary so downstream code never sees raw store-specific scores, a vector-store comparison matrix (FAISS/Chroma/PGVector/Pinecone) with score direction and latency tradeoffs, language-aware text splitters (Language.MARKDOWN, Language.PYTHON) that respect structural boundaries, an EnsembleRetriever pattern combining BM25 + vector with tuned weights, and a reranker pattern that filters by rank (not threshold). Pinned to LangChain 1.0.x with three deep references.

Who / What / When

Aspect Details
Who Python engineers building RAG pipelines, migrating between vector stores, or tuning retrieval quality with LangChain 1.0
What Dim-assertion guard, score normalizer, vector-store comparison matrix, language-aware chunking, BM25 + vector hybrid retriever, rerank-by-rank pattern, 3 references (vector-store-comparison, score-semantics, hybrid-search)
When When building a RAG retriever, choosing or swapping vector stores, tuning similarity thresholds, or diagnosing why retrieval quality dropped after a migration

Key Features

  1. Score normalizer at retriever boundary — Collapses FAISS L2 distance, PGVector cosine distance, and Pinecone cosine similarity into a single [0, 1] similarity scale where 1 = identical, so thresholds mean the same thing regardless of backend
  2. Vector-store comparison matrix with migration checklist — Score metric, direction, typical latency, filtering support, and namespace isolation for FAISS / Chroma / PGVector / Pinecone, plus a five-step migration procedure (re-embed → dim assertion → dual-write → shadow-read → cutover)
  3. Hybrid search via EnsembleRetriever with weight tuning procedure — BM25 + vector combined with RRF, plus a 50-100-pair golden-set evaluation harness that measures Recall@5 and MRR@10 to pick the right weight split for your corpus (exact-match-heavy → 0.6/0.4; paraphrase-heavy → 0.3/0.7)

Quick Start

See SKILL.md for full instructions.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    The skill provides comprehensive instructions for LangChain 1.0 vector search. It presents standard RAG patterns and identified several known technical pitfalls. Security considerations include the risk of indirect prompt injection from processed documents and the use of the pickle module for local data persistence.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at 0d57af8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 months ago
What it can do
Reads files Edits files Runs commands
version
2.7.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
compatibility
Designed for Claude Code
All 6 allowed tools
ReadWriteEditBash(python:*)Bash(pip:*)Grep
Other metadata
tags
[
  "saas",
  "langchain",
  "python",
  "langchain-1.0",
  "embeddings",
  "rag",
  "vector-store"
]

README badge

README badge for jeremylongshore/tons-of-skills-marketplace/langchain-embeddings-search