rag-implementation

Implements retrieval-augmented generation pipelines with vector databases, embeddings, and LangGraph.

1|Updated May 10, 2026
One-click install
npx skills add https://github.com/Tgoldi/claude-skills --skill rag-implementation-tgoldi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rag-implementation
Source: https://github.com/Tgoldi/claude-skills/tree/main/rag-implementation
Command: npx skills add https://github.com/Tgoldi/claude-skills --skill rag-implementation-tgoldi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? LLMs hallucinate and lack access to proprietary or current information. This Skill provides patterns and code for building RAG systems that ground LLM responses in external knowledge bases, enabling accurate document Q&A with source citations. ## Core Features & Use Cases - Vector Store Integration: Ready-to-use configurations for Pinecone, Weaviate, Chroma, and pgvector with embedding models like voyage-3-large and text-embedding-3-large. - Advanced Retrieval Patterns: Hybrid search with BM25, multi-query retrieval, HyDE, contextual compression, and parent document retrieval implemented with LangChain and LangGraph. - Optimization & Evaluation: Reranking with cross-encoders and Cohere, MMR diversity, metadata filtering, chunking strategies, and RAG evaluation metrics. - Use Case: Build a documentation assistant that answers questions over your company's internal docs, returning grounded answers with [1], [2] style citations. ## Quick Start Ask the AI to build a RAG pipeline using LangGraph with Pinecone and Voyage embeddings that answers questions over your document collection.

Frequently Asked Questions about rag-implementation

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

FAQPage Schema
How do I build a RAG pipeline with LangChain and LangGraph?

Define a state graph with retrieve and generate nodes: the retrieve node queries a vector store retriever for relevant documents, and the generate node formats them into a prompt for the LLM. Compile the graph with StateGraph and invoke it with a question.

Which vector database should I use for RAG?

Pinecone suits managed serverless deployments, Chroma works for local development, pgvector integrates with existing PostgreSQL, and Weaviate offers hybrid search with GraphQL. Choose based on hosting needs, scale, and whether you need SQL integration.

What embedding model works best with Claude for RAG?

voyage-3-large with 1024 dimensions is recommended for Claude applications. For code search use voyage-code-3, and for OpenAI-based stacks text-embedding-3-large offers high accuracy at 3072 dimensions.

How do I improve RAG retrieval accuracy?

Combine dense embeddings with BM25 keyword search using ensemble retrieval, then rerank results with a cross-encoder or Cohere Rerank. Adding metadata filters and using MMR for diversity also improves result quality.

Why does my RAG system return irrelevant documents?

Irrelevant retrieval usually stems from poor chunking, weak query formulation, or missing metadata filters. Try hybrid search, multi-query retrieval, HyDE hypothetical documents, or reduce chunk size to 500-1000 tokens with 10-20% overlap.

What chunk size should I use for RAG document splitting?

Use 500-1000 tokens per chunk with 10-20% overlap to balance context and specificity. RecursiveCharacterTextSplitter with paragraph and sentence separators preserves semantic boundaries better than fixed character splits.