rag-implementation

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

Updated Apr 23, 2026
One-click install
npx skills add https://github.com/SanketAdlak/PDMProjectDesign --skill rag-implementation-sanketadlak
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rag-implementation
Source: https://github.com/SanketAdlak/PDMProjectDesign/tree/main/.agents/skills/rag-implementation
Command: npx skills add https://github.com/SanketAdlak/PDMProjectDesign --skill rag-implementation-sanketadlak

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? LLMs hallucinate and lack access to proprietary or current knowledge. This Skill provides patterns and code for building RAG systems that ground LLM responses in external documents, enabling accurate Q&A over your own data. ## Core Features & Use Cases - Vector Store Integration: Configure Pinecone, Weaviate, Chroma, or pgvector with embedding models like voyage-3-large and text-embedding-3-large. - Advanced Retrieval Patterns: Implement hybrid search with BM25, multi-query retrieval, HyDE, contextual compression, and parent document retrieval. - Reranking & Optimization: Apply cross-encoder reranking, Cohere Rerank, MMR diversity, and metadata filtering to improve result quality. - Use Case: Build a documentation assistant that answers questions about your product by indexing docs into Pinecone, retrieving relevant chunks with hybrid search, and generating cited answers with Claude via LangGraph. ## Quick Start Build a RAG pipeline that indexes my documents into a vector store and answers questions with cited sources using LangGraph.

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 system with LangGraph?

Define a state with question, context, and answer fields, then add retrieve and generate nodes to a StateGraph. The retrieve node queries a vector store retriever, and the generate node formats retrieved documents into a prompt for the LLM.

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. Choose based on scale, hosting constraints, and filtering needs.

What is hybrid search in RAG and when should I use it?

Hybrid search combines dense embedding retrieval with sparse BM25 keyword matching using weighted fusion, typically 70% semantic and 30% keyword. Use it when queries contain exact terms like product names or codes that embeddings miss.

Does chunk size affect RAG retrieval quality?

Yes. Small chunks around 400 characters improve retrieval precision, while larger chunks around 2000 provide more context. The parent document retriever pattern retrieves small child chunks but returns larger parent documents for generation.

How do I reduce hallucinations in RAG answers?

Instruct the LLM to answer only from provided context and say when information is insufficient. Add citation requirements, use reranking to improve context relevance, and measure faithfulness with LLM-as-judge evaluation metrics.