Skip to content
Back to skills

Rag Implementation

ASecurity

Designs and implements advanced Retrieval-Augmented Generation (RAG) pipelines, semantic/hybrid search (vector + BM25), dense reranking, contextual chunking, metadata filtering, and hallucination reduction.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 2, 2026
ai-agents

Security analysis

A100/100

Scanned October 2, 2026

npx -y skills add Gastonchevarria/god-mode --skill rag-implementation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rag Implementation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Rag Implementation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gastonchevarria-rag-implementation/badge)](https://www.skillsdirectory.com/skills/gastonchevarria-rag-implementation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: rag-implementation
description: Designs and implements advanced Retrieval-Augmented Generation (RAG) pipelines, semantic/hybrid search (vector + BM25), dense reranking, contextual chunking, metadata filtering, and hallucination reduction.
---

# Advanced RAG Implementation

## Overview

Basic naive RAG (fixed-length chunking + single vector similarity search) produces irrelevant context, hallucinations, and high latency. `rag-implementation` builds production-grade retrieval engines with high precision and verifiable citations.

## The Production RAG Pipeline

```text
[Document Ingestion]
        ↓
1. Document Parsing & Structure Extraction (Headers, Tables, Metadata)
        ↓
2. Contextual Chunking (Semantic boundaries, 500-1000 tokens with 10% overlap)
        ↓
3. Dual Indexing (Dense Embeddings + Sparse BM25 Keywords + Metadata Filters)
        ↓
[User Query] -> Query Rewriting & Expansion
        ↓
4. Hybrid Retrieval (Top 25 Dense + Top 25 Sparse)
        ↓
5. Cross-Encoder Re-Ranking (Select Top 3 - 5 most relevant passages)
        ↓
6. Prompt Synthesis with Grounded Citations -> LLM Streaming Response
```

## Implementation Standards

- **Metadata Enrichment**: Store `source_file`, `page_number`, `section_title`, and `created_at` alongside each chunk vector.
- **Contextual Compression**: Strip out noisy boilerplate before passing chunks into the LLM context.
- **Citation Requirement**: Prompt the model to cite exact chunk IDs `[Source 1, Page 3]` for every factual claim.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…