# rag-engineer

A skill for designing RAG systems: document chunking, embeddings, hybrid search and reranking. Useful when answer quality is capped by retrieval quality.

- skill · `type=skill` · Claude Code · 273 installs
- Author: davila7
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/ai-research/rag-engineer
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/rag-engineer

## What it does

The skill frames the agent as a RAG systems architect and steers how it works with documents and search: vector embeddings, semantic search, chunking, retrieval pipeline design, hybrid keyword plus semantic search. Inside are patterns and a sharp-edges table with severity and a fix for each row.

The patterns are concrete. Semantic chunking follows sentence boundaries and topic shifts instead of a token limit. Hierarchical retrieval indexes at several chunk sizes, runs a coarse pass for candidates, then a fine-grained pass for precision. Hybrid search pairs BM25 with vector similarity and combines the scores through Reciprocal Rank Fusion.

Anti-patterns get their own section: fixed chunk size, embedding everything, skipping evaluation. The skill tells you to measure retrieval quality separately from generation, because one blended number hides where the pipeline actually breaks. Prerequisites are LLM fundamentals, a grasp of embeddings and basic NLP concepts.

## Install

### Claude Code (native platform)

1. **claude-code-templates**
```bash
npx claude-code-templates@latest --skill ai-research/rag-engineer
```

2. **Skills CLI (Vercel)**
```bash
npx skills add davila7/claude-code-templates --skill rag-engineer -a claude-code
```

3. **Manually: put the files in place**
- File: `~/.claude/skills/rag-engineer/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/rag-engineer/

### Codex

**Manually: put the files in place**
- File: `.agents/skills/rag-engineer/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

**Manually: put the files in place**
- File: `.cursor/skills/rag-engineer/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install davila7/claude-code-templates rag-engineer
```

2. **Manually: put the files in place**
- File: `.github/skills/rag-engineer/SKILL.md`

### Gemini CLI

**Platform CLI**
```bash
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/ai-research/rag-engineer
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/rag-engineer/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/ai-research/rag-engineer

## When to use it
- chunk documents by meaning instead of a token limit
- combine BM25 and vector similarity into one search
- add a reranking step after first-stage retrieval
- measure retrieval quality apart from generation quality
- refresh embeddings when source documents change

## Example prompts
- help me design a retrieval pipeline for RAG over our internal docs
- chunk these documents by sentence boundaries and topic shifts
- build hybrid search with BM25 plus vector similarity and Reciprocal Rank Fusion

## Similar
- [rag-architect](https://affpapa.org/en/nevibecode/skills/httpsgithubcomjeffallan-rag-architect.md) — skill · 4700 installs
- [rag](https://affpapa.org/en/nevibecode/skills/rag.md) — skill · 3700 installs
- [chunking-strategy](https://affpapa.org/en/nevibecode/skills/chunking-strategy.md) — skill · 3800 installs
- [AgentDB Vector Search](https://affpapa.org/en/nevibecode/skills/agentdb-vector-search.md) — skill · 1100 installs
- [upstash-vector-db-skills](https://affpapa.org/en/nevibecode/skills/upstash-vector-db-skills.md) — skill · 366 installs
- [ai-engineer](https://affpapa.org/en/nevibecode/agents/ai-engineer.md) — subagent · 7687 installs

## Other versions with the same name
- [rag-engineer · sickn33](https://affpapa.org/en/nevibecode/skills/sickn33-rag-engineer.md) — 1000 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 224 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
