RAG Patterns

Community

Master RAG: Chunk, Embed, Search, Re-rank, Evaluate.

AuthorHermeticOrmus
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides expert patterns to build robust and high-performing Retrieval Augmented Generation (RAG) systems, ensuring accurate and relevant information retrieval for your LLM applications.

Core Features & Use Cases

  • Document Ingestion: Load, parse, and chunk various document types (PDF, TXT) while preserving metadata.
  • Embedding & Indexing: Store document embeddings efficiently using PostgreSQL with pgvector.
  • Hybrid Search: Combine keyword (BM25) and semantic (dense vector) search for superior retrieval accuracy.
  • Re-ranking: Enhance precision by re-ranking candidate documents using cross-encoders or APIs like Cohere.
  • Evaluation: Measure RAG system performance with RAGAS metrics for faithfulness, relevancy, and recall.
  • Use Case: Building a legal AI assistant that can accurately answer questions about complex contracts by retrieving and synthesizing information from a large corpus of legal documents.

Quick Start

Ingest documents from a list of file paths using the ingest_documents function.

Dependency Matrix

Required Modules

langchainsentence-transformerscoheredatasetsragasopenai

Components

scriptsreferences

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: RAG Patterns
Download link: https://github.com/HermeticOrmus/LibreMLOps-Claude-Code/archive/main.zip#rag-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.