langchain-rag

Build RAG pipelines that ingest, chunk, embed, and retrieve documents for LLMs.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/dotlab-hq/torque --skill langchain-rag-dotlab-hq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: langchain-rag
Source: https://github.com/dotlab-hq/torque/tree/main/.agents/skills/langchain-rag
Command: npx skills add https://github.com/dotlab-hq/torque --skill langchain-rag-dotlab-hq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Retrieval-augmented generation (RAG) systems often fail to provide accurate, grounded answers because language models lack access to up-to-date or domain-specific documents; this Skill provides a practical blueprint to load, chunk, embed, index, retrieve, and surface external context for LLMs to improve relevance and factuality.

Core Features & Use Cases

  • Document ingestion: Examples and patterns for loading PDFs, web pages, and directories into document objects.
  • Text splitting: Guidance on RecursiveCharacterTextSplitter configurations to create context-aware chunks with appropriate overlap.
  • Embeddings & vector stores: Integration examples for OpenAI embeddings and vector stores including InMemory, Chroma, FAISS, and Pinecone with notes on persistence and deserialization.
  • Retrieval & agents: Retrieval strategies (similarity, MMR, metadata filtering) and using retrieved documents within LLM prompts or as a tool for agents.
  • Use Case: Build a searchable knowledge base from company docs to power an LLM-backed Q&A assistant that cites source documents.

Quick Start

Use this skill to ingest a set of documents, split them into chunks, index with OpenAI embeddings into a persistent vector store, and run a similarity search to answer a user question.

Frequently Asked Questions about langchain-rag

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a RAG pipeline with LangChain for a document Q&A assistant?

To build a LangChain RAG pipeline, load documents, split text using RecursiveCharacterTextSplitter, embed with OpenAI, index into a vector store, and retrieve relevant chunks to supply as context for LLM generation.

What is the best way to split text into chunks for retrieval-augmented generation?

Text splitting for retrieval-augmented generation uses RecursiveCharacterTextSplitter to create context-aware chunks with configurable size and overlap, ensuring relevant document boundaries are preserved for accurate retrieval.

Can I use Pinecone or FAISS as a vector store with LangChain embeddings?

Yes, LangChain RAG pipelines support Pinecone and FAISS vector stores alongside Chroma and InMemory options, allowing configurable persistence, deserialization, and search parameters for OpenAI embeddings.

How does similarity search and MMR retrieval work in LangChain?

LangChain retrieval uses similarity search, MMR, and metadata filtering strategies to fetch relevant document chunks from the vector store, which are then surfaced within LLM prompts or used as agent tools.

What are the limitations of using in-memory vector stores for RAG applications?

In-memory vector stores lack persistent storage, meaning indexed embeddings are lost on restart, making them unsuitable for production RAG applications requiring durable document retrieval across sessions.

Do I need OpenAI API access to run LangChain RAG document ingestion?

Yes, OpenAI API access is required for generating embeddings during document ingestion, as the pipeline relies on OpenAI embeddings to index text chunks into the chosen vector store for retrieval.