langchain-ai avatar

Langchain Rag

A comprehensive LangChain RAG implementation guide that covers the complete pipeline from document ingestion to response generation. Shows you how to load documents from PDFs, web pages, and directories, split them with RecursiveCharacterTextSplitter, embed with OpenAI, and store in Chroma, FAISS, or Pinecone. Includes practical examples for similarity search, retrieval configuration, and connecting everything into a working RAG system. The vector store comparison table is helpful for choosing between local development (Chroma), high performance (FAISS), and production deployment (Pinecone). Code examples are thorough and show both the basic patterns and real implementation details you'll need.

skills.sh installs
18.4K
GitHub stars
1.3K
last updated
Aug 21, 2026

Install

$ npx -y skills add langchain-ai/langchain-skills --skill langchain-rag --agent claude-code

Installs into .claude/skills of the current project.

Files

Retrieval Augmented Generation (RAG) enhances LLM responses by fetching relevant context from external knowledge sources.

Pipeline:

  1. Index: Load → Split → Embed → Store
  2. Retrieve: Query → Embed → Search → Return docs
  3. Generate: Docs + Query → LLM → Response

Key Components:

  • Document Loaders: Ingest data from files, web, databases
  • Text Splitters: Break documents into chunks
  • Embeddings: Convert text to vectors
  • Vector Stores: Store and search embeddings
Vector StoreUse CasePersistence
InMemoryTestingMemory only
FAISSLocal, high performanceDisk
ChromaDevelopmentDisk
PineconeProduction, managedCloud

Complete RAG Pipeline

End-to-end RAG pipeline: load documents, split into chunks, embed, store, retrieve, and generate a response.

Sponsors

Details

Repository
github.com/langchain-ai/langchain-skills
Category
AI & Agent Building

More from langchain-ai/langchain-skills

All 15
1yaklang avatarllm-prompt-injectionyaklang/hack-skillsLLM prompt injection playbook. Use when testing AI/LLM applications for direct injection, indirect injection via RAG/browsing, tool abuse, data exfiltration, MC3.9Kskills.sh installs
2inference-sh avatarai-rag-pipelineinference-sh/skillsBuild RAG (Retrieval Augmented Generation) pipelines with web search and LLMs. Tools: Tavily Search, Exa Search, Exa Answer, Claude, GPT-4, Gemini via OpenRoute1Kskills.sh installs
3davila7 avataragent-memory-systemsdavila7/claude-code-templatesMemory is the cornerstone of intelligent agents. Without it, every interaction starts from zero. This skill covers the architecture of agent memory: short-term 728skills.sh installs
4moizibnyousaf avatarllm-application-devmoizibnyousaf/ai-agent-skillsBuilding applications with Large Language Models - prompt engineering, RAG patterns, and LLM integration. Use for AI-powered features, chatbots, or LLM-based au466skills.sh installs
5github avatarai-prompt-engineering-safety-reviewgithub/awesome-copilotComprehensive AI prompt engineering safety review and improvement prompt. Analyzes prompts for safety, bias, security vulnerabilities, and effectiveness while p10.4Kskills.sh installs
6github avatarfinalize-agent-promptgithub/awesome-copilotFinalize prompt file using the role of an AI agent to polish the prompt for the end user.9Kskills.sh installs