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.
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-ragRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/langchain-ai/langchain-skills /tmp/langchain-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/langchain-skills/config/skills/langchain-rag ~/.gemini/antigravity-cli/skills/langchain-ragAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
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
ANo 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 →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
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.
