Skip to content
Back to skills

Rag Pipelines

ASecurity

Build retrieval-augmented generation that cites sources: chunking, embeddings, hybrid search, reranking and evals

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 30, 2026
ai-agentsrust

Security analysis

A100/100

Scanned November 30, 2026

npx -y skills add AdityaaaTiwari/ANVIL --skill rag-pipelines --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rag Pipelines?

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

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

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
---
description: Build retrieval-augmented generation that cites sources: chunking, embeddings, hybrid search, reranking and evals
profile: standard
tags: ai, llm, search, data
---

# RAG pipelines

Use when an application answers questions from your own documents.

## Ingest
1. Clean and normalize documents. Keep titles, headings, URLs and timestamps as metadata.
2. Chunk on structure (headings, paragraphs) at a few hundred tokens with small overlap. Never split tables or code blocks mid-way.
3. Store chunk id, source id, position and access permissions with every vector.

## Retrieve
- Hybrid search: BM25 or keyword plus vector similarity. Keywords catch ids, error codes and names that embeddings miss.
- Filter by permissions and metadata before ranking, so users never retrieve text they cannot see.
- Rerank the top candidates with a cross-encoder or reranker model. Send the model only the best few chunks.

## Generate
- Instruct the model to answer only from the provided context, cite chunk ids, and say when the context does not contain the answer.
- Treat retrieved text as untrusted input: it may contain prompt injection. Keep system instructions outside it.

## Evaluate
- Build a labelled set of real questions with expected sources.
- Measure retrieval (recall@k of the right source) separately from answer quality (faithfulness to sources, correctness).
- Re-run the set on every change to chunking, embeddings, prompts or models, and compare before shipping.

## Operate
Re-index on document change, version the index with the embedding model, and log queries with retrieved ids (not personal data) to find gaps.

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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.