Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

langchain-rag

Skill by langchain-ai

Guides an AI assistant through building retrieval-augmented generation (RAG) systems with LangChain. It covers loading, splitting, embedding, and storing documents for retrieval.

  • Score 86
  • 1.4k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install langchain-rag

Built from the published package, never by AI.

git clone --depth 1 https://github.com/langchain-ai/langchain-skills /tmp/langchain-skills && mkdir -p ~/.claude/skills && cp -r /tmp/langchain-skills/config/skills/langchain-rag ~/.claude/skills/langchain-rag

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install langchain-rag in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The langchain-rag skill guides an AI assistant through building retrieval-augmented generation systems with LangChain. It follows an index, retrieve, and generate pipeline: loading documents, splitting them with RecursiveCharacterTextSplitter, embedding them with OpenAI, and storing them in a vector store. The skill includes Python and TypeScript examples.

Supported vector stores are InMemory for testing, FAISS for local high-performance use, Chroma for development, and Pinecone for managed production use. Retrieval covers similarity search, MMR, and metadata filters, and the skill shows how to expose a retriever as a tool for an agent. It is aimed at developers building RAG applications.

Written from the project's SKILL.md and checked against it.

What it can do

  • Load documentsIngest PDF files, web pages, and directories of text files with document loaders.
  • Split textBreak documents into overlapping chunks with RecursiveCharacterTextSplitter.
  • Create embeddingsConvert text chunks into vectors using OpenAI embedding models.
  • Store vectorsSave embeddings in InMemory, FAISS, Chroma, or Pinecone vector stores.
  • Search documentsRun similarity search or MMR search and return results with relevance scores.
  • Filter by metadataLimit search results using metadata properties attached to documents.
  • Build a RAG agentExpose a retriever as a tool so an agent can answer questions from documents.

What you need

  • OpenAI models for embeddings and chat (examples use text-embedding-3-small and gpt-4.1)
  • Python or TypeScript with LangChain packages

Try asking

  • Show me how to load a PDF and split it into chunks for RAG.
  • Set up a Chroma vector store with OpenAI embeddings and save it to disk.
  • Create an agent that searches my docs before answering questions.

Good to know

  • Only load FAISS indexes you created, because the Python loader uses pickle-backed metadata.
  • Do not mix embeddings from different models in the same vector store.
  • The TypeScript Chroma example expects a running Chroma server.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: config/skills/langchain-rag/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to langchain-rag

All alternatives →

Compare with agent-reproduce-align, google_contacts or m06-error-handling

langchain-rag: common questions

Which vector stores does langchain-rag cover?

The skill's table lists InMemory for testing, FAISS for local use, Chroma for development, and Pinecone for production. Examples use these stores.

What chunk size does the skill recommend?

It says a chunk size of 500 to 1500 is typically good, with overlap of about 10 to 20 percent of the chunk size.

Is it safe to load a saved FAISS index?

Only load FAISS indexes you created and fully control. The source warns against loading downloaded, shared, or untrusted index directories.

How do I install langchain-rag?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is langchain-rag free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is langchain-rag safe to use?

It scores 86 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to langchain-rag?

Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.

langchain-rag Install

Add to stack

Loading.