rag_implementation

Implement retrieval-augmented generation pipelines with vector databases, embeddings, and reranking for LLM applications.

Updated Jan 14, 2026
One-click install
npx skills add https://github.com/jvsandhu/agentic-skills --skill rag-implementation-jvsandhu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rag_implementation
Source: https://github.com/jvsandhu/agentic-skills/tree/main/skills/rag_implementation
Command: npx skills add https://github.com/jvsandhu/agentic-skills --skill rag-implementation-jvsandhu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires langchain, openai, pinecone, weaviate, chromadb, sentence-transformers, and includes references (resource) and assets (resource) components.

What problem does it solve? LLMs hallucinate and lack access to proprietary or current knowledge. This Skill guides you through building RAG systems that ground LLM responses in your own documents, enabling accurate Q&A over private data with source citations. ## Core Features & Use Cases - End-to-End RAG Pipelines: Load documents, chunk them, generate embeddings, and store them in vector databases like Pinecone, Weaviate, Chroma, or FAISS. - Advanced Retrieval Patterns: Implement hybrid search (BM25 + dense), multi-query retrieval, contextual compression, and parent document retrieval. - Reranking & Optimization: Improve precision with cross-encoders, Cohere Rerank, MMR, and metadata filtering. - Use Case: Build a documentation assistant that answers questions about your company's internal wiki, returning answers with citations to the exact source pages. ## Quick Start Ask the agent to build a RAG pipeline that indexes the documents in your docs folder with Chroma and answers questions with source citations.

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?

Load documents with a DirectoryLoader, split them with RecursiveCharacterTextSplitter, embed them with OpenAIEmbeddings, and store them in a vector store like Chroma. Then create a RetrievalQA chain that retrieves relevant chunks and generates grounded answers.

What vector database should I use for RAG?

Pinecone works for managed production scale, Weaviate offers open-source hybrid search, Chroma and FAISS suit local development, and Qdrant provides fast filtered search. Choose based on deployment needs, scale, and whether you need managed infrastructure.

What chunk size should I use for RAG document splitting?

Use 500-1000 tokens per chunk with 10-20% overlap to preserve context at boundaries. Smaller chunks improve retrieval precision while larger chunks give the LLM more context, so balance based on your document structure.

How do I improve RAG retrieval accuracy?

Combine dense embeddings with BM25 sparse retrieval in a hybrid search, then rerank the top 50 results with a cross-encoder or Cohere Rerank down to the top 5. Adding metadata filters and multi-query retrieval also improves precision.

Why does my RAG system return irrelevant results?

Irrelevant results usually stem from poor chunking, weak embedding models, or missing metadata filters. Check that documents are properly indexed, try hybrid search, add reranking, and verify your embedding model matches your domain and language.

When should I use GraphRAG instead of standard vector RAG?

Use GraphRAG with a knowledge graph like Neo4j when relational information matters, such as questions about who knows whom or how entities connect. Standard vector retrieval handles semantic similarity but misses explicit relationships between entities.