rag-patterns

Implement RAG pipelines with chunking, embedding, retrieval, reranking, and generation.

3|1|Updated Feb 2, 2026
One-click install
npx skills add https://github.com/HouseGarofalo/claude-code-base --skill rag-patterns-housegarofalo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rag-patterns
Source: https://github.com/HouseGarofalo/claude-code-base/tree/main/.claude/skills/rag-patterns
Command: npx skills add https://github.com/HouseGarofalo/claude-code-base --skill rag-patterns-housegarofalo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openai, sentence-transformers, chromadb, langchain, nltk, rank-bm25, cohere, ragas, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides expert guidance and practical code examples for building robust Retrieval-Augmented Generation (RAG) systems, enabling AI to leverage external knowledge effectively.

Core Features & Use Cases

  • RAG Pipeline Implementation: Covers chunking, embedding, retrieval, reranking, and generation.
  • Advanced Strategies: Includes hybrid embeddings, multi-vector embeddings, query expansion, and HyDE.
  • Use Case: Develop a document QA system that accurately answers user questions by retrieving relevant information from a large corpus of documents and synthesizing an answer.

Quick Start

Use the rag-patterns skill to index documents and then perform a RAG query.

Frequently Asked Questions about rag-patterns

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

FAQPage Schema
How do I implement a retrieval augmented generation pipeline for document QA?

You can build a retrieval augmented generation pipeline by applying patterns for document chunking, embedding, vector retrieval, reranking, and generation to accurately answer questions from a large document corpus.

What is the best way to improve RAG retrieval accuracy with vector search?

Improve RAG retrieval accuracy by using advanced strategies like hybrid embeddings, multi-vector embeddings, query expansion, and HyDE to enhance vector search relevance before generation.

Can I use LangChain and ChromaDB for knowledge grounding in LLM applications?

Yes, you can use LangChain and ChromaDB within your RAG pipeline to index documents and perform vector search, providing essential knowledge grounding for your LLM applications.

How do I chunk documents and create embeddings for a RAG system?

Chunk documents into smaller segments and use embedding strategies like sentence-transformers to convert text into vectors, enabling effective retrieval in your RAG system.

Does Cohere provide reranking techniques for retrieval augmented generation?

Yes, Cohere is included as a dependency for applying reranking techniques, which help reorder retrieved documents to prioritize the most relevant context for the generation step.

How do I evaluate RAG pipeline performance using Ragas?

You can evaluate RAG pipeline performance using the Ragas framework to measure how effectively your system retrieves relevant context and generates accurate, grounded responses.