Skip to content
Back to skills

Rag

ASecurity

RAG — ingestion and chunking strategies, metadata, embeddings, hybrid retrieval (BM25 + vectors), reranking, query rewriting, context assembly with citations, permission filtering, freshness, retrieval and answer evaluation (recall@k, MRR, faithfulness). Use to build or tune RAG (RAG, retrieval, chunking, embeddings, reranking, grounding, citations).

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
ai-agentsgo

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add vectora-os/kit --skill rag --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rag?

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

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

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
description: RAG — ingestion and chunking strategies, metadata, embeddings, hybrid retrieval (BM25 + vectors), reranking, query rewriting, context assembly with citations, permission filtering, freshness, retrieval and answer evaluation (recall@k, MRR, faithfulness). Use to build or tune RAG (RAG, retrieval, chunking, embeddings, reranking, grounding, citations).
metadata:
  category: ai
---

# Retrieval-augmented generation

## Purpose

Ground model answers in the right, permitted sources with citations.

**Use when:** question answering over documents or knowledge.

**Not for:** model fine-tuning.

## Inputs

- Corpus, questions, permission model.

## Outputs

- Pipeline design, eval report.

## Read first

- [Project Brain](../../../project-brain/README.md) — `npm run brain -- query "retrieval-augmented generation"` for prior decisions, patterns and anti-patterns.
- [RAG review checklist](../../../checklists/rag-review.md)
- [AI feature review checklist](../../../checklists/ai-feature-review.md)

## Steps

1. **Ingest.** Chunk by structure; keep metadata (source, date, ACL).
   Done when chunks are self-contained.
2. **Retrieve.** Hybrid retrieval + reranker; filter by caller permissions before ranking output.
   Done when no unauthorized chunks.
3. **Assemble.** Cite sources; instruct to answer only from context or say unknown.
   Done when answers cite.
4. **Evaluate.** Separate retrieval metrics and answer faithfulness on a labelled set.
   Done when both measured.

## Best practices

- Evaluate retrieval before tuning prompts.
- Deduplicate versions; prefer fresh documents.

## Common mistakes

- Fixed-size chunks splitting tables.
- Filtering permissions after generation.

## Example

Policy assistant: recall@5 0.71 → 0.88 with hybrid + reranker; faithfulness 0.94.

## Reusable prompt

```text
Apply the Retrieval-augmented generation skill (.agents/skills/rag/SKILL.md).
Context: {{task card or question; links to PRD, ADRs, code paths}}
Constraints: {{approved thresholds, deadlines, allowed files}}
Design ingestion, retrieval with permission filtering, context assembly and an evaluation set for the RAG feature.
Return: Pipeline design, eval report..
Cite evidence (file:line, command output, source) for every claim; list open questions separately.
```

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.