Skip to content
Back to skills

Rag Engineering

ASecurity

Design, audit and evaluate provider-neutral retrieval-augmented generation pipelines from ingest through answer quality, latency and drift. Use for planning and local evaluation; do not upload, deploy or publish automatically.

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
ai-agentspythongoshell

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned November 7, 2026

npx -y skills add PapeMati98/Ai-Stack --skill rag-engineering --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rag Engineering?

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

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

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-engineering
description: Design, audit and evaluate provider-neutral retrieval-augmented generation pipelines from ingest through answer quality, latency and drift. Use for planning and local evaluation; do not upload, deploy or publish automatically.
---

# RAG Engineering

Use this skill for a grounded retrieval system or evaluation covering documents,
chunking, embeddings, retrieval, reranking, generation and monitoring.

## Workflow

1. Define corpus authority, user questions, answer contract and access boundary.
2. Inventory formats, provenance, revisions, permissions, PII and freshness.
3. Specify ingest, normalization, chunking, indexing, retrieval, reranking,
   context assembly, citation and abstention behavior.
4. Build a versioned eval set with gold evidence, adversarial cases and leakage checks.
5. Compare a simple baseline before tuning; report quality, grounding, latency,
   cost and failure modes.
6. Define drift, reindex, rollback and human-review gates. Keep upload, provider
   jobs, deployment and production writes explicitly approved.

## Local evaluation harness

The skill ships a deterministic, **stdlib-only** evaluator that runs against
declared predictions and never executes the system under test.

```powershell
python "<skill-dir>\scripts\evaluate_retrieval.py" validate-corpus --corpus "<corpus.json>"
python "<skill-dir>\scripts\evaluate_retrieval.py" evaluate --corpus "<corpus.json>" --predictions "<predictions.json>" --output "<report.json>"
python "<skill-dir>\scripts\evaluate_retrieval.py" compare --corpus "<corpus.json>" --baseline "<baseline.json>" --candidate "<candidate.json>" --output-dir "<out>"
python "<skill-dir>\scripts\evaluate_retrieval.py" selftest --output-dir "<out>"
python "<skill-dir>\scripts\test_evaluate_retrieval.py" --artifact-root "<fixtures-dir>"
```

The bundled synthetic corpus and stub predictions live under
[`fixtures/`](fixtures/README.md); they cover current-vs-historical,
superseded source, alias collision, unknown answer, conflicting evidence,
forbidden project citation and duplicate advisory proposals.

See:

- [references/contract.md](references/contract.md) — design / evaluation contract.
- [references/json-schema.md](references/json-schema.md) — JSON schema for the
  corpus, predictions and comparison report.
- [references/sample-report.md](references/sample-report.md) — preserved sample
  of an evaluator run on the bundled corpus.
- [references/trigger-cases.json](references/trigger-cases.json) — activation
  triggers and anti-triggers.
- [scripts/evaluate_retrieval.py](scripts/evaluate_retrieval.py) — the evaluator.
- [scripts/test_evaluate_retrieval.py](scripts/test_evaluate_retrieval.py) — the
  deterministic test suite.
- For a Hub pilot preparation or repair task explicitly assigned in scope, see
  [references/hub-quality.md](references/hub-quality.md). This conditional
  pointer does not create a general retrieval-evaluation trigger.

Files in this skill

  • SKILL.md3 KB
  • agents/openai.yaml130 B
  • fixtures/README.md2.6 KB
  • fixtures/baseline-predictions.json6.5 KB
  • fixtures/candidate-predictions.json6.1 KB
  • fixtures/gold-corpus.json11.2 KB
  • fixtures/hub-quality-pilot/materials.json3.2 KB
  • fixtures/hub-quality-pilot/questions.json1.4 KB
  • fixtures/malformed/bad-timestamp-zone.json623 B
  • fixtures/malformed/citation-bad-source-id.json672 B
  • fixtures/malformed/duplicate-case-id.json1.3 KB
  • fixtures/malformed/missing-schema-version.json106 B
  • fixtures/malformed/not-json.txt23 B
  • fixtures/malformed/wrong-schema-version.json136 B
  • references/contract.md900 B
  • references/hub-quality.md3.5 KB
  • references/json-schema.md8.9 KB
  • references/sample-report.md6.6 KB
  • references/trigger-cases.json877 B
  • scripts/evaluate_retrieval.py48.7 KB

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…

Newsletter

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